Compare commits
1865 Commits
sandbox/Ji
...
sandbox/ji
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f303c27fd | ||
|
|
5b5fbadeff | ||
|
|
b752848ee1 | ||
|
|
e5068cd5c7 | ||
|
|
68e7e4d04b | ||
|
|
0738390c19 | ||
|
|
b89861a463 | ||
|
|
3246fc04fb | ||
|
|
2334f51d5f | ||
|
|
9baa5c9973 | ||
|
|
03568c313b | ||
|
|
4273a52cec | ||
|
|
761a7088ac | ||
|
|
75b57d39d4 | ||
|
|
8c8d16de6b | ||
|
|
a5e47ade40 | ||
|
|
c96ecc2ab7 | ||
|
|
35731dca52 | ||
|
|
67e64cbebf | ||
|
|
f0d007abdc | ||
|
|
cb785ade5b | ||
|
|
c0307e6cea | ||
|
|
dea6f5217e | ||
|
|
dcc0c894c4 | ||
|
|
d4bc17d696 | ||
|
|
13177d7ecb | ||
|
|
8d92858a91 | ||
|
|
02345be986 | ||
|
|
28ff0e0d1d | ||
|
|
a85e552d95 | ||
|
|
ca4df94858 | ||
|
|
ed3df445d9 | ||
|
|
d803e8a20e | ||
|
|
de993a847f | ||
|
|
ea48370a50 | ||
|
|
15939cb2d7 | ||
|
|
d8aa40634a | ||
|
|
a0900fd0db | ||
|
|
004b546ae1 | ||
|
|
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 | ||
|
|
52e7f4153b | ||
|
|
b597e3e188 | ||
|
|
8b2ddbc728 | ||
|
|
db11307502 | ||
|
|
c91dd55eda | ||
|
|
8366b414dd | ||
|
|
f075fdc474 | ||
|
|
7361ef732b | ||
|
|
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 | ||
|
|
64677c7e99 | ||
|
|
465eaceb68 | ||
|
|
d8808d365e | ||
|
|
50461166b7 | ||
|
|
0278ae16f6 | ||
|
|
e6ec22cb8c | ||
|
|
bda690d446 | ||
|
|
42b0560319 | ||
|
|
1589ecb0ae | ||
|
|
e1d22db451 | ||
|
|
1c8567ff09 | ||
|
|
ad0ac045d5 | ||
|
|
5e1e6a9f17 | ||
|
|
2d06b08cba | ||
|
|
0548046ae3 | ||
|
|
536a90970b | ||
|
|
9511b948ef | ||
|
|
195883023b | ||
|
|
d88cee3712 | ||
|
|
4679af1ce9 | ||
|
|
be3489eaf4 | ||
|
|
ecd34e6494 | ||
|
|
e5732bcf05 | ||
|
|
b5c50ae91f | ||
|
|
43a4900ea3 | ||
|
|
3080691e92 | ||
|
|
f78d6aa772 | ||
|
|
bdb8afbbc0 | ||
|
|
9af8c39694 | ||
|
|
e909da888c | ||
|
|
8a6f0551f1 | ||
|
|
fb2dd7366b | ||
|
|
6b56405f5e | ||
|
|
356c944782 | ||
|
|
c7f58bcc70 | ||
|
|
bd89a34c3a | ||
|
|
f642ee891b | ||
|
|
e5357230e2 | ||
|
|
7e14baa1da | ||
|
|
906ec30c10 | ||
|
|
95633d0e80 | ||
|
|
9a5e0d4038 | ||
|
|
e5b76ba26e | ||
|
|
2474bea46e | ||
|
|
eb1566b632 | ||
|
|
c5f11912ae | ||
|
|
9a9b1cf772 | ||
|
|
6a467ee711 | ||
|
|
08507eb82a | ||
|
|
36c51c7afe | ||
|
|
d5657905b6 | ||
|
|
cc29cebde6 | ||
|
|
6d585393a2 | ||
|
|
ff03d5448a | ||
|
|
4e21830987 | ||
|
|
d743a55adb | ||
|
|
c6eadc3309 | ||
|
|
5e35c3c9a0 | ||
|
|
0231e27bf0 | ||
|
|
180b1804e5 | ||
|
|
4dcbf0a809 | ||
|
|
b6d874d73b | ||
|
|
c147c4d65c | ||
|
|
45db71d0ac | ||
|
|
bc0a974310 | ||
|
|
6201a256f4 | ||
|
|
d1ff1e9ffb | ||
|
|
820302a394 | ||
|
|
5c245a46d8 | ||
|
|
0ae1c83277 | ||
|
|
18ea2a7e0c | ||
|
|
a28b2c6ff0 | ||
|
|
43a34557f1 | ||
|
|
5e16d397bd | ||
|
|
205532f3a7 | ||
|
|
9a733b399c | ||
|
|
1b556e1f9a | ||
|
|
42ef854f97 | ||
|
|
1c0769107b | ||
|
|
413a0392c0 | ||
|
|
4ebded6840 | ||
|
|
c50f6739f8 | ||
|
|
28bd7673ad | ||
|
|
f5507b514c | ||
|
|
06ba5254ee | ||
|
|
821f02947e | ||
|
|
5c055cc4cf | ||
|
|
51b654e8f0 | ||
|
|
690971898b | ||
|
|
c0523090be | ||
|
|
a390b90f01 | ||
|
|
467c66e842 | ||
|
|
7105df53d7 | ||
|
|
a1ec3eb326 | ||
|
|
e8032a5fae | ||
|
|
071b781e37 | ||
|
|
aa006d7149 | ||
|
|
ee380cc5c4 | ||
|
|
d88ca3c335 | ||
|
|
f1d090e2f5 | ||
|
|
697a8e6fe6 | ||
|
|
d76e5b3652 | ||
|
|
653832ea06 | ||
|
|
41be09afee | ||
|
|
71412d82a3 | ||
|
|
cd14e03196 | ||
|
|
bb55193448 | ||
|
|
5eed74e1d3 | ||
|
|
e0425bc0ef | ||
|
|
82cb1c5e7a | ||
|
|
6c0f6dd817 | ||
|
|
93ffe9d6dc | ||
|
|
acf24cc1b8 | ||
|
|
f3fa7cfbfa | ||
|
|
c455919f03 | ||
|
|
83bd16aaf3 | ||
|
|
7fa5223444 | ||
|
|
6a21ca20cc | ||
|
|
b1339751b9 | ||
|
|
49f6ff1103 | ||
|
|
1fefc39e94 | ||
|
|
b1e3e8348d | ||
|
|
5942839d2d | ||
|
|
950b68288a | ||
|
|
798b54a006 | ||
|
|
42b6791774 | ||
|
|
2030c49cf8 | ||
|
|
e7aa2d9b21 | ||
|
|
0092960d27 | ||
|
|
4e5e5fc52b | ||
|
|
79a00d71bd | ||
|
|
2fdb63fd72 | ||
|
|
72190cb5e3 | ||
|
|
dca95791d0 | ||
|
|
5de049b067 | ||
|
|
e18800443c | ||
|
|
82331e000a | ||
|
|
f1fc47becf | ||
|
|
81cb6bd496 | ||
|
|
db14911ccb | ||
|
|
407968cb88 | ||
|
|
a4c7e92b81 | ||
|
|
5dccce558c | ||
|
|
bbb9ca4535 | ||
|
|
89af744ba6 | ||
|
|
d0307158cd | ||
|
|
519b526de8 | ||
|
|
aab9218741 | ||
|
|
d692f26dd5 | ||
|
|
3d1bb97b1b | ||
|
|
1794624c18 | ||
|
|
78629508f2 | ||
|
|
72889a2a60 | ||
|
|
94ba3939cd | ||
|
|
d04a0d77fb | ||
|
|
92946472a1 | ||
|
|
6f0cc9f53c | ||
|
|
0ea70f77a5 | ||
|
|
afb6b4b852 | ||
|
|
706b0ad629 | ||
|
|
cf9366e504 | ||
|
|
89dcc13939 | ||
|
|
62bfc97d05 | ||
|
|
26a9afc32c | ||
|
|
aeea00cc4f | ||
|
|
7da965daa9 | ||
|
|
7bca5619eb | ||
|
|
fc7cbd1f60 | ||
|
|
534ac8a617 | ||
|
|
2dcefd9c7f | ||
|
|
4622af69e6 | ||
|
|
fa47212933 | ||
|
|
1aa84e03fd | ||
|
|
13c3c8309a | ||
|
|
9cc8995f46 | ||
|
|
6cf95bd1e7 | ||
|
|
17cf545edb | ||
|
|
54fb24aac3 | ||
|
|
2b18c9a09b | ||
|
|
cb79ea1c16 | ||
|
|
088b05fd99 | ||
|
|
3acfe46e8d | ||
|
|
0a81d36ab4 | ||
|
|
54d66ef165 | ||
|
|
b522d1cdff | ||
|
|
3fc0f5ed12 | ||
|
|
470cbfcb0b | ||
|
|
c927e94fd1 | ||
|
|
472e14e725 | ||
|
|
345b11cd73 | ||
|
|
c4e354b4bd | ||
|
|
8af092dbd7 | ||
|
|
be6c031fb3 | ||
|
|
70deaf00eb | ||
|
|
3ee6db6c81 | ||
|
|
23532eb7b6 | ||
|
|
b04dad328c | ||
|
|
762641bacc | ||
|
|
3d181a4516 | ||
|
|
fe4a14af72 | ||
|
|
4ef08dcec8 | ||
|
|
b152472ba7 | ||
|
|
8465c938f1 | ||
|
|
1d723572b9 | ||
|
|
a8a08ce57e | ||
|
|
9265bad906 | ||
|
|
7e28ca0157 | ||
|
|
a229dbc1f0 | ||
|
|
0d8cb09058 | ||
|
|
768aad88d9 | ||
|
|
8634eaf87a | ||
|
|
29d0cc2431 | ||
|
|
20d902a376 | ||
|
|
1767067068 | ||
|
|
3715a914b8 | ||
|
|
c9426aaa1b | ||
|
|
4ea7f2be43 | ||
|
|
2808dd12c2 | ||
|
|
244912d506 | ||
|
|
d705e17f5e | ||
|
|
d65ea85ce6 | ||
|
|
6032239e2f | ||
|
|
f2e44aa664 | ||
|
|
610e258cc5 | ||
|
|
6ad714fa52 | ||
|
|
41a0a0cb35 | ||
|
|
c7e9e486b8 | ||
|
|
e15b535791 | ||
|
|
e0ab364701 | ||
|
|
bfbba9c6b0 | ||
|
|
5d8f9f53d1 | ||
|
|
89ba55ed1c | ||
|
|
25a2434752 | ||
|
|
dfa42cf8b7 | ||
|
|
35747296b0 | ||
|
|
a95f4d961e | ||
|
|
8a64f516cb | ||
|
|
a9aa29d901 | ||
|
|
9f7fdcbe60 | ||
|
|
5c4a037c86 | ||
|
|
26f4f2dc8e | ||
|
|
c1f911a2ea | ||
|
|
c65e79d2e5 | ||
|
|
f87fdebefc | ||
|
|
17cfee3cb5 | ||
|
|
d816fa7bfd | ||
|
|
9b769e47f4 | ||
|
|
dc36e5aff0 | ||
|
|
1057ee4847 | ||
|
|
eaa8043a31 | ||
|
|
4bc6ae4342 | ||
|
|
c7b7011b9b | ||
|
|
c21cab39c8 | ||
|
|
d74ceb03de | ||
|
|
7418b176ce | ||
|
|
b4f2c567c8 | ||
|
|
294550c881 | ||
|
|
7914f7a028 | ||
|
|
7ac505c726 | ||
|
|
fb1a8ba35a | ||
|
|
15de7bd334 | ||
|
|
2abfd8f92a | ||
|
|
463c94854f | ||
|
|
c54d165014 | ||
|
|
6b9f046791 | ||
|
|
f1ecf63f68 | ||
|
|
3067c34c5a | ||
|
|
f6255dbb53 | ||
|
|
23591322cf | ||
|
|
0572052725 | ||
|
|
4e6b5079c6 | ||
|
|
afd2f68dae | ||
|
|
16c0ec711c | ||
|
|
c93dc38ca3 | ||
|
|
d621de7e8d | ||
|
|
3ad75fc623 | ||
|
|
df14d9f4e7 | ||
|
|
f4656961ca | ||
|
|
08a453b9de | ||
|
|
726d1b841b | ||
|
|
a3d22aa2a4 | ||
|
|
5f138986fc | ||
|
|
ac29aa135c | ||
|
|
805a12c75b | ||
|
|
814e1346a6 | ||
|
|
cc4c5de22f | ||
|
|
5a9f36d391 | ||
|
|
457a87d986 | ||
|
|
c353da68aa | ||
|
|
18427983ab | ||
|
|
a2746d7096 | ||
|
|
a0fd7a9831 | ||
|
|
d011808777 | ||
|
|
749c393c8d | ||
|
|
bfad9d2fe6 | ||
|
|
7723b8df6a | ||
|
|
9d9273726b | ||
|
|
92b08f516a | ||
|
|
8f089cbd2e | ||
|
|
a68356202d | ||
|
|
8f6b943100 | ||
|
|
d10fc5af8f | ||
|
|
b096db5ad4 | ||
|
|
1579bb88c5 | ||
|
|
9b375871db | ||
|
|
4bfe3bdf27 | ||
|
|
0b0eba728d | ||
|
|
da7dc59837 | ||
|
|
0fcfc613c6 | ||
|
|
6eabf229e2 | ||
|
|
4f7a7d29fa | ||
|
|
80ae856c8b | ||
|
|
22a8474fe7 | ||
|
|
44849516d4 | ||
|
|
b37494cfb5 | ||
|
|
b4c7d0523a | ||
|
|
d35f992599 | ||
|
|
c1b233dd43 | ||
|
|
fcb4253c9c | ||
|
|
4dc390b15d | ||
|
|
7dc5a689b4 | ||
|
|
fd22c492f7 | ||
|
|
36a9a33b90 | ||
|
|
56c2cb7553 | ||
|
|
d8642d831f | ||
|
|
e8b133c79c | ||
|
|
af6d2c7d42 | ||
|
|
e184b613b9 | ||
|
|
a5e97d874b | ||
|
|
6025c6d65b | ||
|
|
dd4b416412 | ||
|
|
135b43ccf3 | ||
|
|
90e563d91f | ||
|
|
ab20c98e84 | ||
|
|
7f8dd35329 | ||
|
|
873a158f14 | ||
|
|
c62228f273 | ||
|
|
da9c73c293 | ||
|
|
8abd0c2a12 | ||
|
|
7cfdc00337 | ||
|
|
7186a2dd86 | ||
|
|
4ac5058afc | ||
|
|
73422d3b2d | ||
|
|
8fbc641540 | ||
|
|
0e3f494b21 | ||
|
|
e3ee8c292b | ||
|
|
3b2e73b9a4 | ||
|
|
eb6b443bd2 | ||
|
|
a71c5c0ee9 | ||
|
|
c827c59eaf | ||
|
|
5fddefbced | ||
|
|
21da45e570 | ||
|
|
56aa0da405 | ||
|
|
b7f441a0bc | ||
|
|
c0f0245e8a | ||
|
|
91feec1452 | ||
|
|
097d59c28c | ||
|
|
0c2a14f9e2 | ||
|
|
7c6ae373ac | ||
|
|
583c205270 | ||
|
|
dfe7fdae7d | ||
|
|
f23241087a | ||
|
|
47c55acdad | ||
|
|
e3365c894a | ||
|
|
49e0673659 | ||
|
|
a5d9416fd7 | ||
|
|
ce4c4b96e4 | ||
|
|
f42012e526 | ||
|
|
4cbf36b105 | ||
|
|
d12a4a825c | ||
|
|
39e3937c24 | ||
|
|
fc18cf7a11 | ||
|
|
4b5109cd73 | ||
|
|
a7e9178d80 | ||
|
|
08d5cf226e | ||
|
|
8191ed8b63 | ||
|
|
d19033fa4e | ||
|
|
bd863314d0 | ||
|
|
124ada514b | ||
|
|
fe7cabe8b6 | ||
|
|
a73f0f4170 | ||
|
|
a6a4659bea | ||
|
|
b1fb6e0365 | ||
|
|
ea990af7f5 | ||
|
|
5deb983744 | ||
|
|
f8b869f573 | ||
|
|
4f08d3d6c5 | ||
|
|
8eefb36ca9 | ||
|
|
4013645353 | ||
|
|
7971846a5e | ||
|
|
5f214d6bca | ||
|
|
b2446fb6be | ||
|
|
a9a1d4e8e5 | ||
|
|
5ebc8febdc | ||
|
|
af6733aec6 | ||
|
|
5da87e84d5 | ||
|
|
55c6a74bd4 | ||
|
|
48de07d882 | ||
|
|
252ec59821 | ||
|
|
c376fbc62e | ||
|
|
9aaf523ace | ||
|
|
16dcf013d3 | ||
|
|
742021f026 | ||
|
|
d3b6062a13 | ||
|
|
964058129f | ||
|
|
a15edeb76d | ||
|
|
a60e0c15bc | ||
|
|
b4297bb122 | ||
|
|
fb73ceae85 | ||
|
|
fd660f0164 | ||
|
|
f01c769dc6 | ||
|
|
e905da6f9c | ||
|
|
fa84acb441 | ||
|
|
d4657a7efb | ||
|
|
e8c6c00d80 | ||
|
|
598b083342 | ||
|
|
5ddfa101c9 | ||
|
|
d341f843e2 | ||
|
|
509fb0bc9d | ||
|
|
33a9d53c10 | ||
|
|
2b4f49cb1a | ||
|
|
00a35fdeda | ||
|
|
963b9b8818 | ||
|
|
97ec51233d | ||
|
|
f0f00251ea | ||
|
|
130c0ec71a | ||
|
|
b67821f37b | ||
|
|
9a0a2193e4 | ||
|
|
34c4e1d6f9 | ||
|
|
e298d650cb | ||
|
|
1ec0853d17 | ||
|
|
0fe589f21e | ||
|
|
2726023fc1 | ||
|
|
2cdd3beac9 | ||
|
|
aeee70f9dd | ||
|
|
fe39f6cc9f | ||
|
|
4110a27d66 | ||
|
|
987451d864 | ||
|
|
41c13ddbc9 | ||
|
|
0fc4d4e1ef | ||
|
|
ac1e1b698f | ||
|
|
d41781560e | ||
|
|
5f5091636e | ||
|
|
817be1d214 | ||
|
|
70ad668056 | ||
|
|
cbce003712 | ||
|
|
bf82514b54 | ||
|
|
07d5d538c2 | ||
|
|
bcbd3c8fa2 | ||
|
|
1279d3bac7 | ||
|
|
b8c47a98b8 | ||
|
|
149822e399 | ||
|
|
f62805fae0 | ||
|
|
add779e425 | ||
|
|
7a63e6446b | ||
|
|
f987e64476 | ||
|
|
9e23c6d534 | ||
|
|
1fcef81cb0 | ||
|
|
c5ad31e518 | ||
|
|
e253eaa036 | ||
|
|
f744613be9 | ||
|
|
389ed6da10 | ||
|
|
345ff1a2f2 | ||
|
|
f65473c036 | ||
|
|
87d2c3c063 | ||
|
|
b0e6811ace | ||
|
|
a2b623d467 | ||
|
|
44925b4c17 | ||
|
|
fd15cd5ad9 | ||
|
|
38f1fbbb75 | ||
|
|
2992739b5d | ||
|
|
97279ed2e2 | ||
|
|
479c669a61 | ||
|
|
4735edd00f | ||
|
|
7501de267c | ||
|
|
7c0c62df1d | ||
|
|
d0750d287f | ||
|
|
55e80a3cc6 | ||
|
|
b8ff84b7f8 | ||
|
|
3590a4b437 | ||
|
|
be72944166 | ||
|
|
0a01e4401b | ||
|
|
845aad42b8 | ||
|
|
d190ad228f | ||
|
|
6e5ab70a93 | ||
|
|
b76fd48a99 | ||
|
|
50adfdf5ba | ||
|
|
f83f9dbb3a | ||
|
|
7ae1aa6b37 | ||
|
|
7d15444d07 | ||
|
|
8be1dcb4cb | ||
|
|
b946e5ce0f | ||
|
|
de740b258b | ||
|
|
eaf1ffd837 | ||
|
|
db8e731b8d | ||
|
|
3fe83cdf81 | ||
|
|
2f66fdd375 | ||
|
|
1c39998e39 | ||
|
|
7b756183aa | ||
|
|
dc7da005d7 | ||
|
|
fa94dbda81 | ||
|
|
d8426d6f12 | ||
|
|
e11878c8e3 | ||
|
|
3c5244886a | ||
|
|
cda17e12ed | ||
|
|
d5975b733b | ||
|
|
cb1e817c77 | ||
|
|
81452cf0b7 | ||
|
|
e03b8b78b2 | ||
|
|
0cdc85d8cf | ||
|
|
ae5394b9e2 | ||
|
|
c243835303 | ||
|
|
da9db83270 | ||
|
|
55c0df5ef1 | ||
|
|
e4fb53ea6e | ||
|
|
4bbd95512a | ||
|
|
db50037ece | ||
|
|
9b4f9f45ee | ||
|
|
4b44e46de0 | ||
|
|
49fa5276fe | ||
|
|
f70c80289c | ||
|
|
e8103f3676 | ||
|
|
74f869b962 | ||
|
|
2d637ca36d | ||
|
|
13a4f14710 | ||
|
|
b58c99eb71 | ||
|
|
535cc6d87f | ||
|
|
8783a8a97c | ||
|
|
c369daf3ea | ||
|
|
f8d3501640 | ||
|
|
8bf791e7ef | ||
|
|
89090d8046 | ||
|
|
66da771040 | ||
|
|
0497d3a827 | ||
|
|
b770def572 | ||
|
|
340d82efb9 | ||
|
|
a6f2a9619b | ||
|
|
8dd466edc8 | ||
|
|
a126b6ce7d | ||
|
|
7e0d0de211 | ||
|
|
0ea2684c2c | ||
|
|
1d7f1ca7da | ||
|
|
892128f6ca | ||
|
|
0f96939ceb | ||
|
|
5327fcf857 | ||
|
|
ac7f403cbe | ||
|
|
55c2646666 | ||
|
|
6a82f0d7fb | ||
|
|
155b9416b3 | ||
|
|
c2d0f9ddeb | ||
|
|
6e6c57da9a | ||
|
|
76ccba9ec8 | ||
|
|
97d1f1aaae | ||
|
|
1acdd04d2d | ||
|
|
9d251f9510 | ||
|
|
ea5450b280 | ||
|
|
3caf2bb606 | ||
|
|
a652048efd | ||
|
|
478fbc8f23 | ||
|
|
cccad1c5de | ||
|
|
45b7e160d8 | ||
|
|
83f8ab5001 | ||
|
|
a8f8b83cef | ||
|
|
0ede9f52b7 | ||
|
|
9cb3a13426 | ||
|
|
02b3b05278 | ||
|
|
8051b6d256 | ||
|
|
00c0cbb445 | ||
|
|
3d938d71b0 | ||
|
|
c6d90f0535 | ||
|
|
33a0deb928 | ||
|
|
8c6d5a874d | ||
|
|
efb05d0d1c | ||
|
|
e8a3abe41e | ||
|
|
4ec8f9c5ae | ||
|
|
1696114587 | ||
|
|
fcb5a8692a | ||
|
|
cb4310fc58 | ||
|
|
fbe67d307a | ||
|
|
5256a4034b | ||
|
|
91c412b6db | ||
|
|
017253b7a3 | ||
|
|
9852643373 | ||
|
|
432cd4bfb7 | ||
|
|
39f03bf9c6 | ||
|
|
823a126d4c | ||
|
|
52e358f13e | ||
|
|
3d4526322b | ||
|
|
4c5ac477cb | ||
|
|
97946622c0 | ||
|
|
ced982640b | ||
|
|
3c5256d572 | ||
|
|
d1b30ceaa3 | ||
|
|
99f8bd72cb | ||
|
|
dc19f352af | ||
|
|
e4702deeec | ||
|
|
8565a1c99a | ||
|
|
66cf8098e6 | ||
|
|
6abf1aea63 | ||
|
|
1e0aa9497f | ||
|
|
e757808429 | ||
|
|
0ea304620c | ||
|
|
95dc082168 | ||
|
|
b49de21d74 | ||
|
|
f0b3b08fb4 | ||
|
|
04d2e57425 | ||
|
|
3a3b0be09a | ||
|
|
79fcc56781 | ||
|
|
8d5389171f | ||
|
|
1c967f17bd | ||
|
|
ff8505a54d | ||
|
|
4f7e7c4d49 | ||
|
|
dc6d954bd2 | ||
|
|
29a17db913 | ||
|
|
440995cabb | ||
|
|
d157742788 | ||
|
|
61774ad1c4 | ||
|
|
dcf5b7cfdd | ||
|
|
bc3ec8ef07 | ||
|
|
bd7162269f | ||
|
|
5609858785 | ||
|
|
a42df86c03 | ||
|
|
c96bb8004e | ||
|
|
8aaf5ec4c7 | ||
|
|
fc5f3b8f4f | ||
|
|
e943db045a | ||
|
|
2d730a289a | ||
|
|
fc3c456053 | ||
|
|
1e77058b7b | ||
|
|
c06d56cc7d | ||
|
|
437d033dbb | ||
|
|
3c353e58c0 | ||
|
|
f3a1295cff | ||
|
|
9f14bbfd80 | ||
|
|
8fdfeb3f40 | ||
|
|
b92cc27b76 | ||
|
|
c040f96e4b | ||
|
|
d017f5ba38 | ||
|
|
69c153c4e6 | ||
|
|
1543f2b60e | ||
|
|
f4d746a3c1 | ||
|
|
28a8226350 | ||
|
|
92f7d79030 | ||
|
|
1c7b1f9aec | ||
|
|
3393243d5e | ||
|
|
3dd9cde2a5 | ||
|
|
d219f2b9d2 | ||
|
|
0bd61519c0 | ||
|
|
4bd87a9b9e | ||
|
|
9f0383c66f | ||
|
|
8281a19465 | ||
|
|
4774d38970 | ||
|
|
517a662005 | ||
|
|
46df71396d | ||
|
|
944ad6cac9 | ||
|
|
9db1f24c47 | ||
|
|
7555e2b822 | ||
|
|
7b71cdb0b4 | ||
|
|
fb2a89b1fb | ||
|
|
c8b9658ecc | ||
|
|
78637b6136 | ||
|
|
8e029fcfa9 | ||
|
|
86f4a3d8af | ||
|
|
bc94999148 | ||
|
|
1395b56a1d | ||
|
|
b6131a733d | ||
|
|
12c6688e31 | ||
|
|
7ca84888c2 | ||
|
|
7b480ee90c | ||
|
|
922af194bc | ||
|
|
c539ec022f | ||
|
|
557ae511cb | ||
|
|
debe4e920f | ||
|
|
90c9ede8e6 | ||
|
|
e5d4062962 | ||
|
|
8e8bc5f28b | ||
|
|
001baa5dd8 | ||
|
|
d8428ae35d | ||
|
|
714a46a63c | ||
|
|
c5d779d266 | ||
|
|
a2c69af50e | ||
|
|
5d1d72df16 | ||
|
|
4b45088fc9 | ||
|
|
d77f51ba9e | ||
|
|
907b33cdc4 | ||
|
|
ce88d74d34 | ||
|
|
337b221e00 | ||
|
|
e8e3583fc7 | ||
|
|
41d8545ab6 | ||
|
|
6e44bf20f7 | ||
|
|
e77f859d72 | ||
|
|
d1398e9f13 | ||
|
|
4f1f510f16 | ||
|
|
b6ea0c4c57 | ||
|
|
7f6cddb58f | ||
|
|
0d51a97ae9 | ||
|
|
bc7074508a | ||
|
|
d9fedf7832 | ||
|
|
fa53008fb7 | ||
|
|
97b3913dcc | ||
|
|
ce6a6c5411 | ||
|
|
8914ab696d | ||
|
|
5fe0e55ca4 | ||
|
|
b2658ec321 | ||
|
|
a41fe749a8 | ||
|
|
89b4b315aa | ||
|
|
79fb3a013e | ||
|
|
3edd293dae | ||
|
|
e6add6499f | ||
|
|
e820ca6973 | ||
|
|
a6d126709a | ||
|
|
17c9678a3c | ||
|
|
e8d3491ec2 | ||
|
|
43d49e4710 | ||
|
|
c98273c9e7 | ||
|
|
24b3ede251 | ||
|
|
98f0178611 | ||
|
|
5214bd52c8 | ||
|
|
5168baea10 | ||
|
|
ef75416ab7 | ||
|
|
53b7f33f2d | ||
|
|
aaa49f0485 | ||
|
|
31509af247 | ||
|
|
7ea431df98 | ||
|
|
471302a07b | ||
|
|
a4bb5f2a29 | ||
|
|
dc0f0f1cf2 | ||
|
|
e21c1eab9d | ||
|
|
44317a511b | ||
|
|
d8985f5360 | ||
|
|
bea691b5c9 | ||
|
|
ecbbef6b67 | ||
|
|
176c291d9c | ||
|
|
4f52d49f1e | ||
|
|
254a4c033c | ||
|
|
fbac961b47 | ||
|
|
07799ef28a | ||
|
|
e0e4045db8 | ||
|
|
e2b52f6f01 | ||
|
|
33b3953c54 | ||
|
|
0fbc277746 | ||
|
|
2c838ede68 | ||
|
|
cca866f578 | ||
|
|
2aa67ce20f | ||
|
|
a49c701529 | ||
|
|
42c0b1b1f1 | ||
|
|
c7489f4815 | ||
|
|
15c839f563 | ||
|
|
b105414118 | ||
|
|
92146eb8ac | ||
|
|
dca319040c | ||
|
|
b0bafd0439 | ||
|
|
38dd0448cd | ||
|
|
587bd3669e | ||
|
|
1898d1336d | ||
|
|
44afbbb72d | ||
|
|
c620c632c1 | ||
|
|
4ded624ff3 | ||
|
|
59114915bc | ||
|
|
97880c3324 | ||
|
|
39d93f3891 | ||
|
|
6a422e4452 | ||
|
|
0f8ee6eb4b | ||
|
|
61c5c96ae1 | ||
|
|
997ac14c6a | ||
|
|
2fd31bbba7 | ||
|
|
faf8c63b0f | ||
|
|
4a28da5843 | ||
|
|
c23a9e218c | ||
|
|
b19b16cfa1 | ||
|
|
c9976b32b4 | ||
|
|
a2288d274c | ||
|
|
e67d45d4ce | ||
|
|
913ddbf747 | ||
|
|
ad8e6f2ed6 | ||
|
|
a3938266f5 | ||
|
|
47fe535422 | ||
|
|
3a070ba502 | ||
|
|
f82cfc2ee8 | ||
|
|
87c21a95ae | ||
|
|
5908e0b664 | ||
|
|
9c6eea35b6 | ||
|
|
5831a7127e | ||
|
|
63819c033c | ||
|
|
8c854769fc | ||
|
|
44138d7d9e | ||
|
|
bfb6d48812 | ||
|
|
09acd267bc | ||
|
|
a4dad3e961 | ||
|
|
8710cceb45 | ||
|
|
78b434e8b1 | ||
|
|
d43fd99822 | ||
|
|
0d0db3e8c3 | ||
|
|
60d0b3364c | ||
|
|
7012ba6395 | ||
|
|
dc07cc6fed | ||
|
|
c2cf347fe2 | ||
|
|
2b6d62140e | ||
|
|
6c3b691c49 | ||
|
|
7ccd7fc325 | ||
|
|
faea038f4f | ||
|
|
8f7e7663ad | ||
|
|
f990b35fa4 | ||
|
|
baaaa57533 | ||
|
|
8bb37dd069 | ||
|
|
877fac122b | ||
|
|
914f8f9ee0 | ||
|
|
c005792951 | ||
|
|
fd891a9655 | ||
|
|
eb88b172fe | ||
|
|
ce5e17072d | ||
|
|
4fcabf5169 | ||
|
|
bdfbc3e876 | ||
|
|
2da8d24e8f | ||
|
|
a9f55e8324 | ||
|
|
2561b4dd4c | ||
|
|
65d9599807 | ||
|
|
f1b09c0433 | ||
|
|
a8c5ab2ca6 | ||
|
|
98e88e6ad8 | ||
|
|
668e804504 | ||
|
|
5df6c04585 | ||
|
|
ce2ca9f777 | ||
|
|
516c087c51 | ||
|
|
b8c1cdcd12 | ||
|
|
179bceffdb | ||
|
|
0601f92a88 | ||
|
|
88fadafa9e | ||
|
|
19dbc0f066 | ||
|
|
6d52fe2e71 | ||
|
|
c543d38ac7 | ||
|
|
622beaba67 | ||
|
|
01853d7ce9 | ||
|
|
d90536c1a2 | ||
|
|
e2a5fd2cf4 | ||
|
|
f779dba405 | ||
|
|
c139b81a13 | ||
|
|
54a6f73958 | ||
|
|
ebf7466cd8 | ||
|
|
cf1c0ebc3a | ||
|
|
86d0cb8325 | ||
|
|
cbebbff025 | ||
|
|
71d923232c | ||
|
|
b601202905 | ||
|
|
275c102787 | ||
|
|
dbd3760712 | ||
|
|
fdc549994a | ||
|
|
d02aa04422 | ||
|
|
6af9d7f2e2 | ||
|
|
acc481eaae | ||
|
|
6e068e51b5 | ||
|
|
b6782686f4 | ||
|
|
c022dbc4d3 | ||
|
|
2276eb16f3 | ||
|
|
102123821d | ||
|
|
6051bcc3dc | ||
|
|
71e88f903d | ||
|
|
7621b48a1c | ||
|
|
f2d621e383 | ||
|
|
b337c54cc4 | ||
|
|
7544e766e4 | ||
|
|
a2a13cbe5f | ||
|
|
e97b849219 | ||
|
|
f9f078ebb6 | ||
|
|
be380f2005 | ||
|
|
26ab314176 | ||
|
|
45db29784d | ||
|
|
7c16dcc79b | ||
|
|
bbea7c95d8 | ||
|
|
a927aec5f8 | ||
|
|
89ab1dca50 | ||
|
|
3f2a06674a | ||
|
|
efc2e9844e | ||
|
|
5317185eb0 | ||
|
|
cad0eca25c | ||
|
|
c855ed72a6 | ||
|
|
1e4473b216 | ||
|
|
131cab7c27 | ||
|
|
ed93470a69 | ||
|
|
cbdfdb947c | ||
|
|
a49fff632c | ||
|
|
7e272e8c43 | ||
|
|
109a2edf90 | ||
|
|
bbefdce7eb | ||
|
|
c5a7c89e89 | ||
|
|
30181c46d8 | ||
|
|
f76d42a98a | ||
|
|
15353216c5 | ||
|
|
dee70d355f | ||
|
|
c3bdffb0a5 | ||
|
|
9ae5fb706e | ||
|
|
55ef1ae9e7 | ||
|
|
89ca85dacd | ||
|
|
02fda6582c | ||
|
|
4e11f3ca6e | ||
|
|
ff683ab1da | ||
|
|
8c15ced172 | ||
|
|
2161e44025 | ||
|
|
ef2b3cce50 | ||
|
|
9e420c01da | ||
|
|
96dba4902c | ||
|
|
48d8291df4 | ||
|
|
7875e1d8ad | ||
|
|
b962646fc5 | ||
|
|
7ca17435d5 | ||
|
|
da8c3bf218 | ||
|
|
a492bcef87 | ||
|
|
9843e7c635 | ||
|
|
6f41e29064 | ||
|
|
48bfee8797 | ||
|
|
e2c6a633fb | ||
|
|
883fdd45cf | ||
|
|
ade9693a30 | ||
|
|
976f7f42c1 | ||
|
|
37d03809bf | ||
|
|
1bcf7a35e9 | ||
|
|
0f854e9ab5 | ||
|
|
3373f0e93b | ||
|
|
8089f1cf13 | ||
|
|
129a25c76d | ||
|
|
85076fc5ab | ||
|
|
a989c66b84 | ||
|
|
587a71f1d6 | ||
|
|
4ec47249bc | ||
|
|
cdf16c22ba | ||
|
|
985f19bc6b | ||
|
|
beec69cfe2 | ||
|
|
e88de49faa | ||
|
|
ca5a54113f | ||
|
|
97db651ce0 | ||
|
|
330fba41e2 | ||
|
|
18b60af27c | ||
|
|
43d5cc7fe1 | ||
|
|
700b7fd0a9 | ||
|
|
8515e62e6b | ||
|
|
f3bf5f2029 | ||
|
|
8371c897dc | ||
|
|
8dfeece878 | ||
|
|
0e5d0f7485 | ||
|
|
1fb9a8eed2 | ||
|
|
d610ead258 | ||
|
|
4f569e8485 | ||
|
|
60b9f685cb | ||
|
|
62ad8baa40 | ||
|
|
632177fa7f | ||
|
|
f80bbc0efb | ||
|
|
6eb1016301 | ||
|
|
4be50c5289 | ||
|
|
ad8bae3c2d | ||
|
|
c47d868d99 | ||
|
|
26453e7b67 | ||
|
|
db4afa6bd2 | ||
|
|
0a80164c94 | ||
|
|
0d2f348392 | ||
|
|
f480c1256d | ||
|
|
0de534b725 | ||
|
|
f9a5b96fd2 | ||
|
|
556ff27e2e | ||
|
|
d104b16b56 | ||
|
|
eb8faf1c89 | ||
|
|
cafae5b544 | ||
|
|
1d7ccd5325 | ||
|
|
3007db0b45 | ||
|
|
ae14b37431 | ||
|
|
686616a989 | ||
|
|
3d7063d4b0 | ||
|
|
f72af26305 | ||
|
|
a8015e217e | ||
|
|
3f42d10805 | ||
|
|
8ba2d2d5a0 | ||
|
|
5c02f88a81 | ||
|
|
f237849862 | ||
|
|
73de6ad522 | ||
|
|
17fc3e94c9 | ||
|
|
4aaf4661c3 | ||
|
|
5c337fd08a | ||
|
|
6a2e0f029a | ||
|
|
d1999cb234 | ||
|
|
5a73bbdb83 | ||
|
|
59e7a47c41 | ||
|
|
b0789cd299 | ||
|
|
465ce0e420 | ||
|
|
5f0dc57653 | ||
|
|
65b768fdf9 | ||
|
|
2dcfd16fbd | ||
|
|
2b2b461d39 | ||
|
|
913862be8c | ||
|
|
aa5c1b4c5d | ||
|
|
a5e4ca8390 | ||
|
|
6d22713722 | ||
|
|
d53fb0fda5 | ||
|
|
f003f77b8c | ||
|
|
f5574fb44c | ||
|
|
e5112b3ae3 | ||
|
|
7c5f00f868 | ||
|
|
a8a9c2bb45 | ||
|
|
a4bcc8c318 | ||
|
|
11a4a3c065 | ||
|
|
7e55ff1593 | ||
|
|
802e1d84cc | ||
|
|
fd3658b0e4 | ||
|
|
76a08210b6 | ||
|
|
086934136b | ||
|
|
97307af21a | ||
|
|
aecb1770d5 | ||
|
|
1601c1385a | ||
|
|
7153b822ed | ||
|
|
76fe5dfc67 | ||
|
|
d5d9289800 | ||
|
|
0af5ff49bd | ||
|
|
240767b29d | ||
|
|
92b199061a | ||
|
|
623e6eed5e | ||
|
|
7dbdada49f | ||
|
|
d1cdda88bd | ||
|
|
36eabb1c3c | ||
|
|
4c1a8be29d | ||
|
|
ccae5d99d2 | ||
|
|
e47811ef8f | ||
|
|
af76953448 | ||
|
|
4cd65e4f19 | ||
|
|
60052b618f | ||
|
|
b9a72d3c4d | ||
|
|
670b2c09ce | ||
|
|
d31256cd38 | ||
|
|
57fefd5f9a | ||
|
|
7b0f24fc21 | ||
|
|
4a7dcf8eb2 | ||
|
|
287b0c6da9 | ||
|
|
e0786c280e | ||
|
|
c77b1f5acd | ||
|
|
778845da05 | ||
|
|
2061359fcf | ||
|
|
0ae1e4a95a | ||
|
|
493a8579f1 | ||
|
|
4907c29904 | ||
|
|
47767609fe | ||
|
|
fd90ce2711 | ||
|
|
a257e469e1 | ||
|
|
95cb130f32 | ||
|
|
d45870be8d | ||
|
|
9e81112df2 | ||
|
|
486a73a9ce | ||
|
|
d31698b0e0 | ||
|
|
3a7bc16156 | ||
|
|
ee3d42bf3f | ||
|
|
4aec440682 | ||
|
|
0810a2d8bc | ||
|
|
03f12e142b | ||
|
|
2301d10f73 | ||
|
|
f58011ada5 | ||
|
|
f274c2199b | ||
|
|
fbd3b89488 | ||
|
|
ccc9e1da8d | ||
|
|
4902606bb6 | ||
|
|
2be50a1c9c | ||
|
|
bfce02971e | ||
|
|
afcb62b414 | ||
|
|
297b2b99de | ||
|
|
6686e4411d | ||
|
|
8d98aef055 | ||
|
|
abff8b24b9 | ||
|
|
b3e411e481 | ||
|
|
3e9263e1ca | ||
|
|
4feae6791c | ||
|
|
4659e3644f | ||
|
|
4a29474c83 | ||
|
|
9ed0e071fe | ||
|
|
a6e9ae9066 | ||
|
|
e07b141da0 | ||
|
|
5d8877a944 | ||
|
|
1c9af9833d | ||
|
|
3b35e962e2 | ||
|
|
931c0a954f | ||
|
|
66b9933b8d | ||
|
|
8b17f7f4eb | ||
|
|
ee87e20d53 | ||
|
|
924d06a075 | ||
|
|
3606b78108 | ||
|
|
ca90d4fd96 | ||
|
|
391ecffed9 | ||
|
|
02804821cc | ||
|
|
e5eda53e3d | ||
|
|
ef51c1ab5b | ||
|
|
b423a6b212 | ||
|
|
305492c375 | ||
|
|
2e36149ccd | ||
|
|
27d083c1b9 | ||
|
|
03829f2fea | ||
|
|
3d2f037a44 | ||
|
|
f2cbee9a04 | ||
|
|
1777413a2a | ||
|
|
3a7ebf9c36 | ||
|
|
9757c1aded | ||
|
|
3f7f194304 | ||
|
|
73bce9ec7e | ||
|
|
f76ccce5bc | ||
|
|
645c70f852 | ||
|
|
c0b23ac20d | ||
|
|
45f9ee263f | ||
|
|
29b5cf6a9d | ||
|
|
a53c495b3e | ||
|
|
4aa9255efa | ||
|
|
e8645ce9f9 | ||
|
|
278593c9a9 | ||
|
|
effd974b16 | ||
|
|
3701dcc5c1 | ||
|
|
e3bf76f9ec | ||
|
|
1551d7c00b | ||
|
|
14e7203e7b | ||
|
|
63c5bf2b9c | ||
|
|
3cba8dc304 | ||
|
|
d61c1ea69b | ||
|
|
14ef4aeafb | ||
|
|
b09ac154af | ||
|
|
d011a8a45c | ||
|
|
4009b63c42 | ||
|
|
004b9d83e3 | ||
|
|
af7484a332 | ||
|
|
2baa3debd5 | ||
|
|
3b2510374a | ||
|
|
eb8c667570 | ||
|
|
2f693be8f8 | ||
|
|
2404332c1b | ||
|
|
4565812032 | ||
|
|
93d9c50419 | ||
|
|
9244ac8592 | ||
|
|
481fb7640c | ||
|
|
b815f3a977 | ||
|
|
8a75847497 | ||
|
|
7e8e507bfb | ||
|
|
5668dcc7b9 | ||
|
|
aac3adb3c5 | ||
|
|
59681be0a0 | ||
|
|
2ed0cf06f9 | ||
|
|
c88ce84bb5 | ||
|
|
90517b5e85 | ||
|
|
60bd744c88 | ||
|
|
5eee2a88f8 | ||
|
|
e1ff83f4b0 | ||
|
|
927693a991 | ||
|
|
6de407b638 | ||
|
|
8de26efa66 | ||
|
|
866447a008 | ||
|
|
0bb897211d | ||
|
|
5e300cac2c | ||
|
|
7f629dfca4 | ||
|
|
b2baaa215b | ||
|
|
5afa7d1f87 | ||
|
|
30205e14b7 | ||
|
|
acb219be25 | ||
|
|
0c5a140a02 | ||
|
|
04c53d2393 | ||
|
|
970acffa8f | ||
|
|
7b4f727959 | ||
|
|
1a1114d21c | ||
|
|
4e73e4bf93 | ||
|
|
44e3640923 | ||
|
|
0080aca235 | ||
|
|
c5f7842234 | ||
|
|
79bd071373 | ||
|
|
c74bf6d889 | ||
|
|
30e9c091c0 | ||
|
|
73fe337647 | ||
|
|
d72ed35374 | ||
|
|
12cb30d4bd | ||
|
|
718feb0f69 | ||
|
|
73c8fe5deb | ||
|
|
f85f79f630 | ||
|
|
327b138b2c | ||
|
|
cae03a7ef5 | ||
|
|
d181a627f0 | ||
|
|
5ef2d1ddae | ||
|
|
77ea408983 | ||
|
|
6eb05c9ed0 | ||
|
|
bc98e93b53 | ||
|
|
b8a1de86fd | ||
|
|
b644384bb5 | ||
|
|
54210f706c | ||
|
|
f3bea3de5b | ||
|
|
4cf68be17a | ||
|
|
2149f214d5 | ||
|
|
f26b8c84f8 | ||
|
|
f2cf3c06a0 | ||
|
|
1582ac851f | ||
|
|
14e24a1297 | ||
|
|
a98f6c0254 | ||
|
|
8845334097 | ||
|
|
bb5a39c1a7 | ||
|
|
19b4dead25 | ||
|
|
14bc773199 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -30,14 +30,17 @@
|
|||||||
/examples/decode_with_partial_drops
|
/examples/decode_with_partial_drops
|
||||||
/examples/example_xma
|
/examples/example_xma
|
||||||
/examples/postproc
|
/examples/postproc
|
||||||
|
/examples/resize_util
|
||||||
/examples/set_maps
|
/examples/set_maps
|
||||||
/examples/simple_decoder
|
/examples/simple_decoder
|
||||||
/examples/simple_encoder
|
/examples/simple_encoder
|
||||||
/examples/twopass_encoder
|
/examples/twopass_encoder
|
||||||
/examples/vp8_multi_resolution_encoder
|
/examples/vp8_multi_resolution_encoder
|
||||||
/examples/vp8cx_set_ref
|
/examples/vp8cx_set_ref
|
||||||
|
/examples/vp9_lossless_encoder
|
||||||
/examples/vp9_spatial_scalable_encoder
|
/examples/vp9_spatial_scalable_encoder
|
||||||
/examples/vpx_temporal_scalable_patterns
|
/examples/vpx_temporal_scalable_patterns
|
||||||
|
/examples/vpx_temporal_svc_encoder
|
||||||
/ivfdec
|
/ivfdec
|
||||||
/ivfdec.dox
|
/ivfdec.dox
|
||||||
/ivfenc
|
/ivfenc
|
||||||
@@ -45,12 +48,14 @@
|
|||||||
/libvpx.so*
|
/libvpx.so*
|
||||||
/libvpx.ver
|
/libvpx.ver
|
||||||
/samples.dox
|
/samples.dox
|
||||||
|
/test_intra_pred_speed
|
||||||
/test_libvpx
|
/test_libvpx
|
||||||
/vp8_api1_migration.dox
|
/vp8_api1_migration.dox
|
||||||
/vp[89x]_rtcd.h
|
/vp[89x]_rtcd.h
|
||||||
/vpx.pc
|
/vpx.pc
|
||||||
/vpx_config.c
|
/vpx_config.c
|
||||||
/vpx_config.h
|
/vpx_config.h
|
||||||
|
/vpx_dsp_rtcd.h
|
||||||
/vpx_scale_rtcd.h
|
/vpx_scale_rtcd.h
|
||||||
/vpx_version.h
|
/vpx_version.h
|
||||||
/vpxdec
|
/vpxdec
|
||||||
|
|||||||
26
.mailmap
26
.mailmap
@@ -1,18 +1,32 @@
|
|||||||
Adrian Grange <agrange@google.com>
|
Adrian Grange <agrange@google.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>
|
||||||
|
Deb Mukherjee <debargha@google.com>
|
||||||
|
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@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>
|
||||||
John Koleszar <jkoleszar@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> <johannkoenig@dhcp-172-19-7-52.mtv.corp.google.com>
|
Johann Koenig <johannkoenig@google.com> <johann.koenig@gmail.com>
|
||||||
|
John Koleszar <jkoleszar@google.com>
|
||||||
|
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
||||||
|
Marco Paniconi <marpan@google.com>
|
||||||
|
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
|
||||||
Pascal Massimino <pascal.massimino@gmail.com>
|
Pascal Massimino <pascal.massimino@gmail.com>
|
||||||
|
Paul Wilkins <paulwilkins@google.com>
|
||||||
|
Ralph Giles <giles@xiph.org> <giles@entropywave.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> <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>
|
||||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
Tom Finegan <tomfinegan@google.com> <tomfinegan@chromium.org>
|
||||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
|
||||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
|
||||||
Deb Mukherjee <debargha@google.com>
|
|
||||||
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
||||||
|
|||||||
40
AUTHORS
40
AUTHORS
@@ -3,10 +3,11 @@
|
|||||||
|
|
||||||
Aaron Watry <awatry@gmail.com>
|
Aaron Watry <awatry@gmail.com>
|
||||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
Abo Talib Mahfoodh <ab.mahfoodh@gmail.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 <alex.converse@gmail.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>
|
||||||
@@ -14,44 +15,65 @@ A.Mahfoodh <ab.mahfoodh@gmail.com>
|
|||||||
Ami Fischman <fischman@chromium.org>
|
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>
|
||||||
|
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>
|
||||||
chm <chm@rock-chips.com>
|
chm <chm@rock-chips.com>
|
||||||
Christian Duvivier <cduvivier@google.com>
|
Christian Duvivier <cduvivier@google.com>
|
||||||
Daniel Kang <ddkang@google.com>
|
Daniel Kang <ddkang@google.com>
|
||||||
Deb Mukherjee <debargha@google.com>
|
Deb Mukherjee <debargha@google.com>
|
||||||
|
Dim Temp <dimtemp0@gmail.com>
|
||||||
Dmitry Kovalev <dkovalev@google.com>
|
Dmitry Kovalev <dkovalev@google.com>
|
||||||
Dragan Mrdjan <dmrdjan@mips.com>
|
Dragan Mrdjan <dmrdjan@mips.com>
|
||||||
Erik Niemeyer <erik.a.niemeyer@gmail.com>
|
Ed Baker <edward.baker@intel.com>
|
||||||
|
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
|
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
||||||
Fabio Pedretti <fabio.ped@libero.it>
|
Fabio Pedretti <fabio.ped@libero.it>
|
||||||
Frank Galligan <fgalligan@google.com>
|
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>
|
||||||
Guillaume Martres <gmartres@google.com>
|
Guillaume Martres <gmartres@google.com>
|
||||||
Guillermo Ballester Valor <gbvalor@gmail.com>
|
Guillermo Ballester Valor <gbvalor@gmail.com>
|
||||||
Hangyu Kuang <hkuang@google.com>
|
Hangyu Kuang <hkuang@google.com>
|
||||||
|
Hanno Böck <hanno@hboeck.de>
|
||||||
Henrik Lundin <hlundin@google.com>
|
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>
|
||||||
|
Jacky Chen <jackychen@google.com>
|
||||||
James Berry <jamesberry@google.com>
|
James Berry <jamesberry@google.com>
|
||||||
|
James Yu <james.yu@linaro.org>
|
||||||
James Zern <jzern@google.com>
|
James Zern <jzern@google.com>
|
||||||
|
Jan Gerber <j@mailb.org>
|
||||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
Janne Salonen <jsalonen@google.com>
|
Janne Salonen <jsalonen@google.com>
|
||||||
Jeff Faust <jfaust@google.com>
|
Jeff Faust <jfaust@google.com>
|
||||||
Jeff Muizelaar <jmuizelaar@mozilla.com>
|
Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||||
Jeff Petkau <jpet@chromium.org>
|
Jeff Petkau <jpet@chromium.org>
|
||||||
|
Jia Jia <jia.jia@linaro.org>
|
||||||
Jim Bankoski <jimbankoski@google.com>
|
Jim Bankoski <jimbankoski@google.com>
|
||||||
Jingning Han <jingning@google.com>
|
Jingning Han <jingning@google.com>
|
||||||
|
Joey Parrish <joeyparrish@google.com>
|
||||||
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>
|
||||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
||||||
Joshua Litt <joshualitt@google.com>
|
Joshua Litt <joshualitt@google.com>
|
||||||
|
Julia Robson <juliamrobson@gmail.com>
|
||||||
Justin Clift <justin@salasaga.org>
|
Justin Clift <justin@salasaga.org>
|
||||||
Justin Lebar <justin.lebar@gmail.com>
|
Justin Lebar <justin.lebar@gmail.com>
|
||||||
KO Myung-Hun <komh@chollian.net>
|
KO Myung-Hun <komh@chollian.net>
|
||||||
|
Lawrence Velázquez <larryv@macports.org>
|
||||||
Lou Quillio <louquillio@google.com>
|
Lou Quillio <louquillio@google.com>
|
||||||
Luca Barbato <lu_zero@gentoo.org>
|
Luca Barbato <lu_zero@gentoo.org>
|
||||||
Makoto Kato <makoto.kt@gmail.com>
|
Makoto Kato <makoto.kt@gmail.com>
|
||||||
@@ -65,36 +87,48 @@ Michael Kohler <michaelkohler@live.com>
|
|||||||
Mike Frysinger <vapier@chromium.org>
|
Mike Frysinger <vapier@chromium.org>
|
||||||
Mike Hommey <mhommey@mozilla.com>
|
Mike Hommey <mhommey@mozilla.com>
|
||||||
Mikhal Shemer <mikhal@google.com>
|
Mikhal Shemer <mikhal@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>
|
||||||
Paul Wilkins <paulwilkins@google.com>
|
Paul Wilkins <paulwilkins@google.com>
|
||||||
Pavol Rusnak <stick@gk2.sk>
|
Pavol Rusnak <stick@gk2.sk>
|
||||||
Paweł Hajdan <phajdan@google.com>
|
Paweł Hajdan <phajdan@google.com>
|
||||||
|
Pengchong Jin <pengchong@google.com>
|
||||||
|
Peter de Rivaz <peter.derivaz@gmail.com>
|
||||||
Philip Jägenstedt <philipj@opera.com>
|
Philip Jägenstedt <philipj@opera.com>
|
||||||
Priit Laes <plaes@plaes.org>
|
Priit Laes <plaes@plaes.org>
|
||||||
Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
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>
|
||||||
Sami Pietilä <samipietila@google.com>
|
Sami Pietilä <samipietila@google.com>
|
||||||
Scott Graham <scottmg@chromium.org>
|
Scott Graham <scottmg@chromium.org>
|
||||||
Scott LaVarnway <slavarnway@google.com>
|
Scott LaVarnway <slavarnway@google.com>
|
||||||
|
Sean McGovern <gseanmcg@gmail.com>
|
||||||
|
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>
|
||||||
Takanori MATSUURA <t.matsuu@gmail.com>
|
Takanori MATSUURA <t.matsuu@gmail.com>
|
||||||
Tamar Levy <tamar.levy@intel.com>
|
Tamar Levy <tamar.levy@intel.com>
|
||||||
|
Tao Bai <michaelbai@chromium.org>
|
||||||
Tero Rintaluoma <teror@google.com>
|
Tero Rintaluoma <teror@google.com>
|
||||||
Thijs Vermeir <thijsvermeir@gmail.com>
|
Thijs Vermeir <thijsvermeir@gmail.com>
|
||||||
|
Tim Kopp <tkopp@google.com>
|
||||||
Timothy B. Terriberry <tterribe@xiph.org>
|
Timothy B. Terriberry <tterribe@xiph.org>
|
||||||
Tom Finegan <tomfinegan@google.com>
|
Tom Finegan <tomfinegan@google.com>
|
||||||
Vignesh Venkatasubramanian <vigneshv@google.com>
|
Vignesh Venkatasubramanian <vigneshv@google.com>
|
||||||
Yaowu Xu <yaowu@google.com>
|
Yaowu Xu <yaowu@google.com>
|
||||||
|
Yongzhe Wang <yongzhe@google.com>
|
||||||
Yunqing Wang <yunqingwang@google.com>
|
Yunqing Wang <yunqingwang@google.com>
|
||||||
|
Zoe Liu <zoeliu@google.com>
|
||||||
Google Inc.
|
Google Inc.
|
||||||
The Mozilla Foundation
|
The Mozilla Foundation
|
||||||
The Xiph.Org Foundation
|
The Xiph.Org Foundation
|
||||||
|
|||||||
40
CHANGELOG
40
CHANGELOG
@@ -1,3 +1,43 @@
|
|||||||
|
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"
|
||||||
|
This release includes significant improvements to the VP9 codec.
|
||||||
|
|
||||||
|
- Upgrading:
|
||||||
|
This release is ABI incompatible with 1.3.0. It drops the compatibility
|
||||||
|
layer, requiring VPX_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
|
||||||
|
controls for VP9.
|
||||||
|
|
||||||
|
- Enhancements:
|
||||||
|
Faster VP9 encoding and decoding
|
||||||
|
Multithreaded VP9 decoding (tile and frame-based)
|
||||||
|
Multithreaded VP9 encoding - on by default
|
||||||
|
YUV 4:2:2 and 4:4:4 support in VP9
|
||||||
|
10 and 12bit support in VP9
|
||||||
|
64bit ARM support by replacing ARM assembly with intrinsics
|
||||||
|
|
||||||
|
- Bug Fixes:
|
||||||
|
Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0
|
||||||
|
files.
|
||||||
|
|
||||||
|
- Known Issues:
|
||||||
|
Frame Parallel decoding fails for segmented and non-420 files.
|
||||||
|
|
||||||
2013-11-15 v1.3.0 "Forest"
|
2013-11-15 v1.3.0 "Forest"
|
||||||
This release introduces the VP9 codec in a backward-compatible way.
|
This release introduces the VP9 codec in a backward-compatible way.
|
||||||
All existing users of VP8 can continue to use the library without
|
All existing users of VP8 can continue to use the library without
|
||||||
|
|||||||
2
PATENTS
2
PATENTS
@@ -17,7 +17,7 @@ or agree to the institution of patent litigation or any other patent
|
|||||||
enforcement activity against any entity (including a cross-claim or
|
enforcement activity against any entity (including a cross-claim or
|
||||||
counterclaim in a lawsuit) alleging that any of these implementations of WebM
|
counterclaim in a lawsuit) alleging that any of these implementations of WebM
|
||||||
or any code incorporated within any of these implementations of WebM
|
or any code incorporated within any of these implementations of WebM
|
||||||
constitutes direct or contributory patent infringement, or inducement of
|
constitute direct or contributory patent infringement, or inducement of
|
||||||
patent infringement, then any patent rights granted to you under this License
|
patent infringement, then any patent rights granted to you under this License
|
||||||
for these implementations of WebM shall terminate as of the date such
|
for these implementations of WebM shall terminate as of the date such
|
||||||
litigation is filed.
|
litigation is filed.
|
||||||
|
|||||||
20
README
20
README
@@ -1,4 +1,4 @@
|
|||||||
README - 30 May 2014
|
README - 23 March 2015
|
||||||
|
|
||||||
Welcome to the WebM VP8/VP9 Codec SDK!
|
Welcome to the WebM VP8/VP9 Codec SDK!
|
||||||
|
|
||||||
@@ -59,15 +59,10 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
|||||||
armv7-none-rvct
|
armv7-none-rvct
|
||||||
armv7-win32-vs11
|
armv7-win32-vs11
|
||||||
armv7-win32-vs12
|
armv7-win32-vs12
|
||||||
|
armv7-win32-vs14
|
||||||
armv7s-darwin-gcc
|
armv7s-darwin-gcc
|
||||||
mips32-linux-gcc
|
mips32-linux-gcc
|
||||||
mips64-linux-gcc
|
mips64-linux-gcc
|
||||||
ppc32-darwin8-gcc
|
|
||||||
ppc32-darwin9-gcc
|
|
||||||
ppc32-linux-gcc
|
|
||||||
ppc64-darwin8-gcc
|
|
||||||
ppc64-darwin9-gcc
|
|
||||||
ppc64-linux-gcc
|
|
||||||
sparc-solaris-gcc
|
sparc-solaris-gcc
|
||||||
x86-android-gcc
|
x86-android-gcc
|
||||||
x86-darwin8-gcc
|
x86-darwin8-gcc
|
||||||
@@ -78,6 +73,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
|||||||
x86-darwin11-gcc
|
x86-darwin11-gcc
|
||||||
x86-darwin12-gcc
|
x86-darwin12-gcc
|
||||||
x86-darwin13-gcc
|
x86-darwin13-gcc
|
||||||
|
x86-darwin14-gcc
|
||||||
x86-iphonesimulator-gcc
|
x86-iphonesimulator-gcc
|
||||||
x86-linux-gcc
|
x86-linux-gcc
|
||||||
x86-linux-icc
|
x86-linux-icc
|
||||||
@@ -90,11 +86,14 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
|||||||
x86-win32-vs10
|
x86-win32-vs10
|
||||||
x86-win32-vs11
|
x86-win32-vs11
|
||||||
x86-win32-vs12
|
x86-win32-vs12
|
||||||
|
x86-win32-vs14
|
||||||
|
x86_64-android-gcc
|
||||||
x86_64-darwin9-gcc
|
x86_64-darwin9-gcc
|
||||||
x86_64-darwin10-gcc
|
x86_64-darwin10-gcc
|
||||||
x86_64-darwin11-gcc
|
x86_64-darwin11-gcc
|
||||||
x86_64-darwin12-gcc
|
x86_64-darwin12-gcc
|
||||||
x86_64-darwin13-gcc
|
x86_64-darwin13-gcc
|
||||||
|
x86_64-darwin14-gcc
|
||||||
x86_64-iphonesimulator-gcc
|
x86_64-iphonesimulator-gcc
|
||||||
x86_64-linux-gcc
|
x86_64-linux-gcc
|
||||||
x86_64-linux-icc
|
x86_64-linux-icc
|
||||||
@@ -105,12 +104,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
|||||||
x86_64-win64-vs10
|
x86_64-win64-vs10
|
||||||
x86_64-win64-vs11
|
x86_64-win64-vs11
|
||||||
x86_64-win64-vs12
|
x86_64-win64-vs12
|
||||||
universal-darwin8-gcc
|
x86_64-win64-vs14
|
||||||
universal-darwin9-gcc
|
|
||||||
universal-darwin10-gcc
|
|
||||||
universal-darwin11-gcc
|
|
||||||
universal-darwin12-gcc
|
|
||||||
universal-darwin13-gcc
|
|
||||||
generic-gnu
|
generic-gnu
|
||||||
|
|
||||||
The generic-gnu target, in conjunction with the CROSS environment variable,
|
The generic-gnu target, in conjunction with the CROSS environment variable,
|
||||||
|
|||||||
4
args.c
4
args.c
@@ -14,9 +14,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#include "vpx_ports/msvc.h"
|
||||||
#define snprintf _snprintf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__
|
#if defined(__GNUC__) && __GNUC__
|
||||||
extern void die(const char *fmt, ...) __attribute__((noreturn));
|
extern void die(const char *fmt, ...) __attribute__((noreturn));
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
|||||||
LOCAL_ARM_MODE := arm
|
LOCAL_ARM_MODE := arm
|
||||||
else ifeq ($(TARGET_ARCH_ABI),x86)
|
else ifeq ($(TARGET_ARCH_ABI),x86)
|
||||||
include $(CONFIG_DIR)libs-x86-android-gcc.mk
|
include $(CONFIG_DIR)libs-x86-android-gcc.mk
|
||||||
|
else ifeq ($(TARGET_ARCH_ABI),x86_64)
|
||||||
|
include $(CONFIG_DIR)libs-x86_64-android-gcc.mk
|
||||||
else ifeq ($(TARGET_ARCH_ABI),mips)
|
else ifeq ($(TARGET_ARCH_ABI),mips)
|
||||||
include $(CONFIG_DIR)libs-mips-android-gcc.mk
|
include $(CONFIG_DIR)libs-mips-android-gcc.mk
|
||||||
else
|
else
|
||||||
@@ -158,24 +160,32 @@ LOCAL_CFLAGS += \
|
|||||||
|
|
||||||
LOCAL_MODULE := libvpx
|
LOCAL_MODULE := libvpx
|
||||||
|
|
||||||
LOCAL_LDLIBS := -llog
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
||||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Add a dependency to force generation of the RTCD files.
|
# Add a dependency to force generation of the RTCD files.
|
||||||
|
define rtcd_dep_template
|
||||||
|
rtcd_dep_template_SRCS := $(addprefix $(LOCAL_PATH)/, $(LOCAL_SRC_FILES))
|
||||||
|
rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=)
|
||||||
ifeq ($(CONFIG_VP8), yes)
|
ifeq ($(CONFIG_VP8), yes)
|
||||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp8_rtcd.h
|
$$(rtcd_dep_template_SRCS): vp8_rtcd.h
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_VP9), yes)
|
ifeq ($(CONFIG_VP9), yes)
|
||||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp9_rtcd.h
|
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
|
||||||
endif
|
endif
|
||||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_scale_rtcd.h
|
ifeq ($(CONFIG_VP10), yes)
|
||||||
|
$$(rtcd_dep_template_SRCS): vp10_rtcd.h
|
||||||
|
endif
|
||||||
|
$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h
|
||||||
|
$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
ifneq ($(findstring $(TARGET_ARCH_ABI),x86 x86_64),)
|
||||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_config.asm
|
$$(rtcd_dep_template_SRCS): vpx_config.asm
|
||||||
endif
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call rtcd_dep_template))
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@@ -184,7 +194,11 @@ clean:
|
|||||||
@$(RM) -r $(ASM_CNV_PATH)
|
@$(RM) -r $(ASM_CNV_PATH)
|
||||||
@$(RM) $(CLEAN-OBJS)
|
@$(RM) $(CLEAN-OBJS)
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
ifeq ($(ENABLE_SHARED),1)
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
else
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
||||||
$(call import-module,cpufeatures)
|
$(call import-module,cpufeatures)
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ clean:: .DEFAULT
|
|||||||
exampletest: .DEFAULT
|
exampletest: .DEFAULT
|
||||||
install:: .DEFAULT
|
install:: .DEFAULT
|
||||||
test:: .DEFAULT
|
test:: .DEFAULT
|
||||||
|
test-no-data-check:: .DEFAULT
|
||||||
testdata:: .DEFAULT
|
testdata:: .DEFAULT
|
||||||
utiltest: .DEFAULT
|
utiltest: .DEFAULT
|
||||||
|
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
|
||||||
|
|
||||||
|
|
||||||
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
|
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
|
||||||
@@ -56,13 +58,10 @@ dist:
|
|||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Since we invoke make recursively for multiple targets we need to include the
|
||||||
|
# .mk file for the correct target, but only when $(target) is non-empty.
|
||||||
ifneq ($(target),)
|
ifneq ($(target),)
|
||||||
# Normally, we want to build the filename from the target and the toolchain.
|
include $(target)-$(TOOLCHAIN).mk
|
||||||
# This disambiguates from the $(target).mk file that exists in the source tree.
|
|
||||||
# However, the toolchain is part of the target in universal builds, so we
|
|
||||||
# don't want to include TOOLCHAIN in that case. FAT_ARCHS is used to test
|
|
||||||
# if we're in the universal case.
|
|
||||||
include $(target)$(if $(FAT_ARCHS),,-$(TOOLCHAIN)).mk
|
|
||||||
endif
|
endif
|
||||||
BUILD_ROOT?=.
|
BUILD_ROOT?=.
|
||||||
VPATH=$(SRC_PATH_BARE)
|
VPATH=$(SRC_PATH_BARE)
|
||||||
@@ -116,6 +115,9 @@ test::
|
|||||||
testdata::
|
testdata::
|
||||||
.PHONY: utiltest
|
.PHONY: utiltest
|
||||||
utiltest:
|
utiltest:
|
||||||
|
.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check
|
||||||
|
test-no-data-check::
|
||||||
|
exampletest-no-data-check utiltest-no-data-check:
|
||||||
|
|
||||||
# Add compiler flags for intrinsic files
|
# Add compiler flags for intrinsic files
|
||||||
ifeq ($(TOOLCHAIN), x86-os2-gcc)
|
ifeq ($(TOOLCHAIN), x86-os2-gcc)
|
||||||
@@ -138,6 +140,8 @@ $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN)
|
|||||||
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
|
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
|
||||||
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
|
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
|
||||||
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
|
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
|
||||||
|
$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN)
|
||||||
|
$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN)
|
||||||
|
|
||||||
$(BUILD_PFX)%.c.d: %.c
|
$(BUILD_PFX)%.c.d: %.c
|
||||||
$(if $(quiet),@echo " [DEP] $@")
|
$(if $(quiet),@echo " [DEP] $@")
|
||||||
@@ -283,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
|
||||||
@@ -313,18 +317,15 @@ $(1):
|
|||||||
$$(filter %.o,$$^) $$(extralibs)
|
$$(filter %.o,$$^) $$(extralibs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define dll_template
|
||||||
|
# Not using a pattern rule here because we don't want to generate empty
|
||||||
define lipo_lib_template
|
# archives when they are listed as a dependency in files not responsible
|
||||||
$(1): $(addsuffix /$(1),$(FAT_ARCHS))
|
# for creating them.
|
||||||
$(if $(quiet),@echo " [LIPO] $$@")
|
$(1):
|
||||||
$(qexec)libtool -static -o $$@ $$?
|
$(if $(quiet),@echo " [LD] $$@")
|
||||||
endef
|
$(qexec)$$(LD) -Zdll $$(LDFLAGS) \
|
||||||
|
-o $$@ \
|
||||||
define lipo_bin_template
|
$$(filter %.o,$$^) $$(extralibs) $$(EXPORTS_FILE)
|
||||||
$(1): $(addsuffix /$(1),$(FAT_ARCHS))
|
|
||||||
$(if $(quiet),@echo " [LIPO] $$@")
|
|
||||||
$(qexec)lipo -output $$@ -create $$?
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
@@ -383,8 +384,9 @@ LIBS=$(call enabled,LIBS)
|
|||||||
.libs: $(LIBS)
|
.libs: $(LIBS)
|
||||||
@touch $@
|
@touch $@
|
||||||
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
|
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
|
||||||
$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
|
$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
|
||||||
$(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
|
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
|
||||||
|
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
|
||||||
|
|
||||||
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
|
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
|
||||||
ifeq ($(MAKECMDGOALS),dist)
|
ifeq ($(MAKECMDGOALS),dist)
|
||||||
|
|||||||
@@ -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 "$@"
|
||||||
@@ -390,7 +403,7 @@ write_common_config_banner() {
|
|||||||
write_common_config_targets() {
|
write_common_config_targets() {
|
||||||
for t in ${all_targets}; do
|
for t in ${all_targets}; do
|
||||||
if enabled ${t}; then
|
if enabled ${t}; then
|
||||||
if enabled universal || enabled child; then
|
if enabled child; then
|
||||||
fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}"
|
fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}"
|
||||||
else
|
else
|
||||||
fwrite config.mk "ALL_TARGETS += ${t}"
|
fwrite config.mk "ALL_TARGETS += ${t}"
|
||||||
@@ -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,6 +633,11 @@ 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)}"
|
||||||
@@ -640,12 +661,6 @@ process_common_toolchain() {
|
|||||||
*i[3456]86*)
|
*i[3456]86*)
|
||||||
tgt_isa=x86
|
tgt_isa=x86
|
||||||
;;
|
;;
|
||||||
*powerpc64*)
|
|
||||||
tgt_isa=ppc64
|
|
||||||
;;
|
|
||||||
*powerpc*)
|
|
||||||
tgt_isa=ppc32
|
|
||||||
;;
|
|
||||||
*sparc*)
|
*sparc*)
|
||||||
tgt_isa=sparc
|
tgt_isa=sparc
|
||||||
;;
|
;;
|
||||||
@@ -653,14 +668,6 @@ process_common_toolchain() {
|
|||||||
|
|
||||||
# detect tgt_os
|
# detect tgt_os
|
||||||
case "$gcctarget" in
|
case "$gcctarget" in
|
||||||
*darwin8*)
|
|
||||||
tgt_isa=universal
|
|
||||||
tgt_os=darwin8
|
|
||||||
;;
|
|
||||||
*darwin9*)
|
|
||||||
tgt_isa=universal
|
|
||||||
tgt_os=darwin9
|
|
||||||
;;
|
|
||||||
*darwin10*)
|
*darwin10*)
|
||||||
tgt_isa=x86_64
|
tgt_isa=x86_64
|
||||||
tgt_os=darwin10
|
tgt_os=darwin10
|
||||||
@@ -681,6 +688,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
|
||||||
;;
|
;;
|
||||||
@@ -742,7 +753,15 @@ process_common_toolchain() {
|
|||||||
# Handle darwin variants. Newer SDKs allow targeting older
|
# Handle darwin variants. Newer SDKs allow targeting older
|
||||||
# platforms, so use the newest one available.
|
# platforms, so use the newest one available.
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
*-darwin*)
|
arm*-darwin*)
|
||||||
|
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||||
|
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||||
|
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||||
|
add_cflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
|
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
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}"
|
||||||
@@ -780,6 +799,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}"
|
||||||
@@ -795,7 +818,6 @@ process_common_toolchain() {
|
|||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
sparc-solaris-*)
|
sparc-solaris-*)
|
||||||
add_extralibs -lposix4
|
add_extralibs -lposix4
|
||||||
disable_feature fast_unaligned
|
|
||||||
;;
|
;;
|
||||||
*-solaris-*)
|
*-solaris-*)
|
||||||
add_extralibs -lposix4
|
add_extralibs -lposix4
|
||||||
@@ -818,12 +840,36 @@ process_common_toolchain() {
|
|||||||
if disabled neon && enabled neon_asm; then
|
if disabled neon && enabled neon_asm; then
|
||||||
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
|
||||||
|
# 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*)
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
soft_enable media
|
soft_enable media
|
||||||
soft_enable fast_unaligned
|
else
|
||||||
|
soft_disable media
|
||||||
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media "
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
soft_enable media
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
armv6)
|
armv6)
|
||||||
|
case ${toolchain} in
|
||||||
|
*-darwin*)
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
soft_enable media
|
soft_enable media
|
||||||
soft_enable fast_unaligned
|
else
|
||||||
|
die "Your iOS SDK does not support armv6."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
soft_enable media
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -941,8 +987,10 @@ EOF
|
|||||||
awk '{ print $1 }' | tail -1`
|
awk '{ print $1 }' | tail -1`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d "${alt_libc}" ]; then
|
||||||
add_cflags "--sysroot=${alt_libc}"
|
add_cflags "--sysroot=${alt_libc}"
|
||||||
add_ldflags "--sysroot=${alt_libc}"
|
add_ldflags "--sysroot=${alt_libc}"
|
||||||
|
fi
|
||||||
|
|
||||||
# linker flag that routes around a CPU bug in some
|
# linker flag that routes around a CPU bug in some
|
||||||
# Cortex-A8 implementations (NDK Dev Guide)
|
# Cortex-A8 implementations (NDK Dev Guide)
|
||||||
@@ -1006,6 +1054,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*)
|
||||||
@@ -1039,30 +1093,32 @@ EOF
|
|||||||
tune_cflags="-mtune="
|
tune_cflags="-mtune="
|
||||||
if enabled dspr2; then
|
if enabled dspr2; then
|
||||||
check_add_cflags -mips32r2 -mdspr2
|
check_add_cflags -mips32r2 -mdspr2
|
||||||
disable_feature fast_unaligned
|
fi
|
||||||
|
|
||||||
|
if enabled runtime_cpu_detect; then
|
||||||
|
disable_feature runtime_cpu_detect
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${tune_cpu}" ]; then
|
if [ -n "${tune_cpu}" ]; then
|
||||||
case ${tune_cpu} in
|
case ${tune_cpu} in
|
||||||
p5600)
|
p5600)
|
||||||
add_cflags -mips32r5 -funroll-loops -mload-store-pairs
|
check_add_cflags -mips32r5 -funroll-loops -mload-store-pairs
|
||||||
add_cflags -msched-weight -mhard-float
|
check_add_cflags -msched-weight -mhard-float -mfp64
|
||||||
add_asflags -mips32r5 -mhard-float
|
check_add_asflags -mips32r5 -mhard-float -mfp64
|
||||||
|
check_add_ldflags -mfp64
|
||||||
;;
|
;;
|
||||||
i6400)
|
i6400)
|
||||||
add_cflags -mips64r6 -mabi=64 -funroll-loops -mload-store-pairs
|
check_add_cflags -mips64r6 -mabi=64 -funroll-loops -msched-weight
|
||||||
add_cflags -msched-weight -mhard-float
|
check_add_cflags -mload-store-pairs -mhard-float -mfp64
|
||||||
add_asflags -mips64r6 -mabi=64 -mhard-float
|
check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64
|
||||||
add_ldflags -mips64r6 -mabi=64
|
check_add_ldflags -mips64r6 -mabi=64 -mfp64
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if enabled msa; then
|
if enabled msa; then
|
||||||
add_cflags -mmsa -mfp64 -flax-vector-conversions
|
add_cflags -mmsa
|
||||||
add_asflags -mmsa -mfp64 -flax-vector-conversions
|
add_asflags -mmsa
|
||||||
add_ldflags -mmsa -mfp64 -flax-vector-conversions
|
add_ldflags -mmsa
|
||||||
|
|
||||||
disable_feature fast_unaligned
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1070,29 +1126,6 @@ EOF
|
|||||||
check_add_asflags -march=${tgt_isa}
|
check_add_asflags -march=${tgt_isa}
|
||||||
check_add_asflags -KPIC
|
check_add_asflags -KPIC
|
||||||
;;
|
;;
|
||||||
ppc*)
|
|
||||||
enable_feature ppc
|
|
||||||
bits=${tgt_isa##ppc}
|
|
||||||
link_with_cc=gcc
|
|
||||||
setup_gnu_toolchain
|
|
||||||
add_asflags -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
|
|
||||||
soft_enable altivec
|
|
||||||
enabled altivec && add_cflags -maltivec
|
|
||||||
|
|
||||||
case "$tgt_os" in
|
|
||||||
linux*)
|
|
||||||
add_asflags -maltivec -mregnames -I"\$(dir \$<)linux"
|
|
||||||
;;
|
|
||||||
darwin*)
|
|
||||||
darwin_arch="-arch ppc"
|
|
||||||
enabled ppc64 && darwin_arch="${darwin_arch}64"
|
|
||||||
add_cflags ${darwin_arch} -m${bits} -fasm-blocks
|
|
||||||
add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwin"
|
|
||||||
add_ldflags ${darwin_arch} -m${bits}
|
|
||||||
enabled altivec && add_cflags -faltivec
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
x86*)
|
x86*)
|
||||||
case ${tgt_os} in
|
case ${tgt_os} in
|
||||||
win*)
|
win*)
|
||||||
@@ -1105,7 +1138,9 @@ EOF
|
|||||||
CROSS=${CROSS:-g}
|
CROSS=${CROSS:-g}
|
||||||
;;
|
;;
|
||||||
os2)
|
os2)
|
||||||
|
disable_feature pic
|
||||||
AS=${AS:-nasm}
|
AS=${AS:-nasm}
|
||||||
|
add_ldflags -Zhigh-mem
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -1173,15 +1208,24 @@ EOF
|
|||||||
soft_enable runtime_cpu_detect
|
soft_enable runtime_cpu_detect
|
||||||
# We can't use 'check_cflags' until the compiler is configured and CC is
|
# We can't use 'check_cflags' until the compiler is configured and CC is
|
||||||
# populated.
|
# populated.
|
||||||
check_gcc_machine_option mmx
|
for ext in ${ARCH_EXT_LIST_X86}; do
|
||||||
check_gcc_machine_option sse
|
# disable higher order extensions to simplify asm dependencies
|
||||||
check_gcc_machine_option sse2
|
if [ "$disable_exts" = "yes" ]; then
|
||||||
check_gcc_machine_option sse3
|
if ! disabled $ext; then
|
||||||
check_gcc_machine_option ssse3
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} "
|
||||||
check_gcc_machine_option sse4 sse4_1
|
disable_feature $ext
|
||||||
check_gcc_machine_option avx
|
fi
|
||||||
check_gcc_machine_option avx2
|
elif disabled $ext; then
|
||||||
|
disable_exts="yes"
|
||||||
|
else
|
||||||
|
# use the shortened version for the flag: sse4_1 -> sse4
|
||||||
|
check_gcc_machine_option ${ext%_*} $ext
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if enabled external_build; then
|
||||||
|
log_echo " skipping assembler detection"
|
||||||
|
else
|
||||||
case "${AS}" in
|
case "${AS}" in
|
||||||
auto|"")
|
auto|"")
|
||||||
which nasm >/dev/null 2>&1 && AS=nasm
|
which nasm >/dev/null 2>&1 && AS=nasm
|
||||||
@@ -1195,10 +1239,12 @@ EOF
|
|||||||
&& AS=""
|
&& AS=""
|
||||||
fi
|
fi
|
||||||
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
||||||
&& die "Neither yasm nor nasm have been found"
|
&& die "Neither yasm nor nasm have been found." \
|
||||||
|
"See the prerequisites section in the README for more info."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
log_echo " using $AS"
|
log_echo " using $AS"
|
||||||
|
fi
|
||||||
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
||||||
AS_SFX=.asm
|
AS_SFX=.asm
|
||||||
case ${tgt_os} in
|
case ${tgt_os} in
|
||||||
@@ -1234,6 +1280,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
|
||||||
@@ -1245,7 +1298,7 @@ EOF
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
universal*|*-gcc|generic-gnu)
|
*-gcc|generic-gnu)
|
||||||
link_with_cc=gcc
|
link_with_cc=gcc
|
||||||
enable_feature gcc
|
enable_feature gcc
|
||||||
setup_gnu_toolchain
|
setup_gnu_toolchain
|
||||||
@@ -1329,11 +1382,15 @@ EOF
|
|||||||
# only for MIPS platforms
|
# only for MIPS platforms
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
mips*)
|
mips*)
|
||||||
if enabled dspr2; then
|
|
||||||
if enabled big_endian; then
|
if enabled big_endian; then
|
||||||
|
if enabled dspr2; then
|
||||||
echo "dspr2 optimizations are available only for little endian platforms"
|
echo "dspr2 optimizations are available only for little endian platforms"
|
||||||
disable_feature dspr2
|
disable_feature dspr2
|
||||||
fi
|
fi
|
||||||
|
if enabled msa; then
|
||||||
|
echo "msa optimizations are available only for little endian platforms"
|
||||||
|
disable_feature msa
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1343,12 +1400,6 @@ EOF
|
|||||||
add_cflags -D_LARGEFILE_SOURCE
|
add_cflags -D_LARGEFILE_SOURCE
|
||||||
add_cflags -D_FILE_OFFSET_BITS=64
|
add_cflags -D_FILE_OFFSET_BITS=64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# append any user defined extra cflags
|
|
||||||
if [ -n "${extra_cflags}" ] ; then
|
|
||||||
check_add_cflags ${extra_cflags} || \
|
|
||||||
die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process_toolchain() {
|
process_toolchain() {
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ generate_filter() {
|
|||||||
open_tag File RelativePath="$f"
|
open_tag File RelativePath="$f"
|
||||||
|
|
||||||
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
|
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
|
||||||
|
# Avoid object file name collisions, i.e. vpx_config.c and
|
||||||
|
# vpx_config.asm produce the same object file without
|
||||||
|
# this additional suffix.
|
||||||
|
objf=${objf%.obj}_asm.obj
|
||||||
for plat in "${platforms[@]}"; do
|
for plat in "${platforms[@]}"; do
|
||||||
for cfg in Debug Release; do
|
for cfg in Debug Release; do
|
||||||
open_tag FileConfiguration \
|
open_tag FileConfiguration \
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ show_help() {
|
|||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: ${self_basename} [options] file1 [file2 ...]
|
Usage: ${self_basename} [options] file1 [file2 ...]
|
||||||
|
|
||||||
This script generates a Visual Studio 2005 solution file from a list of project
|
This script generates a Visual Studio solution file from a list of project
|
||||||
files.
|
files.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print this message
|
--help Print this message
|
||||||
--out=outfile Redirect output to a file
|
--out=outfile Redirect output to a file
|
||||||
--ver=version Version (7,8,9,10,11) of visual studio to generate for
|
--ver=version Version (7,8,9,10,11,12,14) of visual studio to generate for
|
||||||
--target=isa-os-cc Target specifier
|
--target=isa-os-cc Target specifier
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@@ -255,7 +255,7 @@ for opt in "$@"; do
|
|||||||
;;
|
;;
|
||||||
--ver=*) vs_ver="$optval"
|
--ver=*) vs_ver="$optval"
|
||||||
case $optval in
|
case $optval in
|
||||||
[789]|10|11|12)
|
[789]|10|11|12|14)
|
||||||
;;
|
;;
|
||||||
*) die Unrecognized Visual Studio Version in $opt
|
*) die Unrecognized Visual Studio Version in $opt
|
||||||
;;
|
;;
|
||||||
@@ -300,12 +300,15 @@ case "${vs_ver:-8}" in
|
|||||||
12) sln_vers="12.00"
|
12) sln_vers="12.00"
|
||||||
sln_vers_str="Visual Studio 2013"
|
sln_vers_str="Visual Studio 2013"
|
||||||
;;
|
;;
|
||||||
|
14) sln_vers="14.00"
|
||||||
|
sln_vers_str="Visual Studio 2015"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
case "${vs_ver:-8}" in
|
case "${vs_ver:-8}" in
|
||||||
[789])
|
[789])
|
||||||
sfx=vcproj
|
sfx=vcproj
|
||||||
;;
|
;;
|
||||||
10|11|12)
|
10|11|12|14)
|
||||||
sfx=vcxproj
|
sfx=vcxproj
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Options:
|
|||||||
--name=project_name Name of the project (required)
|
--name=project_name Name of the project (required)
|
||||||
--proj-guid=GUID GUID to use for the project
|
--proj-guid=GUID GUID to use for the project
|
||||||
--module-def=filename File containing export definitions (for DLLs)
|
--module-def=filename File containing export definitions (for DLLs)
|
||||||
--ver=version Version (10,11,12) of visual studio to generate for
|
--ver=version Version (10,11,12,14) of visual studio to generate for
|
||||||
--src-path-bare=dir Path to root of source tree
|
--src-path-bare=dir Path to root of source tree
|
||||||
-Ipath/to/include Additional include directories
|
-Ipath/to/include Additional include directories
|
||||||
-DFLAG[=value] Preprocessor macros to define
|
-DFLAG[=value] Preprocessor macros to define
|
||||||
@@ -168,7 +168,7 @@ for opt in "$@"; do
|
|||||||
--ver=*)
|
--ver=*)
|
||||||
vs_ver="$optval"
|
vs_ver="$optval"
|
||||||
case "$optval" in
|
case "$optval" in
|
||||||
10|11|12)
|
10|11|12|14)
|
||||||
;;
|
;;
|
||||||
*) die Unrecognized Visual Studio Version in $opt
|
*) die Unrecognized Visual Studio Version in $opt
|
||||||
;;
|
;;
|
||||||
@@ -218,7 +218,7 @@ guid=${guid:-`generate_uuid`}
|
|||||||
asm_use_custom_step=false
|
asm_use_custom_step=false
|
||||||
uses_asm=${uses_asm:-false}
|
uses_asm=${uses_asm:-false}
|
||||||
case "${vs_ver:-11}" in
|
case "${vs_ver:-11}" in
|
||||||
10|11|12)
|
10|11|12|14)
|
||||||
asm_use_custom_step=$uses_asm
|
asm_use_custom_step=$uses_asm
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -263,8 +263,8 @@ case "$target" in
|
|||||||
;;
|
;;
|
||||||
arm*)
|
arm*)
|
||||||
platforms[0]="ARM"
|
platforms[0]="ARM"
|
||||||
asm_Debug_cmdline="armasm -nologo "%(FullPath)""
|
asm_Debug_cmdline="armasm -nologo -oldit "%(FullPath)""
|
||||||
asm_Release_cmdline="armasm -nologo "%(FullPath)""
|
asm_Release_cmdline="armasm -nologo -oldit "%(FullPath)""
|
||||||
;;
|
;;
|
||||||
*) die "Unsupported target $target!"
|
*) die "Unsupported target $target!"
|
||||||
;;
|
;;
|
||||||
@@ -344,6 +344,9 @@ generate_vcxproj() {
|
|||||||
# has to enable AppContainerApplication as well.
|
# has to enable AppContainerApplication as well.
|
||||||
tag_content PlatformToolset v120
|
tag_content PlatformToolset v120
|
||||||
fi
|
fi
|
||||||
|
if [ "$vs_ver" = "14" ]; then
|
||||||
|
tag_content PlatformToolset v140
|
||||||
|
fi
|
||||||
tag_content CharacterSet Unicode
|
tag_content CharacterSet Unicode
|
||||||
if [ "$config" = "Release" ]; then
|
if [ "$config" = "Release" ]; then
|
||||||
tag_content WholeProgramOptimization true
|
tag_content WholeProgramOptimization true
|
||||||
|
|||||||
@@ -25,31 +25,42 @@ CONFIGURE_ARGS="--disable-docs
|
|||||||
DIST_DIR="_dist"
|
DIST_DIR="_dist"
|
||||||
FRAMEWORK_DIR="VPX.framework"
|
FRAMEWORK_DIR="VPX.framework"
|
||||||
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}***"
|
||||||
@@ -189,16 +200,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 +251,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
|
||||||
;;
|
;;
|
||||||
@@ -260,15 +286,17 @@ cat << EOF
|
|||||||
EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS}
|
EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS}
|
||||||
FRAMEWORK_DIR=${FRAMEWORK_DIR}
|
FRAMEWORK_DIR=${FRAMEWORK_DIR}
|
||||||
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}
|
||||||
|
|||||||
@@ -319,13 +319,14 @@ EOF
|
|||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
void vpx_dsputil_static_init();
|
||||||
#if CONFIG_VP8
|
#if CONFIG_VP8
|
||||||
void dsputil_static_init();
|
void dsputil_static_init();
|
||||||
dsputil_static_init();
|
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP9
|
|
||||||
void vp9_dsputil_static_init();
|
vpx_dsputil_static_init();
|
||||||
vp9_dsputil_static_init();
|
#if CONFIG_VP8
|
||||||
|
dsputil_static_init();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
4
codereview.settings
Normal file
4
codereview.settings
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# This file is used by gcl to get repository specific information.
|
||||||
|
GERRIT_HOST: chromium-review.googlesource.com
|
||||||
|
GERRIT_PORT: 29418
|
||||||
|
CODE_REVIEW_SERVER: chromium-review.googlesource.com
|
||||||
185
configure
vendored
185
configure
vendored
@@ -31,18 +31,16 @@ Advanced options:
|
|||||||
--size-limit=WxH max size to allow in the decoder
|
--size-limit=WxH max size to allow in the decoder
|
||||||
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
|
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
|
||||||
--sdk-path=PATH path to root of sdk (android builds only)
|
--sdk-path=PATH path to root of sdk (android builds only)
|
||||||
${toggle_fast_unaligned} don't use unaligned accesses, even when
|
|
||||||
supported by hardware [auto]
|
|
||||||
${toggle_codec_srcs} in/exclude codec library source code
|
${toggle_codec_srcs} in/exclude codec library source code
|
||||||
${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_vpx_highbitdepth} use VP9 high bit depth (10/12) profiles
|
||||||
${toggle_vp8} VP8 codec support
|
${toggle_better_hw_compatibility}
|
||||||
${toggle_vp9} VP9 codec support
|
enable encoder to produce streams with better
|
||||||
|
hardware decoder compatibility
|
||||||
|
${toggle_vp10} VP10 codec support
|
||||||
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
||||||
${toggle_mem_tracker} track memory usage
|
|
||||||
${toggle_postproc} postprocessing
|
${toggle_postproc} postprocessing
|
||||||
${toggle_vp9_postproc} vp9 specific postprocessing
|
|
||||||
${toggle_multithread} multithreaded encoding and decoding
|
${toggle_multithread} multithreaded encoding and decoding
|
||||||
${toggle_spatial_resampling} spatial sampling (scaling) support
|
${toggle_spatial_resampling} spatial sampling (scaling) support
|
||||||
${toggle_realtime_only} enable this option while building for real-time encoding
|
${toggle_realtime_only} enable this option while building for real-time encoding
|
||||||
@@ -58,8 +56,6 @@ Advanced options:
|
|||||||
${toggle_postproc_visualizer} macro block / block level visualizers
|
${toggle_postproc_visualizer} macro block / block level visualizers
|
||||||
${toggle_multi_res_encoding} enable multiple-resolution encoding
|
${toggle_multi_res_encoding} enable multiple-resolution encoding
|
||||||
${toggle_temporal_denoising} enable temporal denoising and disable the spatial denoiser
|
${toggle_temporal_denoising} enable temporal denoising and disable the spatial denoiser
|
||||||
${toggle_vp9_temporal_denoising}
|
|
||||||
enable vp9 temporal denoising
|
|
||||||
${toggle_webm_io} enable input from and output to WebM container
|
${toggle_webm_io} enable input from and output to WebM container
|
||||||
${toggle_libyuv} enable libyuv
|
${toggle_libyuv} enable libyuv
|
||||||
|
|
||||||
@@ -109,15 +105,10 @@ all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8
|
|||||||
all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
|
all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
|
||||||
all_platforms="${all_platforms} armv7-win32-vs11"
|
all_platforms="${all_platforms} armv7-win32-vs11"
|
||||||
all_platforms="${all_platforms} armv7-win32-vs12"
|
all_platforms="${all_platforms} armv7-win32-vs12"
|
||||||
|
all_platforms="${all_platforms} armv7-win32-vs14"
|
||||||
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
||||||
all_platforms="${all_platforms} mips32-linux-gcc"
|
all_platforms="${all_platforms} mips32-linux-gcc"
|
||||||
all_platforms="${all_platforms} mips64-linux-gcc"
|
all_platforms="${all_platforms} mips64-linux-gcc"
|
||||||
all_platforms="${all_platforms} ppc32-darwin8-gcc"
|
|
||||||
all_platforms="${all_platforms} ppc32-darwin9-gcc"
|
|
||||||
all_platforms="${all_platforms} ppc32-linux-gcc"
|
|
||||||
all_platforms="${all_platforms} ppc64-darwin8-gcc"
|
|
||||||
all_platforms="${all_platforms} ppc64-darwin9-gcc"
|
|
||||||
all_platforms="${all_platforms} ppc64-linux-gcc"
|
|
||||||
all_platforms="${all_platforms} sparc-solaris-gcc"
|
all_platforms="${all_platforms} sparc-solaris-gcc"
|
||||||
all_platforms="${all_platforms} x86-android-gcc"
|
all_platforms="${all_platforms} x86-android-gcc"
|
||||||
all_platforms="${all_platforms} x86-darwin8-gcc"
|
all_platforms="${all_platforms} x86-darwin8-gcc"
|
||||||
@@ -129,6 +120,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"
|
||||||
@@ -141,12 +133,15 @@ all_platforms="${all_platforms} x86-win32-vs9"
|
|||||||
all_platforms="${all_platforms} x86-win32-vs10"
|
all_platforms="${all_platforms} x86-win32-vs10"
|
||||||
all_platforms="${all_platforms} x86-win32-vs11"
|
all_platforms="${all_platforms} x86-win32-vs11"
|
||||||
all_platforms="${all_platforms} x86-win32-vs12"
|
all_platforms="${all_platforms} x86-win32-vs12"
|
||||||
|
all_platforms="${all_platforms} x86-win32-vs14"
|
||||||
|
all_platforms="${all_platforms} x86_64-android-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-darwin9-gcc"
|
all_platforms="${all_platforms} x86_64-darwin9-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-darwin10-gcc"
|
all_platforms="${all_platforms} x86_64-darwin10-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-darwin11-gcc"
|
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"
|
||||||
@@ -157,13 +152,7 @@ all_platforms="${all_platforms} x86_64-win64-vs9"
|
|||||||
all_platforms="${all_platforms} x86_64-win64-vs10"
|
all_platforms="${all_platforms} x86_64-win64-vs10"
|
||||||
all_platforms="${all_platforms} x86_64-win64-vs11"
|
all_platforms="${all_platforms} x86_64-win64-vs11"
|
||||||
all_platforms="${all_platforms} x86_64-win64-vs12"
|
all_platforms="${all_platforms} x86_64-win64-vs12"
|
||||||
all_platforms="${all_platforms} universal-darwin8-gcc"
|
all_platforms="${all_platforms} x86_64-win64-vs14"
|
||||||
all_platforms="${all_platforms} universal-darwin9-gcc"
|
|
||||||
all_platforms="${all_platforms} universal-darwin10-gcc"
|
|
||||||
all_platforms="${all_platforms} universal-darwin11-gcc"
|
|
||||||
all_platforms="${all_platforms} universal-darwin12-gcc"
|
|
||||||
all_platforms="${all_platforms} universal-darwin13-gcc"
|
|
||||||
all_platforms="${all_platforms} universal-darwin14-gcc"
|
|
||||||
all_platforms="${all_platforms} generic-gnu"
|
all_platforms="${all_platforms} generic-gnu"
|
||||||
|
|
||||||
# all_targets is a list of all targets that can be configured
|
# all_targets is a list of all targets that can be configured
|
||||||
@@ -200,6 +189,9 @@ if [ ${doxy_major:-0} -ge 1 ]; then
|
|||||||
[ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
|
[ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# disable codecs when their source directory does not exist
|
||||||
|
[ -d "${source_path}/vp10" ] || disable_feature vp10
|
||||||
|
|
||||||
# install everything except the sources, by default. sources will have
|
# install everything except the sources, by default. sources will have
|
||||||
# to be enabled when doing dist builds, since that's no longer a common
|
# to be enabled when doing dist builds, since that's no longer a common
|
||||||
# case.
|
# case.
|
||||||
@@ -210,45 +202,34 @@ enable_feature install_libs
|
|||||||
enable_feature static
|
enable_feature static
|
||||||
enable_feature optimizations
|
enable_feature optimizations
|
||||||
enable_feature dependency_tracking
|
enable_feature dependency_tracking
|
||||||
enable_feature fast_unaligned #allow unaligned accesses, if supported by hw
|
|
||||||
enable_feature spatial_resampling
|
enable_feature spatial_resampling
|
||||||
enable_feature multithread
|
enable_feature multithread
|
||||||
enable_feature os_support
|
enable_feature os_support
|
||||||
enable_feature temporal_denoising
|
enable_feature temporal_denoising
|
||||||
|
|
||||||
[ -d "${source_path}/../include" ] && enable_feature alt_tree_layout
|
CODECS="
|
||||||
for d in vp8 vp9; do
|
vp10_encoder
|
||||||
[ -d "${source_path}/${d}" ] && disable_feature alt_tree_layout;
|
vp10_decoder
|
||||||
done
|
"
|
||||||
|
CODEC_FAMILIES="
|
||||||
if ! enabled alt_tree_layout; then
|
vp10
|
||||||
# development environment
|
"
|
||||||
[ -d "${source_path}/vp8" ] && CODECS="${CODECS} vp8_encoder vp8_decoder"
|
|
||||||
[ -d "${source_path}/vp9" ] && CODECS="${CODECS} vp9_encoder vp9_decoder"
|
|
||||||
else
|
|
||||||
# customer environment
|
|
||||||
[ -f "${source_path}/../include/vpx/vp8cx.h" ] && CODECS="${CODECS} vp8_encoder"
|
|
||||||
[ -f "${source_path}/../include/vpx/vp8dx.h" ] && CODECS="${CODECS} vp8_decoder"
|
|
||||||
[ -f "${source_path}/../include/vpx/vp9cx.h" ] && CODECS="${CODECS} vp9_encoder"
|
|
||||||
[ -f "${source_path}/../include/vpx/vp9dx.h" ] && CODECS="${CODECS} vp9_decoder"
|
|
||||||
[ -f "${source_path}/../include/vpx/vp8cx.h" ] || disable_feature vp8_encoder
|
|
||||||
[ -f "${source_path}/../include/vpx/vp8dx.h" ] || disable_feature vp8_decoder
|
|
||||||
[ -f "${source_path}/../include/vpx/vp9cx.h" ] || disable_feature vp9_encoder
|
|
||||||
[ -f "${source_path}/../include/vpx/vp9dx.h" ] || disable_feature vp9_decoder
|
|
||||||
|
|
||||||
[ -f "${source_path}/../lib/*/*mt.lib" ] && soft_enable static_msvcrt
|
|
||||||
fi
|
|
||||||
|
|
||||||
CODECS="$(echo ${CODECS} | tr ' ' '\n')"
|
|
||||||
CODEC_FAMILIES="$(for c in ${CODECS}; do echo ${c%_*}; done | sort | uniq)"
|
|
||||||
|
|
||||||
ARCH_LIST="
|
ARCH_LIST="
|
||||||
arm
|
arm
|
||||||
mips
|
mips
|
||||||
x86
|
x86
|
||||||
x86_64
|
x86_64
|
||||||
ppc32
|
"
|
||||||
ppc64
|
ARCH_EXT_LIST_X86="
|
||||||
|
mmx
|
||||||
|
sse
|
||||||
|
sse2
|
||||||
|
sse3
|
||||||
|
ssse3
|
||||||
|
sse4_1
|
||||||
|
avx
|
||||||
|
avx2
|
||||||
"
|
"
|
||||||
ARCH_EXT_LIST="
|
ARCH_EXT_LIST="
|
||||||
edsp
|
edsp
|
||||||
@@ -261,30 +242,19 @@ ARCH_EXT_LIST="
|
|||||||
msa
|
msa
|
||||||
mips64
|
mips64
|
||||||
|
|
||||||
mmx
|
${ARCH_EXT_LIST_X86}
|
||||||
sse
|
|
||||||
sse2
|
|
||||||
sse3
|
|
||||||
ssse3
|
|
||||||
sse4_1
|
|
||||||
avx
|
|
||||||
avx2
|
|
||||||
|
|
||||||
altivec
|
|
||||||
"
|
"
|
||||||
HAVE_LIST="
|
HAVE_LIST="
|
||||||
${ARCH_EXT_LIST}
|
${ARCH_EXT_LIST}
|
||||||
vpx_ports
|
vpx_ports
|
||||||
stdint_h
|
|
||||||
alt_tree_layout
|
|
||||||
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
|
||||||
@@ -305,16 +275,11 @@ CONFIG_LIST="
|
|||||||
|
|
||||||
codec_srcs
|
codec_srcs
|
||||||
debug_libs
|
debug_libs
|
||||||
fast_unaligned
|
|
||||||
mem_manager
|
|
||||||
mem_tracker
|
|
||||||
mem_checks
|
|
||||||
|
|
||||||
dequant_tokens
|
dequant_tokens
|
||||||
dc_recon
|
dc_recon
|
||||||
runtime_cpu_detect
|
runtime_cpu_detect
|
||||||
postproc
|
postproc
|
||||||
vp9_postproc
|
|
||||||
multithread
|
multithread
|
||||||
internal_stats
|
internal_stats
|
||||||
${CODECS}
|
${CODECS}
|
||||||
@@ -340,7 +305,8 @@ CONFIG_LIST="
|
|||||||
temporal_denoising
|
temporal_denoising
|
||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
vp9_highbitdepth
|
vpx_highbitdepth
|
||||||
|
better_hw_compatibility
|
||||||
experimental
|
experimental
|
||||||
size_limit
|
size_limit
|
||||||
${EXPERIMENT_LIST}
|
${EXPERIMENT_LIST}
|
||||||
@@ -370,20 +336,17 @@ CMDLINE_SELECT="
|
|||||||
libc
|
libc
|
||||||
as
|
as
|
||||||
size_limit
|
size_limit
|
||||||
fast_unaligned
|
|
||||||
codec_srcs
|
codec_srcs
|
||||||
debug_libs
|
debug_libs
|
||||||
|
|
||||||
dequant_tokens
|
dequant_tokens
|
||||||
dc_recon
|
dc_recon
|
||||||
postproc
|
postproc
|
||||||
vp9_postproc
|
|
||||||
multithread
|
multithread
|
||||||
internal_stats
|
internal_stats
|
||||||
${CODECS}
|
${CODECS}
|
||||||
${CODEC_FAMILIES}
|
${CODEC_FAMILIES}
|
||||||
static_msvcrt
|
static_msvcrt
|
||||||
mem_tracker
|
|
||||||
spatial_resampling
|
spatial_resampling
|
||||||
realtime_only
|
realtime_only
|
||||||
onthefly_bitpacking
|
onthefly_bitpacking
|
||||||
@@ -401,7 +364,8 @@ CMDLINE_SELECT="
|
|||||||
temporal_denoising
|
temporal_denoising
|
||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
vp9_highbitdepth
|
better_hw_compatibility
|
||||||
|
vpx_highbitdepth
|
||||||
experimental
|
experimental
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -456,22 +420,8 @@ post_process_cmdline() {
|
|||||||
|
|
||||||
process_targets() {
|
process_targets() {
|
||||||
enabled child || write_common_config_banner
|
enabled child || write_common_config_banner
|
||||||
enabled universal || write_common_target_config_h ${BUILD_PFX}vpx_config.h
|
write_common_target_config_h ${BUILD_PFX}vpx_config.h
|
||||||
|
|
||||||
# For fat binaries, call configure recursively to configure for each
|
|
||||||
# binary architecture to be included.
|
|
||||||
if enabled universal; then
|
|
||||||
# Call configure (ourselves) for each subarchitecture
|
|
||||||
for arch in $fat_bin_archs; do
|
|
||||||
BUILD_PFX=${arch}/ toolchain=${arch} $self --child $cmdline_args || exit $?
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The write_common_config (config.mk) logic is deferred until after the
|
|
||||||
# recursive calls to configure complete, because we want our universal
|
|
||||||
# targets to be executed last.
|
|
||||||
write_common_config_targets
|
write_common_config_targets
|
||||||
enabled universal && echo "FAT_ARCHS=${fat_bin_archs}" >> config.mk
|
|
||||||
|
|
||||||
# Calculate the default distribution name, based on the enabled features
|
# Calculate the default distribution name, based on the enabled features
|
||||||
cf=""
|
cf=""
|
||||||
@@ -487,7 +437,7 @@ process_targets() {
|
|||||||
done
|
done
|
||||||
enabled debug_libs && DIST_DIR="${DIST_DIR}-debug"
|
enabled debug_libs && DIST_DIR="${DIST_DIR}-debug"
|
||||||
enabled codec_srcs && DIST_DIR="${DIST_DIR}-src"
|
enabled codec_srcs && DIST_DIR="${DIST_DIR}-src"
|
||||||
! enabled postproc && ! enabled vp9_postproc && DIST_DIR="${DIST_DIR}-nopost"
|
! enabled postproc && DIST_DIR="${DIST_DIR}-nopost"
|
||||||
! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
|
! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
|
||||||
! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
|
! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
|
||||||
DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
|
DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
|
||||||
@@ -547,11 +497,11 @@ process_detect() {
|
|||||||
# Can only build shared libs on a subset of platforms. Doing this check
|
# Can only build shared libs on a subset of platforms. Doing this check
|
||||||
# here rather than at option parse time because the target auto-detect
|
# here rather than at option parse time because the target auto-detect
|
||||||
# magic happens after the command line has been parsed.
|
# magic happens after the command line has been parsed.
|
||||||
if ! enabled linux; then
|
if ! enabled linux && ! enabled os2; then
|
||||||
if enabled gnu; then
|
if enabled gnu; then
|
||||||
echo "--enable-shared is only supported on ELF; assuming this is OK"
|
echo "--enable-shared is only supported on ELF; assuming this is OK"
|
||||||
else
|
else
|
||||||
die "--enable-shared only supported on ELF for now"
|
die "--enable-shared only supported on ELF and OS/2 for now"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -580,16 +530,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
|
||||||
@@ -605,9 +551,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
|
||||||
@@ -616,30 +560,6 @@ EOF
|
|||||||
process_toolchain() {
|
process_toolchain() {
|
||||||
process_common_toolchain
|
process_common_toolchain
|
||||||
|
|
||||||
# Handle universal binaries for this architecture
|
|
||||||
case $toolchain in
|
|
||||||
universal-darwin*)
|
|
||||||
darwin_ver=${tgt_os##darwin}
|
|
||||||
|
|
||||||
# Snow Leopard (10.6/darwin10) dropped support for PPC
|
|
||||||
# Include PPC support for all prior versions
|
|
||||||
if [ $darwin_ver -lt 10 ]; then
|
|
||||||
fat_bin_archs="$fat_bin_archs ppc32-${tgt_os}-gcc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Tiger (10.4/darwin8) brought support for x86
|
|
||||||
if [ $darwin_ver -ge 8 ]; then
|
|
||||||
fat_bin_archs="$fat_bin_archs x86-${tgt_os}-${tgt_cc}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Leopard (10.5/darwin9) brought 64 bit support
|
|
||||||
if [ $darwin_ver -ge 9 ]; then
|
|
||||||
fat_bin_archs="$fat_bin_archs x86_64-${tgt_os}-${tgt_cc}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Enable some useful compiler flags
|
# Enable some useful compiler flags
|
||||||
if enabled gcc; then
|
if enabled gcc; then
|
||||||
enabled werror && check_add_cflags -Werror
|
enabled werror && check_add_cflags -Werror
|
||||||
@@ -701,10 +621,6 @@ process_toolchain() {
|
|||||||
enable_feature dc_recon
|
enable_feature dc_recon
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if enabled internal_stats; then
|
|
||||||
enable_feature vp9_postproc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enable the postbuild target if building for visual studio.
|
# Enable the postbuild target if building for visual studio.
|
||||||
case "$tgt_cc" in
|
case "$tgt_cc" in
|
||||||
vs*) enable_feature msvs
|
vs*) enable_feature msvs
|
||||||
@@ -715,7 +631,7 @@ process_toolchain() {
|
|||||||
VCPROJ_SFX=vcproj
|
VCPROJ_SFX=vcproj
|
||||||
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
|
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
|
||||||
;;
|
;;
|
||||||
10|11|12)
|
10|11|12|14)
|
||||||
VCPROJ_SFX=vcxproj
|
VCPROJ_SFX=vcxproj
|
||||||
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
|
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
|
||||||
enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
|
enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
|
||||||
@@ -727,7 +643,7 @@ process_toolchain() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Other toolchain specific defaults
|
# Other toolchain specific defaults
|
||||||
case $toolchain in x86*|ppc*|universal*) soft_enable postproc;; esac
|
case $toolchain in x86*) soft_enable postproc;; esac
|
||||||
|
|
||||||
if enabled postproc_visualizer; then
|
if enabled postproc_visualizer; then
|
||||||
enabled postproc || die "postproc_visualizer requires postproc to be enabled"
|
enabled postproc || die "postproc_visualizer requires postproc to be enabled"
|
||||||
@@ -781,6 +697,16 @@ EOF
|
|||||||
esac
|
esac
|
||||||
# libwebm needs to be linked with C++ standard library
|
# libwebm needs to be linked with C++ standard library
|
||||||
enabled webm_io && LD=${CXX}
|
enabled webm_io && LD=${CXX}
|
||||||
|
|
||||||
|
# append any user defined extra cflags
|
||||||
|
if [ -n "${extra_cflags}" ] ; then
|
||||||
|
check_add_cflags ${extra_cflags} || \
|
||||||
|
die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
|
||||||
|
fi
|
||||||
|
if [ -n "${extra_cxxflags}" ]; then
|
||||||
|
check_add_cxxflags ${extra_cxxflags} || \
|
||||||
|
die "Requested extra CXXFLAGS '${extra_cxxflags}' not supported by compiler"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -791,6 +717,7 @@ CONFIGURE_ARGS="$@"
|
|||||||
process "$@"
|
process "$@"
|
||||||
print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
|
print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
|
||||||
cat <<EOF >> ${BUILD_PFX}vpx_config.c
|
cat <<EOF >> ${BUILD_PFX}vpx_config.c
|
||||||
|
#include "vpx/vpx_codec.h"
|
||||||
static const char* const cfg = "$CONFIGURE_ARGS";
|
static const char* const cfg = "$CONFIGURE_ARGS";
|
||||||
const char *vpx_codec_build_config(void) {return cfg;}
|
const char *vpx_codec_build_config(void) {return cfg;}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
60
examples.mk
60
examples.mk
@@ -22,19 +22,22 @@ LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \
|
|||||||
third_party/libyuv/source/planar_functions.cc \
|
third_party/libyuv/source/planar_functions.cc \
|
||||||
third_party/libyuv/source/row_any.cc \
|
third_party/libyuv/source/row_any.cc \
|
||||||
third_party/libyuv/source/row_common.cc \
|
third_party/libyuv/source/row_common.cc \
|
||||||
|
third_party/libyuv/source/row_gcc.cc \
|
||||||
third_party/libyuv/source/row_mips.cc \
|
third_party/libyuv/source/row_mips.cc \
|
||||||
third_party/libyuv/source/row_neon.cc \
|
third_party/libyuv/source/row_neon.cc \
|
||||||
third_party/libyuv/source/row_neon64.cc \
|
third_party/libyuv/source/row_neon64.cc \
|
||||||
third_party/libyuv/source/row_posix.cc \
|
|
||||||
third_party/libyuv/source/row_win.cc \
|
third_party/libyuv/source/row_win.cc \
|
||||||
third_party/libyuv/source/scale.cc \
|
third_party/libyuv/source/scale.cc \
|
||||||
|
third_party/libyuv/source/scale_any.cc \
|
||||||
third_party/libyuv/source/scale_common.cc \
|
third_party/libyuv/source/scale_common.cc \
|
||||||
|
third_party/libyuv/source/scale_gcc.cc \
|
||||||
third_party/libyuv/source/scale_mips.cc \
|
third_party/libyuv/source/scale_mips.cc \
|
||||||
third_party/libyuv/source/scale_neon.cc \
|
third_party/libyuv/source/scale_neon.cc \
|
||||||
third_party/libyuv/source/scale_neon64.cc \
|
third_party/libyuv/source/scale_neon64.cc \
|
||||||
third_party/libyuv/source/scale_posix.cc \
|
|
||||||
third_party/libyuv/source/scale_win.cc \
|
third_party/libyuv/source/scale_win.cc \
|
||||||
|
|
||||||
|
LIBWEBM_COMMON_SRCS += third_party/libwebm/webmids.hpp
|
||||||
|
|
||||||
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
|
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
|
||||||
third_party/libwebm/mkvmuxerutil.cpp \
|
third_party/libwebm/mkvmuxerutil.cpp \
|
||||||
third_party/libwebm/mkvwriter.cpp \
|
third_party/libwebm/mkvwriter.cpp \
|
||||||
@@ -42,8 +45,7 @@ LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
|
|||||||
third_party/libwebm/mkvmuxertypes.hpp \
|
third_party/libwebm/mkvmuxertypes.hpp \
|
||||||
third_party/libwebm/mkvmuxerutil.hpp \
|
third_party/libwebm/mkvmuxerutil.hpp \
|
||||||
third_party/libwebm/mkvparser.hpp \
|
third_party/libwebm/mkvparser.hpp \
|
||||||
third_party/libwebm/mkvwriter.hpp \
|
third_party/libwebm/mkvwriter.hpp
|
||||||
third_party/libwebm/webmids.hpp
|
|
||||||
|
|
||||||
LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \
|
LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \
|
||||||
third_party/libwebm/mkvreader.cpp \
|
third_party/libwebm/mkvreader.cpp \
|
||||||
@@ -56,6 +58,7 @@ UTILS-$(CONFIG_DECODERS) += vpxdec.c
|
|||||||
vpxdec.SRCS += md5_utils.c md5_utils.h
|
vpxdec.SRCS += md5_utils.c md5_utils.h
|
||||||
vpxdec.SRCS += vpx_ports/mem_ops.h
|
vpxdec.SRCS += vpx_ports/mem_ops.h
|
||||||
vpxdec.SRCS += vpx_ports/mem_ops_aligned.h
|
vpxdec.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
vpxdec.SRCS += vpx_ports/msvc.h
|
||||||
vpxdec.SRCS += vpx_ports/vpx_timer.h
|
vpxdec.SRCS += vpx_ports/vpx_timer.h
|
||||||
vpxdec.SRCS += vpx/vpx_integer.h
|
vpxdec.SRCS += vpx/vpx_integer.h
|
||||||
vpxdec.SRCS += args.c args.h
|
vpxdec.SRCS += args.c args.h
|
||||||
@@ -66,6 +69,7 @@ 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_PARSER_SRCS)
|
vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
|
||||||
vpxdec.SRCS += webmdec.cc webmdec.h
|
vpxdec.SRCS += webmdec.cc webmdec.h
|
||||||
endif
|
endif
|
||||||
@@ -80,12 +84,14 @@ vpxenc.SRCS += tools_common.c tools_common.h
|
|||||||
vpxenc.SRCS += warnings.c warnings.h
|
vpxenc.SRCS += warnings.c warnings.h
|
||||||
vpxenc.SRCS += vpx_ports/mem_ops.h
|
vpxenc.SRCS += vpx_ports/mem_ops.h
|
||||||
vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
|
vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
vpxenc.SRCS += vpx_ports/msvc.h
|
||||||
vpxenc.SRCS += vpx_ports/vpx_timer.h
|
vpxenc.SRCS += vpx_ports/vpx_timer.h
|
||||||
vpxenc.SRCS += vpxstats.c vpxstats.h
|
vpxenc.SRCS += vpxstats.c vpxstats.h
|
||||||
ifeq ($(CONFIG_LIBYUV),yes)
|
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 += webmenc.cc webmenc.h
|
vpxenc.SRCS += webmenc.cc webmenc.h
|
||||||
endif
|
endif
|
||||||
@@ -98,6 +104,7 @@ ifeq ($(CONFIG_SPATIAL_SVC),yes)
|
|||||||
vp9_spatial_svc_encoder.SRCS += tools_common.c tools_common.h
|
vp9_spatial_svc_encoder.SRCS += tools_common.c tools_common.h
|
||||||
vp9_spatial_svc_encoder.SRCS += video_common.h
|
vp9_spatial_svc_encoder.SRCS += video_common.h
|
||||||
vp9_spatial_svc_encoder.SRCS += video_writer.h video_writer.c
|
vp9_spatial_svc_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
vp9_spatial_svc_encoder.SRCS += vpx_ports/msvc.h
|
||||||
vp9_spatial_svc_encoder.SRCS += vpxstats.c vpxstats.h
|
vp9_spatial_svc_encoder.SRCS += vpxstats.c vpxstats.h
|
||||||
vp9_spatial_svc_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
|
vp9_spatial_svc_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
|
||||||
vp9_spatial_svc_encoder.DESCRIPTION = VP9 Spatial SVC Encoder
|
vp9_spatial_svc_encoder.DESCRIPTION = VP9 Spatial SVC Encoder
|
||||||
@@ -112,6 +119,7 @@ vpx_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h
|
|||||||
vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h
|
vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h
|
||||||
vpx_temporal_svc_encoder.SRCS += video_common.h
|
vpx_temporal_svc_encoder.SRCS += video_common.h
|
||||||
vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c
|
vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
vpx_temporal_svc_encoder.SRCS += vpx_ports/msvc.h
|
||||||
vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947
|
vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947
|
||||||
vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
|
vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
|
||||||
EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
|
EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
|
||||||
@@ -122,6 +130,7 @@ simple_decoder.SRCS += video_common.h
|
|||||||
simple_decoder.SRCS += video_reader.h video_reader.c
|
simple_decoder.SRCS += video_reader.h video_reader.c
|
||||||
simple_decoder.SRCS += vpx_ports/mem_ops.h
|
simple_decoder.SRCS += vpx_ports/mem_ops.h
|
||||||
simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
|
simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
simple_decoder.SRCS += vpx_ports/msvc.h
|
||||||
simple_decoder.DESCRIPTION = Simplified decoder loop
|
simple_decoder.DESCRIPTION = Simplified decoder loop
|
||||||
EXAMPLES-$(CONFIG_DECODERS) += postproc.c
|
EXAMPLES-$(CONFIG_DECODERS) += postproc.c
|
||||||
postproc.SRCS += ivfdec.h ivfdec.c
|
postproc.SRCS += ivfdec.h ivfdec.c
|
||||||
@@ -130,6 +139,7 @@ postproc.SRCS += video_common.h
|
|||||||
postproc.SRCS += video_reader.h video_reader.c
|
postproc.SRCS += video_reader.h video_reader.c
|
||||||
postproc.SRCS += vpx_ports/mem_ops.h
|
postproc.SRCS += vpx_ports/mem_ops.h
|
||||||
postproc.SRCS += vpx_ports/mem_ops_aligned.h
|
postproc.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
postproc.SRCS += vpx_ports/msvc.h
|
||||||
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
|
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
|
||||||
postproc.DESCRIPTION = Decoder postprocessor control
|
postproc.DESCRIPTION = Decoder postprocessor control
|
||||||
EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
|
EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
|
||||||
@@ -140,6 +150,7 @@ decode_to_md5.SRCS += video_common.h
|
|||||||
decode_to_md5.SRCS += video_reader.h video_reader.c
|
decode_to_md5.SRCS += video_reader.h video_reader.c
|
||||||
decode_to_md5.SRCS += vpx_ports/mem_ops.h
|
decode_to_md5.SRCS += vpx_ports/mem_ops.h
|
||||||
decode_to_md5.SRCS += vpx_ports/mem_ops_aligned.h
|
decode_to_md5.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
decode_to_md5.SRCS += vpx_ports/msvc.h
|
||||||
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
|
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
|
||||||
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
|
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
|
||||||
EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
|
EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
|
||||||
@@ -147,6 +158,7 @@ simple_encoder.SRCS += ivfenc.h ivfenc.c
|
|||||||
simple_encoder.SRCS += tools_common.h tools_common.c
|
simple_encoder.SRCS += tools_common.h tools_common.c
|
||||||
simple_encoder.SRCS += video_common.h
|
simple_encoder.SRCS += video_common.h
|
||||||
simple_encoder.SRCS += video_writer.h video_writer.c
|
simple_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
simple_encoder.SRCS += vpx_ports/msvc.h
|
||||||
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
|
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
|
||||||
simple_encoder.DESCRIPTION = Simplified encoder loop
|
simple_encoder.DESCRIPTION = Simplified encoder loop
|
||||||
EXAMPLES-$(CONFIG_VP9_ENCODER) += vp9_lossless_encoder.c
|
EXAMPLES-$(CONFIG_VP9_ENCODER) += vp9_lossless_encoder.c
|
||||||
@@ -154,6 +166,7 @@ vp9_lossless_encoder.SRCS += ivfenc.h ivfenc.c
|
|||||||
vp9_lossless_encoder.SRCS += tools_common.h tools_common.c
|
vp9_lossless_encoder.SRCS += tools_common.h tools_common.c
|
||||||
vp9_lossless_encoder.SRCS += video_common.h
|
vp9_lossless_encoder.SRCS += video_common.h
|
||||||
vp9_lossless_encoder.SRCS += video_writer.h video_writer.c
|
vp9_lossless_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
vp9_lossless_encoder.SRCS += vpx_ports/msvc.h
|
||||||
vp9_lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366
|
vp9_lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366
|
||||||
vp9_lossless_encoder.DESCRIPTION = Simplified lossless VP9 encoder
|
vp9_lossless_encoder.DESCRIPTION = Simplified lossless VP9 encoder
|
||||||
EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
|
EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
|
||||||
@@ -161,6 +174,7 @@ twopass_encoder.SRCS += ivfenc.h ivfenc.c
|
|||||||
twopass_encoder.SRCS += tools_common.h tools_common.c
|
twopass_encoder.SRCS += tools_common.h tools_common.c
|
||||||
twopass_encoder.SRCS += video_common.h
|
twopass_encoder.SRCS += video_common.h
|
||||||
twopass_encoder.SRCS += video_writer.h video_writer.c
|
twopass_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
twopass_encoder.SRCS += vpx_ports/msvc.h
|
||||||
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
|
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
|
||||||
twopass_encoder.DESCRIPTION = Two-pass encoder loop
|
twopass_encoder.DESCRIPTION = Two-pass encoder loop
|
||||||
EXAMPLES-$(CONFIG_DECODERS) += decode_with_drops.c
|
EXAMPLES-$(CONFIG_DECODERS) += decode_with_drops.c
|
||||||
@@ -170,6 +184,7 @@ decode_with_drops.SRCS += video_common.h
|
|||||||
decode_with_drops.SRCS += video_reader.h video_reader.c
|
decode_with_drops.SRCS += video_reader.h video_reader.c
|
||||||
decode_with_drops.SRCS += vpx_ports/mem_ops.h
|
decode_with_drops.SRCS += vpx_ports/mem_ops.h
|
||||||
decode_with_drops.SRCS += vpx_ports/mem_ops_aligned.h
|
decode_with_drops.SRCS += vpx_ports/mem_ops_aligned.h
|
||||||
|
decode_with_drops.SRCS += vpx_ports/msvc.h
|
||||||
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
|
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
|
||||||
decode_with_drops.DESCRIPTION = Drops frames while decoding
|
decode_with_drops.DESCRIPTION = Drops frames while decoding
|
||||||
EXAMPLES-$(CONFIG_ENCODERS) += set_maps.c
|
EXAMPLES-$(CONFIG_ENCODERS) += set_maps.c
|
||||||
@@ -177,6 +192,7 @@ set_maps.SRCS += ivfenc.h ivfenc.c
|
|||||||
set_maps.SRCS += tools_common.h tools_common.c
|
set_maps.SRCS += tools_common.h tools_common.c
|
||||||
set_maps.SRCS += video_common.h
|
set_maps.SRCS += video_common.h
|
||||||
set_maps.SRCS += video_writer.h video_writer.c
|
set_maps.SRCS += video_writer.h video_writer.c
|
||||||
|
set_maps.SRCS += vpx_ports/msvc.h
|
||||||
set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
|
set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
|
||||||
set_maps.DESCRIPTION = Set active and ROI maps
|
set_maps.DESCRIPTION = Set active and ROI maps
|
||||||
EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8cx_set_ref.c
|
EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8cx_set_ref.c
|
||||||
@@ -184,6 +200,7 @@ vp8cx_set_ref.SRCS += ivfenc.h ivfenc.c
|
|||||||
vp8cx_set_ref.SRCS += tools_common.h tools_common.c
|
vp8cx_set_ref.SRCS += tools_common.h tools_common.c
|
||||||
vp8cx_set_ref.SRCS += video_common.h
|
vp8cx_set_ref.SRCS += video_common.h
|
||||||
vp8cx_set_ref.SRCS += video_writer.h video_writer.c
|
vp8cx_set_ref.SRCS += video_writer.h video_writer.c
|
||||||
|
vp8cx_set_ref.SRCS += vpx_ports/msvc.h
|
||||||
vp8cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
|
vp8cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
|
||||||
vp8cx_set_ref.DESCRIPTION = VP8 set encoder reference frame
|
vp8cx_set_ref.DESCRIPTION = VP8 set encoder reference frame
|
||||||
|
|
||||||
@@ -194,6 +211,7 @@ EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8_multi_resolution_encoder.c
|
|||||||
vp8_multi_resolution_encoder.SRCS += ivfenc.h ivfenc.c
|
vp8_multi_resolution_encoder.SRCS += ivfenc.h ivfenc.c
|
||||||
vp8_multi_resolution_encoder.SRCS += tools_common.h tools_common.c
|
vp8_multi_resolution_encoder.SRCS += tools_common.h tools_common.c
|
||||||
vp8_multi_resolution_encoder.SRCS += video_writer.h video_writer.c
|
vp8_multi_resolution_encoder.SRCS += video_writer.h video_writer.c
|
||||||
|
vp8_multi_resolution_encoder.SRCS += vpx_ports/msvc.h
|
||||||
vp8_multi_resolution_encoder.SRCS += $(LIBYUV_SRCS)
|
vp8_multi_resolution_encoder.SRCS += $(LIBYUV_SRCS)
|
||||||
vp8_multi_resolution_encoder.GUID = 04f8738e-63c8-423b-90fa-7c2703a374de
|
vp8_multi_resolution_encoder.GUID = 04f8738e-63c8-423b-90fa-7c2703a374de
|
||||||
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
|
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
|
||||||
@@ -254,14 +272,6 @@ CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS))
|
|||||||
$(foreach ex,$(ALL_EXAMPLES),$(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk))
|
$(foreach ex,$(ALL_EXAMPLES),$(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk))
|
||||||
|
|
||||||
|
|
||||||
# If this is a universal (fat) binary, then all the subarchitectures have
|
|
||||||
# already been built and our job is to stitch them together. The
|
|
||||||
# BUILD_OBJS variable indicates whether we should be building
|
|
||||||
# (compiling, linking) the library. The LIPO_OBJS variable indicates
|
|
||||||
# that we're stitching.
|
|
||||||
$(eval $(if $(filter universal%,$(TOOLCHAIN)),LIPO_OBJS,BUILD_OBJS):=yes)
|
|
||||||
|
|
||||||
|
|
||||||
# Create build/install dependencies for all examples. The common case
|
# Create build/install dependencies for all examples. The common case
|
||||||
# is handled here. The MSVS case is handled below.
|
# is handled here. The MSVS case is handled below.
|
||||||
NOT_MSVS = $(if $(CONFIG_MSVS),,yes)
|
NOT_MSVS = $(if $(CONFIG_MSVS),,yes)
|
||||||
@@ -269,24 +279,28 @@ DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(ALL_EXAMPLES:.c=$(EXE_SFX)))
|
|||||||
INSTALL-BINS-$(NOT_MSVS) += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX)))
|
INSTALL-BINS-$(NOT_MSVS) += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX)))
|
||||||
DIST-SRCS-yes += $(ALL_SRCS)
|
DIST-SRCS-yes += $(ALL_SRCS)
|
||||||
INSTALL-SRCS-yes += $(UTIL_SRCS)
|
INSTALL-SRCS-yes += $(UTIL_SRCS)
|
||||||
OBJS-$(NOT_MSVS) += $(if $(BUILD_OBJS),$(call objs,$(ALL_SRCS)))
|
OBJS-$(NOT_MSVS) += $(call objs,$(ALL_SRCS))
|
||||||
BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=$(EXE_SFX)))
|
BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=$(EXE_SFX)))
|
||||||
|
|
||||||
|
|
||||||
# Instantiate linker template for all examples.
|
# Instantiate linker template for all examples.
|
||||||
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
|
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
|
||||||
SHARED_LIB_SUF=$(if $(filter darwin%,$(TGT_OS)),.dylib,.so)
|
ifneq ($(filter darwin%,$(TGT_OS)),)
|
||||||
|
SHARED_LIB_SUF=.dylib
|
||||||
|
else
|
||||||
|
ifneq ($(filter os2%,$(TGT_OS)),)
|
||||||
|
SHARED_LIB_SUF=_dll.a
|
||||||
|
else
|
||||||
|
SHARED_LIB_SUF=.so
|
||||||
|
endif
|
||||||
|
endif
|
||||||
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
|
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
|
||||||
$(foreach bin,$(BINS-yes),\
|
$(foreach bin,$(BINS-yes),\
|
||||||
$(if $(BUILD_OBJS),$(eval $(bin):\
|
$(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\
|
||||||
$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF)))\
|
$(eval $(call linker_template,$(bin),\
|
||||||
$(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\
|
|
||||||
$(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \
|
$(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \
|
||||||
-l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\
|
-l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\
|
||||||
)))\
|
)))
|
||||||
$(if $(LIPO_OBJS),$(eval $(call lipo_bin_template,$(bin))))\
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# The following pairs define a mapping of locations in the distribution
|
# The following pairs define a mapping of locations in the distribution
|
||||||
# tree to locations in the source/build trees.
|
# tree to locations in the source/build trees.
|
||||||
@@ -314,8 +328,8 @@ endif
|
|||||||
# the makefiles). We may want to revisit this.
|
# the makefiles). We may want to revisit this.
|
||||||
define vcproj_template
|
define vcproj_template
|
||||||
$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
|
$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
|
||||||
@echo " [vcproj] $$@"
|
$(if $(quiet),@echo " [vcproj] $$@")
|
||||||
$$(GEN_VCPROJ)\
|
$(qexec)$$(GEN_VCPROJ)\
|
||||||
--exe\
|
--exe\
|
||||||
--target=$$(TOOLCHAIN)\
|
--target=$$(TOOLCHAIN)\
|
||||||
--name=$$(@:.$(VCPROJ_SFX)=)\
|
--name=$$(@:.$(VCPROJ_SFX)=)\
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ static void print_md5(FILE *stream, unsigned char digest[16]) {
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <infile> <outfile> <N-M|N/M>\n", exec_name);
|
fprintf(stderr, "Usage: %s <infile> <outfile> <N-M|N/M>\n", exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "../tools_common.h"
|
||||||
#include "../vp9/encoder/vp9_resize.h"
|
#include "../vp9/encoder/vp9_resize.h"
|
||||||
|
|
||||||
static const char *exec_name = NULL;
|
static const char *exec_name = NULL;
|
||||||
@@ -26,7 +27,7 @@ static void usage() {
|
|||||||
printf("<output_yuv> [<frames>]\n");
|
printf("<output_yuv> [<frames>]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
usage();
|
usage();
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
|
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s <codec> <width> <height> <infile> <outfile> "
|
"Usage: %s <codec> <width> <height> <infile> <outfile> "
|
||||||
"<keyframe-interval> [<error-resilient>]\nSee comments in "
|
"<keyframe-interval> [<error-resilient>]\nSee comments in "
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
|
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|||||||
@@ -29,23 +29,15 @@
|
|||||||
#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"
|
||||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx_ports/mem_ops.h"
|
#include "vpx_ports/mem_ops.h"
|
||||||
#include "./tools_common.h"
|
#include "../tools_common.h"
|
||||||
#define interface (vpx_codec_vp8_cx())
|
#define interface (vpx_codec_vp8_cx())
|
||||||
#define fourcc 0x30385056
|
#define fourcc 0x30385056
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n",
|
fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile> <frame>\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "vp9_lossless_encoder: Example demonstrating VP9 lossless "
|
fprintf(stderr, "vp9_lossless_encoder: Example demonstrating VP9 lossless "
|
||||||
"encoding feature. Supports raw input only.\n");
|
"encoding feature. Supports raw input only.\n");
|
||||||
fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile>\n", exec_name);
|
fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile>\n", exec_name);
|
||||||
|
|||||||
@@ -14,24 +14,34 @@
|
|||||||
* that benefit from a scalable bitstream.
|
* that benefit from a scalable bitstream.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
||||||
#include "../args.h"
|
#include "../args.h"
|
||||||
#include "../tools_common.h"
|
#include "../tools_common.h"
|
||||||
#include "../video_writer.h"
|
#include "../video_writer.h"
|
||||||
|
|
||||||
|
#include "../vpx_ports/vpx_timer.h"
|
||||||
#include "vpx/svc_context.h"
|
#include "vpx/svc_context.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "../vpxstats.h"
|
#include "../vpxstats.h"
|
||||||
|
#define OUTPUT_RC_STATS 1
|
||||||
|
|
||||||
static const arg_def_t skip_frames_arg =
|
static const arg_def_t skip_frames_arg =
|
||||||
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
|
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
|
||||||
static const arg_def_t frames_arg =
|
static const arg_def_t frames_arg =
|
||||||
ARG_DEF("f", "frames", 1, "number of frames to encode");
|
ARG_DEF("f", "frames", 1, "number of frames to encode");
|
||||||
|
static const arg_def_t threads_arg =
|
||||||
|
ARG_DEF("th", "threads", 1, "number of threads to use");
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
static const arg_def_t output_rc_stats_arg =
|
||||||
|
ARG_DEF("rcstat", "output_rc_stats", 1, "output rc stats");
|
||||||
|
#endif
|
||||||
static const arg_def_t width_arg = ARG_DEF("w", "width", 1, "source width");
|
static const arg_def_t width_arg = ARG_DEF("w", "width", 1, "source width");
|
||||||
static const arg_def_t height_arg = ARG_DEF("h", "height", 1, "source height");
|
static const arg_def_t height_arg = ARG_DEF("h", "height", 1, "source height");
|
||||||
static const arg_def_t timebase_arg =
|
static const arg_def_t timebase_arg =
|
||||||
@@ -42,6 +52,9 @@ static const arg_def_t spatial_layers_arg =
|
|||||||
ARG_DEF("sl", "spatial-layers", 1, "number of spatial SVC layers");
|
ARG_DEF("sl", "spatial-layers", 1, "number of spatial SVC layers");
|
||||||
static const arg_def_t temporal_layers_arg =
|
static const arg_def_t temporal_layers_arg =
|
||||||
ARG_DEF("tl", "temporal-layers", 1, "number of temporal SVC layers");
|
ARG_DEF("tl", "temporal-layers", 1, "number of temporal SVC layers");
|
||||||
|
static const arg_def_t temporal_layering_mode_arg =
|
||||||
|
ARG_DEF("tlm", "temporal-layering-mode", 1, "temporal layering scheme."
|
||||||
|
"VP9E_TEMPORAL_LAYERING_MODE");
|
||||||
static const arg_def_t kf_dist_arg =
|
static const arg_def_t kf_dist_arg =
|
||||||
ARG_DEF("k", "kf-dist", 1, "number of frames between keyframes");
|
ARG_DEF("k", "kf-dist", 1, "number of frames between keyframes");
|
||||||
static const arg_def_t scale_factors_arg =
|
static const arg_def_t scale_factors_arg =
|
||||||
@@ -65,8 +78,12 @@ static const arg_def_t lag_in_frame_arg =
|
|||||||
"generating any outputs");
|
"generating any outputs");
|
||||||
static const arg_def_t rc_end_usage_arg =
|
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 =
|
||||||
|
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_VPX_HIGHBITDEPTH
|
||||||
static const struct arg_enum_list bitdepth_enum[] = {
|
static const struct arg_enum_list bitdepth_enum[] = {
|
||||||
{"8", VPX_BITS_8},
|
{"8", VPX_BITS_8},
|
||||||
{"10", VPX_BITS_10},
|
{"10", VPX_BITS_10},
|
||||||
@@ -77,7 +94,7 @@ static const struct arg_enum_list bitdepth_enum[] = {
|
|||||||
static const arg_def_t bitdepth_arg =
|
static const arg_def_t bitdepth_arg =
|
||||||
ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ",
|
ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ",
|
||||||
bitdepth_enum);
|
bitdepth_enum);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
|
|
||||||
static const arg_def_t *svc_args[] = {
|
static const arg_def_t *svc_args[] = {
|
||||||
@@ -85,10 +102,16 @@ static const arg_def_t *svc_args[] = {
|
|||||||
&timebase_arg, &bitrate_arg, &skip_frames_arg, &spatial_layers_arg,
|
&timebase_arg, &bitrate_arg, &skip_frames_arg, &spatial_layers_arg,
|
||||||
&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, &lag_in_frame_arg,
|
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
&lag_in_frame_arg, &threads_arg, &aqmode_arg,
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
&output_rc_stats_arg,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
&bitdepth_arg,
|
&bitdepth_arg,
|
||||||
#endif
|
#endif
|
||||||
|
&speed_arg,
|
||||||
&rc_end_usage_arg, NULL
|
&rc_end_usage_arg, NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,6 +125,10 @@ static const uint32_t default_bitrate = 1000;
|
|||||||
static const uint32_t default_spatial_layers = 5;
|
static const uint32_t default_spatial_layers = 5;
|
||||||
static const uint32_t default_temporal_layers = 1;
|
static const uint32_t default_temporal_layers = 1;
|
||||||
static const uint32_t default_kf_dist = 100;
|
static const uint32_t default_kf_dist = 100;
|
||||||
|
static const uint32_t default_temporal_layering_mode = 0;
|
||||||
|
static const uint32_t default_output_rc_stats = 0;
|
||||||
|
static const int32_t default_speed = -1; // -1 means use library default.
|
||||||
|
static const uint32_t default_threads = 0; // zero means use library default.
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *input_filename;
|
const char *input_filename;
|
||||||
@@ -116,7 +143,7 @@ typedef struct {
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <options> input_filename output_filename\n",
|
fprintf(stderr, "Usage: %s <options> input_filename output_filename\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
fprintf(stderr, "Options:\n");
|
fprintf(stderr, "Options:\n");
|
||||||
@@ -143,6 +170,12 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
svc_ctx->log_level = SVC_LOG_DEBUG;
|
svc_ctx->log_level = SVC_LOG_DEBUG;
|
||||||
svc_ctx->spatial_layers = default_spatial_layers;
|
svc_ctx->spatial_layers = default_spatial_layers;
|
||||||
svc_ctx->temporal_layers = default_temporal_layers;
|
svc_ctx->temporal_layers = default_temporal_layers;
|
||||||
|
svc_ctx->temporal_layering_mode = default_temporal_layering_mode;
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
svc_ctx->output_rc_stat = default_output_rc_stats;
|
||||||
|
#endif
|
||||||
|
svc_ctx->speed = default_speed;
|
||||||
|
svc_ctx->threads = default_threads;
|
||||||
|
|
||||||
// start with default encoder configuration
|
// start with default encoder configuration
|
||||||
res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
|
res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
|
||||||
@@ -184,6 +217,22 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
svc_ctx->spatial_layers = arg_parse_uint(&arg);
|
svc_ctx->spatial_layers = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &temporal_layers_arg, argi)) {
|
} else if (arg_match(&arg, &temporal_layers_arg, argi)) {
|
||||||
svc_ctx->temporal_layers = arg_parse_uint(&arg);
|
svc_ctx->temporal_layers = arg_parse_uint(&arg);
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
} else if (arg_match(&arg, &output_rc_stats_arg, argi)) {
|
||||||
|
svc_ctx->output_rc_stat = arg_parse_uint(&arg);
|
||||||
|
#endif
|
||||||
|
} else if (arg_match(&arg, &speed_arg, argi)) {
|
||||||
|
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)) {
|
||||||
|
svc_ctx->threads = arg_parse_uint(&arg);
|
||||||
|
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
||||||
|
svc_ctx->temporal_layering_mode =
|
||||||
|
enc_cfg->temporal_layering_mode = arg_parse_int(&arg);
|
||||||
|
if (svc_ctx->temporal_layering_mode) {
|
||||||
|
enc_cfg->g_error_resilient = 1;
|
||||||
|
}
|
||||||
} else if (arg_match(&arg, &kf_dist_arg, argi)) {
|
} else if (arg_match(&arg, &kf_dist_arg, argi)) {
|
||||||
enc_cfg->kf_min_dist = arg_parse_uint(&arg);
|
enc_cfg->kf_min_dist = arg_parse_uint(&arg);
|
||||||
enc_cfg->kf_max_dist = enc_cfg->kf_min_dist;
|
enc_cfg->kf_max_dist = enc_cfg->kf_min_dist;
|
||||||
@@ -216,7 +265,7 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
enc_cfg->g_lag_in_frames = arg_parse_uint(&arg);
|
enc_cfg->g_lag_in_frames = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &rc_end_usage_arg, argi)) {
|
} else if (arg_match(&arg, &rc_end_usage_arg, argi)) {
|
||||||
enc_cfg->rc_end_usage = arg_parse_uint(&arg);
|
enc_cfg->rc_end_usage = arg_parse_uint(&arg);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else if (arg_match(&arg, &bitdepth_arg, argi)) {
|
} else if (arg_match(&arg, &bitdepth_arg, argi)) {
|
||||||
enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg);
|
enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg);
|
||||||
switch (enc_cfg->g_bit_depth) {
|
switch (enc_cfg->g_bit_depth) {
|
||||||
@@ -236,7 +285,7 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
|
die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
++argj;
|
++argj;
|
||||||
}
|
}
|
||||||
@@ -316,6 +365,241 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
enc_cfg->rc_target_bitrate, enc_cfg->kf_max_dist);
|
enc_cfg->rc_target_bitrate, enc_cfg->kf_max_dist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
// For rate control encoding stats.
|
||||||
|
struct RateControlStats {
|
||||||
|
// Number of input frames per layer.
|
||||||
|
int layer_input_frames[VPX_MAX_LAYERS];
|
||||||
|
// Total (cumulative) number of encoded frames per layer.
|
||||||
|
int layer_tot_enc_frames[VPX_MAX_LAYERS];
|
||||||
|
// Number of encoded non-key frames per layer.
|
||||||
|
int layer_enc_frames[VPX_MAX_LAYERS];
|
||||||
|
// Framerate per layer (cumulative).
|
||||||
|
double layer_framerate[VPX_MAX_LAYERS];
|
||||||
|
// Target average frame size per layer (per-frame-bandwidth per layer).
|
||||||
|
double layer_pfb[VPX_MAX_LAYERS];
|
||||||
|
// Actual average frame size per layer.
|
||||||
|
double layer_avg_frame_size[VPX_MAX_LAYERS];
|
||||||
|
// Average rate mismatch per layer (|target - actual| / target).
|
||||||
|
double layer_avg_rate_mismatch[VPX_MAX_LAYERS];
|
||||||
|
// Actual encoding bitrate per layer (cumulative).
|
||||||
|
double layer_encoding_bitrate[VPX_MAX_LAYERS];
|
||||||
|
// Average of the short-time encoder actual bitrate.
|
||||||
|
// TODO(marpan): Should we add these short-time stats for each layer?
|
||||||
|
double avg_st_encoding_bitrate;
|
||||||
|
// Variance of the short-time encoder actual bitrate.
|
||||||
|
double variance_st_encoding_bitrate;
|
||||||
|
// Window (number of frames) for computing short-time encoding bitrate.
|
||||||
|
int window_size;
|
||||||
|
// Number of window measurements.
|
||||||
|
int window_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Note: these rate control stats assume only 1 key frame in the
|
||||||
|
// sequence (i.e., first frame only).
|
||||||
|
static void set_rate_control_stats(struct RateControlStats *rc,
|
||||||
|
vpx_codec_enc_cfg_t *cfg) {
|
||||||
|
unsigned int sl, tl;
|
||||||
|
// Set the layer (cumulative) framerate and the target layer (non-cumulative)
|
||||||
|
// per-frame-bandwidth, for the rate control encoding stats below.
|
||||||
|
const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
|
||||||
|
|
||||||
|
for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
|
||||||
|
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
||||||
|
const int layer = sl * cfg->ts_number_layers + tl;
|
||||||
|
const int tlayer0 = sl * cfg->ts_number_layers;
|
||||||
|
if (cfg->ts_number_layers == 1)
|
||||||
|
rc->layer_framerate[layer] = framerate;
|
||||||
|
else
|
||||||
|
rc->layer_framerate[layer] =
|
||||||
|
framerate / cfg->ts_rate_decimator[tl];
|
||||||
|
if (tl > 0) {
|
||||||
|
rc->layer_pfb[layer] = 1000.0 *
|
||||||
|
(cfg->layer_target_bitrate[layer] -
|
||||||
|
cfg->layer_target_bitrate[layer - 1]) /
|
||||||
|
(rc->layer_framerate[layer] -
|
||||||
|
rc->layer_framerate[layer - 1]);
|
||||||
|
} else {
|
||||||
|
rc->layer_pfb[tlayer0] = 1000.0 *
|
||||||
|
cfg->layer_target_bitrate[tlayer0] /
|
||||||
|
rc->layer_framerate[tlayer0];
|
||||||
|
}
|
||||||
|
rc->layer_input_frames[layer] = 0;
|
||||||
|
rc->layer_enc_frames[layer] = 0;
|
||||||
|
rc->layer_tot_enc_frames[layer] = 0;
|
||||||
|
rc->layer_encoding_bitrate[layer] = 0.0;
|
||||||
|
rc->layer_avg_frame_size[layer] = 0.0;
|
||||||
|
rc->layer_avg_rate_mismatch[layer] = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rc->window_count = 0;
|
||||||
|
rc->window_size = 15;
|
||||||
|
rc->avg_st_encoding_bitrate = 0.0;
|
||||||
|
rc->variance_st_encoding_bitrate = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void printout_rate_control_summary(struct RateControlStats *rc,
|
||||||
|
vpx_codec_enc_cfg_t *cfg,
|
||||||
|
int frame_cnt) {
|
||||||
|
unsigned int sl, tl;
|
||||||
|
int tot_num_frames = 0;
|
||||||
|
double perc_fluctuation = 0.0;
|
||||||
|
printf("Total number of processed frames: %d\n\n", frame_cnt - 1);
|
||||||
|
printf("Rate control layer stats for sl%d tl%d layer(s):\n\n",
|
||||||
|
cfg->ss_number_layers, cfg->ts_number_layers);
|
||||||
|
for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
|
||||||
|
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
||||||
|
const int layer = sl * cfg->ts_number_layers + tl;
|
||||||
|
const int num_dropped = (tl > 0) ?
|
||||||
|
(rc->layer_input_frames[layer] - rc->layer_enc_frames[layer]) :
|
||||||
|
(rc->layer_input_frames[layer] - rc->layer_enc_frames[layer] - 1);
|
||||||
|
if (!sl)
|
||||||
|
tot_num_frames += rc->layer_input_frames[layer];
|
||||||
|
rc->layer_encoding_bitrate[layer] = 0.001 * rc->layer_framerate[layer] *
|
||||||
|
rc->layer_encoding_bitrate[layer] / tot_num_frames;
|
||||||
|
rc->layer_avg_frame_size[layer] = rc->layer_avg_frame_size[layer] /
|
||||||
|
rc->layer_enc_frames[layer];
|
||||||
|
rc->layer_avg_rate_mismatch[layer] =
|
||||||
|
100.0 * rc->layer_avg_rate_mismatch[layer] /
|
||||||
|
rc->layer_enc_frames[layer];
|
||||||
|
printf("For layer#: sl%d tl%d \n", sl, tl);
|
||||||
|
printf("Bitrate (target vs actual): %d %f.0 kbps\n",
|
||||||
|
cfg->layer_target_bitrate[layer],
|
||||||
|
rc->layer_encoding_bitrate[layer]);
|
||||||
|
printf("Average frame size (target vs actual): %f %f bits\n",
|
||||||
|
rc->layer_pfb[layer], rc->layer_avg_frame_size[layer]);
|
||||||
|
printf("Average rate_mismatch: %f\n",
|
||||||
|
rc->layer_avg_rate_mismatch[layer]);
|
||||||
|
printf("Number of input frames, encoded (non-key) frames, "
|
||||||
|
"and percent dropped frames: %d %d %f.0 \n",
|
||||||
|
rc->layer_input_frames[layer], rc->layer_enc_frames[layer],
|
||||||
|
100.0 * num_dropped / rc->layer_input_frames[layer]);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rc->avg_st_encoding_bitrate = rc->avg_st_encoding_bitrate / rc->window_count;
|
||||||
|
rc->variance_st_encoding_bitrate =
|
||||||
|
rc->variance_st_encoding_bitrate / rc->window_count -
|
||||||
|
(rc->avg_st_encoding_bitrate * rc->avg_st_encoding_bitrate);
|
||||||
|
perc_fluctuation = 100.0 * sqrt(rc->variance_st_encoding_bitrate) /
|
||||||
|
rc->avg_st_encoding_bitrate;
|
||||||
|
printf("Short-time stats, for window of %d frames: \n", rc->window_size);
|
||||||
|
printf("Average, rms-variance, and percent-fluct: %f %f %f \n",
|
||||||
|
rc->avg_st_encoding_bitrate,
|
||||||
|
sqrt(rc->variance_st_encoding_bitrate),
|
||||||
|
perc_fluctuation);
|
||||||
|
if (frame_cnt != tot_num_frames)
|
||||||
|
die("Error: Number of input frames not equal to output encoded frames != "
|
||||||
|
"%d tot_num_frames = %d\n", frame_cnt, tot_num_frames);
|
||||||
|
}
|
||||||
|
|
||||||
|
vpx_codec_err_t parse_superframe_index(const uint8_t *data,
|
||||||
|
size_t data_sz,
|
||||||
|
uint32_t sizes[8], int *count) {
|
||||||
|
// A chunk ending with a byte matching 0xc0 is an invalid chunk unless
|
||||||
|
// it is a super frame index. If the last byte of real video compression
|
||||||
|
// data is 0xc0 the encoder must add a 0 byte. If we have the marker but
|
||||||
|
// not the associated matching marker byte at the front of the index we have
|
||||||
|
// an invalid bitstream and need to return an error.
|
||||||
|
|
||||||
|
uint8_t marker;
|
||||||
|
|
||||||
|
marker = *(data + data_sz - 1);
|
||||||
|
*count = 0;
|
||||||
|
|
||||||
|
|
||||||
|
if ((marker & 0xe0) == 0xc0) {
|
||||||
|
const uint32_t frames = (marker & 0x7) + 1;
|
||||||
|
const uint32_t mag = ((marker >> 3) & 0x3) + 1;
|
||||||
|
const size_t index_sz = 2 + mag * frames;
|
||||||
|
|
||||||
|
// This chunk is marked as having a superframe index but doesn't have
|
||||||
|
// enough data for it, thus it's an invalid superframe index.
|
||||||
|
if (data_sz < index_sz)
|
||||||
|
return VPX_CODEC_CORRUPT_FRAME;
|
||||||
|
|
||||||
|
{
|
||||||
|
const uint8_t marker2 = *(data + data_sz - index_sz);
|
||||||
|
|
||||||
|
// This chunk is marked as having a superframe index but doesn't have
|
||||||
|
// the matching marker byte at the front of the index therefore it's an
|
||||||
|
// invalid chunk.
|
||||||
|
if (marker != marker2)
|
||||||
|
return VPX_CODEC_CORRUPT_FRAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Found a valid superframe index.
|
||||||
|
uint32_t i, j;
|
||||||
|
const uint8_t *x = &data[data_sz - index_sz + 1];
|
||||||
|
|
||||||
|
for (i = 0; i < frames; ++i) {
|
||||||
|
uint32_t this_sz = 0;
|
||||||
|
|
||||||
|
for (j = 0; j < mag; ++j)
|
||||||
|
this_sz |= (*x++) << (j * 8);
|
||||||
|
sizes[i] = this_sz;
|
||||||
|
}
|
||||||
|
*count = frames;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return VPX_CODEC_OK;
|
||||||
|
}
|
||||||
|
#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;
|
||||||
@@ -332,14 +616,25 @@ int main(int argc, const char **argv) {
|
|||||||
FILE *infile = NULL;
|
FILE *infile = NULL;
|
||||||
int end_of_stream = 0;
|
int end_of_stream = 0;
|
||||||
int frames_received = 0;
|
int frames_received = 0;
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
||||||
|
struct RateControlStats rc;
|
||||||
|
vpx_svc_layer_id_t layer_id;
|
||||||
|
vpx_svc_ref_frame_config_t ref_frame_config;
|
||||||
|
int sl, tl;
|
||||||
|
double sum_bitrate = 0.0;
|
||||||
|
double sum_bitrate2 = 0.0;
|
||||||
|
double framerate = 30.0;
|
||||||
|
#endif
|
||||||
|
struct vpx_usec_timer timer;
|
||||||
|
int64_t cx_time = 0;
|
||||||
memset(&svc_ctx, 0, sizeof(svc_ctx));
|
memset(&svc_ctx, 0, sizeof(svc_ctx));
|
||||||
svc_ctx.log_print = 1;
|
svc_ctx.log_print = 1;
|
||||||
exec_name = argv[0];
|
exec_name = argv[0];
|
||||||
parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg);
|
parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg);
|
||||||
|
|
||||||
// Allocate image buffer
|
// Allocate image buffer
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ?
|
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ?
|
||||||
VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
|
VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
|
||||||
enc_cfg.g_w, enc_cfg.g_h, 32)) {
|
enc_cfg.g_w, enc_cfg.g_h, 32)) {
|
||||||
@@ -349,7 +644,7 @@ int main(int argc, const char **argv) {
|
|||||||
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, enc_cfg.g_w, enc_cfg.g_h, 32)) {
|
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, enc_cfg.g_w, enc_cfg.g_h, 32)) {
|
||||||
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
|
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
if (!(infile = fopen(app_input.input_filename, "rb")))
|
if (!(infile = fopen(app_input.input_filename, "rb")))
|
||||||
die("Failed to open %s for reading\n", app_input.input_filename);
|
die("Failed to open %s for reading\n", app_input.input_filename);
|
||||||
@@ -359,6 +654,13 @@ int main(int argc, const char **argv) {
|
|||||||
VPX_CODEC_OK)
|
VPX_CODEC_OK)
|
||||||
die("Failed to initialize encoder\n");
|
die("Failed to initialize encoder\n");
|
||||||
|
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
if (svc_ctx.output_rc_stat) {
|
||||||
|
set_rate_control_stats(&rc, &enc_cfg);
|
||||||
|
framerate = enc_cfg.g_timebase.den / enc_cfg.g_timebase.num;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
info.codec_fourcc = VP9_FOURCC;
|
info.codec_fourcc = VP9_FOURCC;
|
||||||
info.time_base.numerator = enc_cfg.g_timebase.num;
|
info.time_base.numerator = enc_cfg.g_timebase.num;
|
||||||
info.time_base.denominator = enc_cfg.g_timebase.den;
|
info.time_base.denominator = enc_cfg.g_timebase.den;
|
||||||
@@ -370,11 +672,34 @@ int main(int argc, const char **argv) {
|
|||||||
if (!writer)
|
if (!writer)
|
||||||
die("Failed to open %s for writing\n", app_input.output_filename);
|
die("Failed to open %s for writing\n", app_input.output_filename);
|
||||||
}
|
}
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
// For now, just write temporal layer streams.
|
||||||
|
// TODO(wonkap): do spatial by re-writing superframe.
|
||||||
|
if (svc_ctx.output_rc_stat) {
|
||||||
|
for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
|
char file_name[PATH_MAX];
|
||||||
|
|
||||||
|
snprintf(file_name, sizeof(file_name), "%s_t%d.ivf",
|
||||||
|
app_input.output_filename, tl);
|
||||||
|
outfile[tl] = vpx_video_writer_open(file_name, kContainerIVF, &info);
|
||||||
|
if (!outfile[tl])
|
||||||
|
die("Failed to open %s for writing", file_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// skip initial frames
|
// skip initial frames
|
||||||
for (i = 0; i < app_input.frames_to_skip; ++i)
|
for (i = 0; i < app_input.frames_to_skip; ++i)
|
||||||
vpx_img_read(&raw, infile);
|
vpx_img_read(&raw, infile);
|
||||||
|
|
||||||
|
if (svc_ctx.speed != -1)
|
||||||
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
||||||
|
if (svc_ctx.threads)
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
||||||
|
if (svc_ctx.speed >= 5 && svc_ctx.aqmode == 1)
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||||
|
|
||||||
|
|
||||||
// Encode frames
|
// Encode frames
|
||||||
while (!end_of_stream) {
|
while (!end_of_stream) {
|
||||||
vpx_codec_iter_t iter = NULL;
|
vpx_codec_iter_t iter = NULL;
|
||||||
@@ -385,8 +710,44 @@ 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);
|
||||||
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, VPX_DL_GOOD_QUALITY);
|
pts, frame_duration, svc_ctx.speed >= 5 ?
|
||||||
|
VPX_DL_REALTIME : VPX_DL_GOOD_QUALITY);
|
||||||
|
vpx_usec_timer_mark(&timer);
|
||||||
|
cx_time += vpx_usec_timer_elapsed(&timer);
|
||||||
|
|
||||||
printf("%s", vpx_svc_get_message(&svc_ctx));
|
printf("%s", vpx_svc_get_message(&svc_ctx));
|
||||||
if (res != VPX_CODEC_OK) {
|
if (res != VPX_CODEC_OK) {
|
||||||
die_codec(&codec, "Failed to encode frame");
|
die_codec(&codec, "Failed to encode frame");
|
||||||
@@ -395,11 +756,97 @@ 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: {
|
||||||
if (cx_pkt->data.frame.sz > 0)
|
if (cx_pkt->data.frame.sz > 0) {
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
uint32_t sizes[8];
|
||||||
|
int count = 0;
|
||||||
|
#endif
|
||||||
vpx_video_writer_write_frame(writer,
|
vpx_video_writer_write_frame(writer,
|
||||||
cx_pkt->data.frame.buf,
|
cx_pkt->data.frame.buf,
|
||||||
cx_pkt->data.frame.sz,
|
cx_pkt->data.frame.sz,
|
||||||
cx_pkt->data.frame.pts);
|
cx_pkt->data.frame.pts);
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
// TODO(marpan/wonkap): Put this (to line728) in separate function.
|
||||||
|
if (svc_ctx.output_rc_stat) {
|
||||||
|
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
||||||
|
parse_superframe_index(cx_pkt->data.frame.buf,
|
||||||
|
cx_pkt->data.frame.sz, sizes, &count);
|
||||||
|
// Note computing input_layer_frames here won't account for frame
|
||||||
|
// drops in rate control stats.
|
||||||
|
// TODO(marpan): Fix this for non-bypass mode so we can get stats
|
||||||
|
// for dropped frames.
|
||||||
|
if (svc_ctx.temporal_layering_mode !=
|
||||||
|
VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
||||||
|
layer_id.temporal_layer_id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (tl = layer_id.temporal_layer_id;
|
||||||
|
tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
|
vpx_video_writer_write_frame(outfile[tl],
|
||||||
|
cx_pkt->data.frame.buf,
|
||||||
|
cx_pkt->data.frame.sz,
|
||||||
|
cx_pkt->data.frame.pts);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
for (tl = layer_id.temporal_layer_id;
|
||||||
|
tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
|
const int layer = sl * enc_cfg.ts_number_layers + tl;
|
||||||
|
++rc.layer_tot_enc_frames[layer];
|
||||||
|
rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];
|
||||||
|
// Keep count of rate control stats per layer, for non-key
|
||||||
|
// frames.
|
||||||
|
if (tl == layer_id.temporal_layer_id &&
|
||||||
|
!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY)) {
|
||||||
|
rc.layer_avg_frame_size[layer] += 8.0 * sizes[sl];
|
||||||
|
rc.layer_avg_rate_mismatch[layer] +=
|
||||||
|
fabs(8.0 * sizes[sl] - rc.layer_pfb[layer]) /
|
||||||
|
rc.layer_pfb[layer];
|
||||||
|
++rc.layer_enc_frames[layer];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update for short-time encoding bitrate states, for moving
|
||||||
|
// window of size rc->window, shifted by rc->window / 2.
|
||||||
|
// Ignore first window segment, due to key frame.
|
||||||
|
if (frame_cnt > rc.window_size) {
|
||||||
|
tl = layer_id.temporal_layer_id;
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
sum_bitrate += 0.001 * 8.0 * sizes[sl] * framerate;
|
||||||
|
}
|
||||||
|
if (frame_cnt % rc.window_size == 0) {
|
||||||
|
rc.window_count += 1;
|
||||||
|
rc.avg_st_encoding_bitrate += sum_bitrate / rc.window_size;
|
||||||
|
rc.variance_st_encoding_bitrate +=
|
||||||
|
(sum_bitrate / rc.window_size) *
|
||||||
|
(sum_bitrate / rc.window_size);
|
||||||
|
sum_bitrate = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Second shifted window.
|
||||||
|
if (frame_cnt > rc.window_size + rc.window_size / 2) {
|
||||||
|
tl = layer_id.temporal_layer_id;
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
sum_bitrate2 += 0.001 * 8.0 * sizes[sl] * framerate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frame_cnt > 2 * rc.window_size &&
|
||||||
|
frame_cnt % rc.window_size == 0) {
|
||||||
|
rc.window_count += 1;
|
||||||
|
rc.avg_st_encoding_bitrate += sum_bitrate2 / rc.window_size;
|
||||||
|
rc.variance_st_encoding_bitrate +=
|
||||||
|
(sum_bitrate2 / rc.window_size) *
|
||||||
|
(sum_bitrate2 / rc.window_size);
|
||||||
|
sum_bitrate2 = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
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),
|
||||||
@@ -425,24 +872,43 @@ int main(int argc, const char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 (svc_ctx.output_rc_stat) {
|
||||||
|
printout_rate_control_summary(&rc, &enc_cfg, frame_cnt);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
|
if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
|
||||||
|
|
||||||
if (app_input.passes == 2)
|
if (app_input.passes == 2)
|
||||||
stats_close(&app_input.rc_stats, 1);
|
stats_close(&app_input.rc_stats, 1);
|
||||||
|
|
||||||
if (writer) {
|
if (writer) {
|
||||||
vpx_video_writer_close(writer);
|
vpx_video_writer_close(writer);
|
||||||
}
|
}
|
||||||
|
#if OUTPUT_RC_STATS
|
||||||
|
if (svc_ctx.output_rc_stat) {
|
||||||
|
for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
|
vpx_video_writer_close(outfile[tl]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
printf("Frame cnt and encoding time/FPS stats for encoding: %d %f %f \n",
|
||||||
|
frame_cnt,
|
||||||
|
1000 * (float)cx_time / (double)(frame_cnt * 1000000),
|
||||||
|
1000000 * (double)frame_cnt / (double)cx_time);
|
||||||
vpx_img_free(&raw);
|
vpx_img_free(&raw);
|
||||||
|
|
||||||
// display average size, psnr
|
// display average size, psnr
|
||||||
printf("%s", vpx_svc_dump_statistics(&svc_ctx));
|
printf("%s", vpx_svc_dump_statistics(&svc_ctx));
|
||||||
|
|
||||||
vpx_svc_release(&svc_ctx);
|
vpx_svc_release(&svc_ctx);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit() {
|
void usage_exit(void) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +70,7 @@ struct RateControlMetrics {
|
|||||||
int window_size;
|
int window_size;
|
||||||
// Number of window measurements.
|
// Number of window measurements.
|
||||||
int window_count;
|
int window_count;
|
||||||
|
int layer_target_bitrate[VPX_MAX_LAYERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Note: these rate control metrics assume only 1 key frame in the
|
// Note: these rate control metrics assume only 1 key frame in the
|
||||||
@@ -85,13 +86,13 @@ static void set_rate_control_metrics(struct RateControlMetrics *rc,
|
|||||||
// per-frame-bandwidth, for the rate control encoding stats below.
|
// per-frame-bandwidth, for the rate control encoding stats below.
|
||||||
const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
|
const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
|
||||||
rc->layer_framerate[0] = framerate / cfg->ts_rate_decimator[0];
|
rc->layer_framerate[0] = framerate / cfg->ts_rate_decimator[0];
|
||||||
rc->layer_pfb[0] = 1000.0 * cfg->ts_target_bitrate[0] /
|
rc->layer_pfb[0] = 1000.0 * rc->layer_target_bitrate[0] /
|
||||||
rc->layer_framerate[0];
|
rc->layer_framerate[0];
|
||||||
for (i = 0; i < cfg->ts_number_layers; ++i) {
|
for (i = 0; i < cfg->ts_number_layers; ++i) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
rc->layer_framerate[i] = framerate / cfg->ts_rate_decimator[i];
|
rc->layer_framerate[i] = framerate / cfg->ts_rate_decimator[i];
|
||||||
rc->layer_pfb[i] = 1000.0 *
|
rc->layer_pfb[i] = 1000.0 *
|
||||||
(cfg->ts_target_bitrate[i] - cfg->ts_target_bitrate[i - 1]) /
|
(rc->layer_target_bitrate[i] - rc->layer_target_bitrate[i - 1]) /
|
||||||
(rc->layer_framerate[i] - rc->layer_framerate[i - 1]);
|
(rc->layer_framerate[i] - rc->layer_framerate[i - 1]);
|
||||||
}
|
}
|
||||||
rc->layer_input_frames[i] = 0;
|
rc->layer_input_frames[i] = 0;
|
||||||
@@ -128,7 +129,7 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc,
|
|||||||
rc->layer_avg_rate_mismatch[i] = 100.0 * rc->layer_avg_rate_mismatch[i] /
|
rc->layer_avg_rate_mismatch[i] = 100.0 * rc->layer_avg_rate_mismatch[i] /
|
||||||
rc->layer_enc_frames[i];
|
rc->layer_enc_frames[i];
|
||||||
printf("For layer#: %d \n", i);
|
printf("For layer#: %d \n", i);
|
||||||
printf("Bitrate (target vs actual): %d %f \n", cfg->ts_target_bitrate[i],
|
printf("Bitrate (target vs actual): %d %f \n", rc->layer_target_bitrate[i],
|
||||||
rc->layer_encoding_bitrate[i]);
|
rc->layer_encoding_bitrate[i]);
|
||||||
printf("Average frame size (target vs actual): %f %f \n", rc->layer_pfb[i],
|
printf("Average frame size (target vs actual): %f %f \n", rc->layer_pfb[i],
|
||||||
rc->layer_avg_frame_size[i]);
|
rc->layer_avg_frame_size[i]);
|
||||||
@@ -491,13 +492,13 @@ int main(int argc, char **argv) {
|
|||||||
struct RateControlMetrics rc;
|
struct RateControlMetrics rc;
|
||||||
int64_t cx_time = 0;
|
int64_t cx_time = 0;
|
||||||
const int min_args_base = 11;
|
const int min_args_base = 11;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
vpx_bit_depth_t bit_depth = VPX_BITS_8;
|
vpx_bit_depth_t bit_depth = VPX_BITS_8;
|
||||||
int input_bit_depth = 8;
|
int input_bit_depth = 8;
|
||||||
const int min_args = min_args_base + 1;
|
const int min_args = min_args_base + 1;
|
||||||
#else
|
#else
|
||||||
const int min_args = min_args_base;
|
const int min_args = min_args_base;
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
double sum_bitrate = 0.0;
|
double sum_bitrate = 0.0;
|
||||||
double sum_bitrate2 = 0.0;
|
double sum_bitrate2 = 0.0;
|
||||||
double framerate = 30.0;
|
double framerate = 30.0;
|
||||||
@@ -505,7 +506,7 @@ int main(int argc, char **argv) {
|
|||||||
exec_name = argv[0];
|
exec_name = argv[0];
|
||||||
// Check usage and arguments.
|
// Check usage and arguments.
|
||||||
if (argc < min_args) {
|
if (argc < min_args) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
||||||
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
||||||
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]);
|
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]);
|
||||||
@@ -513,7 +514,7 @@ int main(int argc, char **argv) {
|
|||||||
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
|
||||||
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
|
||||||
"<Rate_0> ... <Rate_nlayers-1> \n", argv[0]);
|
"<Rate_0> ... <Rate_nlayers-1> \n", argv[0]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
}
|
}
|
||||||
|
|
||||||
encoder = get_vpx_encoder_by_name(argv[3]);
|
encoder = get_vpx_encoder_by_name(argv[3]);
|
||||||
@@ -537,7 +538,7 @@ int main(int argc, char **argv) {
|
|||||||
die("Invalid number of arguments");
|
die("Invalid number of arguments");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
switch (strtol(argv[argc-1], NULL, 0)) {
|
switch (strtol(argv[argc-1], NULL, 0)) {
|
||||||
case 8:
|
case 8:
|
||||||
bit_depth = VPX_BITS_8;
|
bit_depth = VPX_BITS_8;
|
||||||
@@ -564,7 +565,7 @@ int main(int argc, char **argv) {
|
|||||||
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
|
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
|
||||||
die("Failed to allocate image", width, height);
|
die("Failed to allocate image", width, height);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
// Populate encoder configuration.
|
// Populate encoder configuration.
|
||||||
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
|
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
|
||||||
@@ -577,13 +578,13 @@ int main(int argc, char **argv) {
|
|||||||
cfg.g_w = width;
|
cfg.g_w = width;
|
||||||
cfg.g_h = height;
|
cfg.g_h = height;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
if (bit_depth != VPX_BITS_8) {
|
if (bit_depth != VPX_BITS_8) {
|
||||||
cfg.g_bit_depth = bit_depth;
|
cfg.g_bit_depth = bit_depth;
|
||||||
cfg.g_input_bit_depth = input_bit_depth;
|
cfg.g_input_bit_depth = input_bit_depth;
|
||||||
cfg.g_profile = 2;
|
cfg.g_profile = 2;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
// Timebase format e.g. 30fps: numerator=1, demoninator = 30.
|
// Timebase format e.g. 30fps: numerator=1, demoninator = 30.
|
||||||
cfg.g_timebase.num = strtol(argv[6], NULL, 0);
|
cfg.g_timebase.num = strtol(argv[6], NULL, 0);
|
||||||
@@ -597,13 +598,16 @@ int main(int argc, char **argv) {
|
|||||||
for (i = min_args_base;
|
for (i = min_args_base;
|
||||||
(int)i < min_args_base + mode_to_num_layers[layering_mode];
|
(int)i < min_args_base + mode_to_num_layers[layering_mode];
|
||||||
++i) {
|
++i) {
|
||||||
cfg.ts_target_bitrate[i - 11] = strtol(argv[i], NULL, 0);
|
rc.layer_target_bitrate[i - 11] = strtol(argv[i], NULL, 0);
|
||||||
|
if (strncmp(encoder->name, "vp8", 3) == 0)
|
||||||
|
cfg.ts_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
|
||||||
|
else if (strncmp(encoder->name, "vp9", 3) == 0)
|
||||||
|
cfg.layer_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Real time parameters.
|
// Real time parameters.
|
||||||
cfg.rc_dropframe_thresh = strtol(argv[9], NULL, 0);
|
cfg.rc_dropframe_thresh = strtol(argv[9], NULL, 0);
|
||||||
cfg.rc_end_usage = VPX_CBR;
|
cfg.rc_end_usage = VPX_CBR;
|
||||||
cfg.rc_resize_allowed = 0;
|
|
||||||
cfg.rc_min_quantizer = 2;
|
cfg.rc_min_quantizer = 2;
|
||||||
cfg.rc_max_quantizer = 56;
|
cfg.rc_max_quantizer = 56;
|
||||||
if (strncmp(encoder->name, "vp9", 3) == 0)
|
if (strncmp(encoder->name, "vp9", 3) == 0)
|
||||||
@@ -614,6 +618,9 @@ int main(int argc, char **argv) {
|
|||||||
cfg.rc_buf_optimal_sz = 600;
|
cfg.rc_buf_optimal_sz = 600;
|
||||||
cfg.rc_buf_sz = 1000;
|
cfg.rc_buf_sz = 1000;
|
||||||
|
|
||||||
|
// Disable dynamic resizing by default.
|
||||||
|
cfg.rc_resize_allowed = 0;
|
||||||
|
|
||||||
// Use 1 thread as default.
|
// Use 1 thread as default.
|
||||||
cfg.g_threads = 1;
|
cfg.g_threads = 1;
|
||||||
|
|
||||||
@@ -625,6 +632,8 @@ int main(int argc, char **argv) {
|
|||||||
// Disable automatic keyframe placement.
|
// Disable automatic keyframe placement.
|
||||||
cfg.kf_min_dist = cfg.kf_max_dist = 3000;
|
cfg.kf_min_dist = cfg.kf_max_dist = 3000;
|
||||||
|
|
||||||
|
cfg.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||||
|
|
||||||
set_temporal_layer_pattern(layering_mode,
|
set_temporal_layer_pattern(layering_mode,
|
||||||
&cfg,
|
&cfg,
|
||||||
layer_flags,
|
layer_flags,
|
||||||
@@ -633,8 +642,8 @@ int main(int argc, char **argv) {
|
|||||||
set_rate_control_metrics(&rc, &cfg);
|
set_rate_control_metrics(&rc, &cfg);
|
||||||
|
|
||||||
// Target bandwidth for the whole stream.
|
// Target bandwidth for the whole stream.
|
||||||
// Set to ts_target_bitrate for highest layer (total bitrate).
|
// Set to layer_target_bitrate for highest layer (total bitrate).
|
||||||
cfg.rc_target_bitrate = cfg.ts_target_bitrate[cfg.ts_number_layers - 1];
|
cfg.rc_target_bitrate = rc.layer_target_bitrate[cfg.ts_number_layers - 1];
|
||||||
|
|
||||||
// Open input file.
|
// Open input file.
|
||||||
if (!(infile = fopen(argv[1], "rb"))) {
|
if (!(infile = fopen(argv[1], "rb"))) {
|
||||||
@@ -663,29 +672,37 @@ int main(int argc, char **argv) {
|
|||||||
cfg.ss_number_layers = 1;
|
cfg.ss_number_layers = 1;
|
||||||
|
|
||||||
// Initialize codec.
|
// Initialize codec.
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
if (vpx_codec_enc_init(
|
if (vpx_codec_enc_init(
|
||||||
&codec, encoder->codec_interface(), &cfg,
|
&codec, encoder->codec_interface(), &cfg,
|
||||||
bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
|
bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
|
||||||
#else
|
#else
|
||||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
die_codec(&codec, "Failed to initialize encoder");
|
die_codec(&codec, "Failed to initialize encoder");
|
||||||
|
|
||||||
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, kDenoiserOnYOnly);
|
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
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_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, 0);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||||
|
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))
|
||||||
die_codec(&codec, "Failed to set SVC");
|
die_codec(&codec, "Failed to set SVC");
|
||||||
|
for (i = 0; i < cfg.ts_number_layers; ++i) {
|
||||||
|
svc_params.max_quantizers[i] = cfg.rc_max_quantizer;
|
||||||
|
svc_params.min_quantizers[i] = cfg.rc_min_quantizer;
|
||||||
}
|
}
|
||||||
|
svc_params.scaling_factor_num[0] = cfg.g_h;
|
||||||
|
svc_params.scaling_factor_den[0] = cfg.g_h;
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_SVC_PARAMETERS, &svc_params);
|
||||||
}
|
}
|
||||||
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||||
vpx_codec_control(&codec, VP8E_SET_SCREEN_CONTENT_MODE, 0);
|
vpx_codec_control(&codec, VP8E_SET_SCREEN_CONTENT_MODE, 0);
|
||||||
|
|||||||
219
libs.mk
219
libs.mk
@@ -25,7 +25,7 @@ $$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2)
|
|||||||
@echo " [CREATE] $$@"
|
@echo " [CREATE] $$@"
|
||||||
$$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \
|
$$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \
|
||||||
--sym=$(1) \
|
--sym=$(1) \
|
||||||
--config=$$(CONFIG_DIR)$$(target)$$(if $$(FAT_ARCHS),,-$$(TOOLCHAIN)).mk \
|
--config=$$(CONFIG_DIR)$$(target)-$$(TOOLCHAIN).mk \
|
||||||
$$(RTCD_OPTIONS) $$^ > $$@
|
$$(RTCD_OPTIONS) $$^ > $$@
|
||||||
CLEAN-OBJS += $$(BUILD_PFX)$(1).h
|
CLEAN-OBJS += $$(BUILD_PFX)$(1).h
|
||||||
RTCD += $$(BUILD_PFX)$(1).h
|
RTCD += $$(BUILD_PFX)$(1).h
|
||||||
@@ -34,13 +34,6 @@ endef
|
|||||||
CODEC_SRCS-yes += CHANGELOG
|
CODEC_SRCS-yes += CHANGELOG
|
||||||
CODEC_SRCS-yes += libs.mk
|
CODEC_SRCS-yes += libs.mk
|
||||||
|
|
||||||
# If this is a universal (fat) binary, then all the subarchitectures have
|
|
||||||
# already been built and our job is to stitch them together. The
|
|
||||||
# BUILD_LIBVPX variable indicates whether we should be building
|
|
||||||
# (compiling, linking) the library. The LIPO_LIBVPX variable indicates
|
|
||||||
# that we're stitching.
|
|
||||||
$(eval $(if $(filter universal%,$(TOOLCHAIN)),LIPO_LIBVPX,BUILD_LIBVPX):=yes)
|
|
||||||
|
|
||||||
include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
|
include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
|
||||||
CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
|
CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
|
||||||
CODEC_DOC_SRCS += $(addprefix vpx/,$(call enabled,API_DOC_SRCS))
|
CODEC_DOC_SRCS += $(addprefix vpx/,$(call enabled,API_DOC_SRCS))
|
||||||
@@ -54,7 +47,13 @@ CODEC_SRCS-yes += $(addprefix vpx_scale/,$(call enabled,SCALE_SRCS))
|
|||||||
include $(SRC_PATH_BARE)/vpx_ports/vpx_ports.mk
|
include $(SRC_PATH_BARE)/vpx_ports/vpx_ports.mk
|
||||||
CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
|
CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
|
||||||
|
|
||||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
|
||||||
|
CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
|
||||||
|
|
||||||
|
include $(SRC_PATH_BARE)/vpx_util/vpx_util.mk
|
||||||
|
CODEC_SRCS-yes += $(addprefix vpx_util/,$(call enabled,UTIL_SRCS))
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VP8),yes)
|
||||||
VP8_PREFIX=vp8/
|
VP8_PREFIX=vp8/
|
||||||
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
|
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
|
||||||
endif
|
endif
|
||||||
@@ -77,7 +76,7 @@ ifeq ($(CONFIG_VP8_DECODER),yes)
|
|||||||
CODEC_DOC_SECTIONS += vp8 vp8_decoder
|
CODEC_DOC_SECTIONS += vp8 vp8_decoder
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
|
ifeq ($(CONFIG_VP9),yes)
|
||||||
VP9_PREFIX=vp9/
|
VP9_PREFIX=vp9/
|
||||||
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
|
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
|
||||||
endif
|
endif
|
||||||
@@ -110,6 +109,40 @@ endif
|
|||||||
VP9_PREFIX=vp9/
|
VP9_PREFIX=vp9/
|
||||||
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
|
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
|
||||||
|
|
||||||
|
# VP10 make file
|
||||||
|
ifeq ($(CONFIG_VP10),yes)
|
||||||
|
VP10_PREFIX=vp10/
|
||||||
|
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10_common.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VP10_ENCODER),yes)
|
||||||
|
VP10_PREFIX=vp10/
|
||||||
|
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10cx.mk
|
||||||
|
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_CX_SRCS))
|
||||||
|
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_CX_EXPORTS))
|
||||||
|
CODEC_SRCS-yes += $(VP10_PREFIX)vp10cx.mk vpx/vp8.h vpx/vp8cx.h
|
||||||
|
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
|
||||||
|
INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/vpx/svc_context.h
|
||||||
|
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
|
||||||
|
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
|
||||||
|
CODEC_DOC_SECTIONS += vp9 vp9_encoder
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_VP10_DECODER),yes)
|
||||||
|
VP10_PREFIX=vp10/
|
||||||
|
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10dx.mk
|
||||||
|
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_DX_SRCS))
|
||||||
|
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_DX_EXPORTS))
|
||||||
|
CODEC_SRCS-yes += $(VP10_PREFIX)vp10dx.mk vpx/vp8.h vpx/vp8dx.h
|
||||||
|
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
|
||||||
|
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
|
||||||
|
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
|
||||||
|
CODEC_DOC_SECTIONS += vp9 vp9_decoder
|
||||||
|
endif
|
||||||
|
|
||||||
|
VP10_PREFIX=vp10/
|
||||||
|
$(BUILD_PFX)$(VP10_PREFIX)%.c.o: CFLAGS += -Wextra
|
||||||
|
|
||||||
ifeq ($(CONFIG_ENCODERS),yes)
|
ifeq ($(CONFIG_ENCODERS),yes)
|
||||||
CODEC_DOC_SECTIONS += encoder
|
CODEC_DOC_SECTIONS += encoder
|
||||||
endif
|
endif
|
||||||
@@ -137,18 +170,18 @@ INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Release/%)
|
|||||||
INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Debug/%)
|
INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Debug/%)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += build/make/version.sh
|
CODEC_SRCS-yes += build/make/version.sh
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += build/make/rtcd.pl
|
CODEC_SRCS-yes += build/make/rtcd.pl
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/emmintrin_compat.h
|
CODEC_SRCS-yes += vpx_ports/emmintrin_compat.h
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/mem_ops.h
|
CODEC_SRCS-yes += vpx_ports/mem_ops.h
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/mem_ops_aligned.h
|
CODEC_SRCS-yes += vpx_ports/mem_ops_aligned.h
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_once.h
|
CODEC_SRCS-yes += vpx_ports/vpx_once.h
|
||||||
CODEC_SRCS-$(BUILD_LIBVPX) += $(BUILD_PFX)vpx_config.c
|
CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c
|
||||||
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
|
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
|
||||||
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
|
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
|
||||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
|
||||||
endif
|
endif
|
||||||
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports_com
|
CODEC_EXPORTS-yes += vpx/exports_com
|
||||||
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
|
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
|
||||||
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
||||||
|
|
||||||
@@ -215,7 +248,7 @@ vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def
|
|||||||
$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \
|
$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \
|
||||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||||
|
|
||||||
PROJECTS-$(BUILD_LIBVPX) += vpx.$(VCPROJ_SFX)
|
PROJECTS-yes += vpx.$(VCPROJ_SFX)
|
||||||
|
|
||||||
vpx.$(VCPROJ_SFX): vpx_config.asm
|
vpx.$(VCPROJ_SFX): vpx_config.asm
|
||||||
vpx.$(VCPROJ_SFX): $(RTCD)
|
vpx.$(VCPROJ_SFX): $(RTCD)
|
||||||
@@ -223,32 +256,42 @@ vpx.$(VCPROJ_SFX): $(RTCD)
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
|
LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
|
||||||
OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)
|
OBJS-yes += $(LIBVPX_OBJS)
|
||||||
LIBS-$(if $(BUILD_LIBVPX),$(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 := 3
|
||||||
BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
|
SO_VERSION_MINOR := 0
|
||||||
|
SO_VERSION_PATCH := 0
|
||||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
||||||
LIBVPX_SO := libvpx.$(VERSION_MAJOR).dylib
|
LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib
|
||||||
|
SHARED_LIB_SUF := .dylib
|
||||||
EXPORT_FILE := libvpx.syms
|
EXPORT_FILE := libvpx.syms
|
||||||
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
||||||
libvpx.dylib )
|
libvpx.dylib )
|
||||||
else
|
else
|
||||||
LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
|
ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
|
||||||
|
LIBVPX_SO := libvpx$(SO_VERSION_MAJOR).dll
|
||||||
|
SHARED_LIB_SUF := _dll.a
|
||||||
|
EXPORT_FILE := libvpx.def
|
||||||
|
LIBVPX_SO_SYMLINKS :=
|
||||||
|
LIBVPX_SO_IMPLIB := libvpx_dll.a
|
||||||
|
else
|
||||||
|
LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
|
||||||
|
SHARED_LIB_SUF := .so
|
||||||
EXPORT_FILE := libvpx.ver
|
EXPORT_FILE := libvpx.ver
|
||||||
SYM_LINK := libvpx.so
|
|
||||||
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
||||||
libvpx.so libvpx.so.$(VERSION_MAJOR) \
|
libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \
|
||||||
libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR))
|
libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\
|
LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
|
||||||
$(notdir $(LIBVPX_SO_SYMLINKS))
|
$(notdir $(LIBVPX_SO_SYMLINKS)) \
|
||||||
|
$(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB))
|
||||||
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
|
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
|
||||||
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
|
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
|
||||||
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
|
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
|
||||||
$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
|
$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
|
||||||
|
|
||||||
libvpx.ver: $(call enabled,CODEC_EXPORTS)
|
libvpx.ver: $(call enabled,CODEC_EXPORTS)
|
||||||
@@ -263,6 +306,19 @@ libvpx.syms: $(call enabled,CODEC_EXPORTS)
|
|||||||
$(qexec)awk '{print "_"$$2}' $^ >$@
|
$(qexec)awk '{print "_"$$2}' $^ >$@
|
||||||
CLEAN-OBJS += libvpx.syms
|
CLEAN-OBJS += libvpx.syms
|
||||||
|
|
||||||
|
libvpx.def: $(call enabled,CODEC_EXPORTS)
|
||||||
|
@echo " [CREATE] $@"
|
||||||
|
$(qexec)echo LIBRARY $(LIBVPX_SO:.dll=) INITINSTANCE TERMINSTANCE > $@
|
||||||
|
$(qexec)echo "DATA MULTIPLE NONSHARED" >> $@
|
||||||
|
$(qexec)echo "EXPORTS" >> $@
|
||||||
|
$(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@
|
||||||
|
CLEAN-OBJS += libvpx.def
|
||||||
|
|
||||||
|
libvpx_dll.a: $(LIBVPX_SO)
|
||||||
|
@echo " [IMPLIB] $@"
|
||||||
|
$(qexec)emximp -o $@ $<
|
||||||
|
CLEAN-OBJS += libvpx_dll.a
|
||||||
|
|
||||||
define libvpx_symlink_template
|
define libvpx_symlink_template
|
||||||
$(1): $(2)
|
$(1): $(2)
|
||||||
@echo " [LN] $(2) $$@"
|
@echo " [LN] $(2) $$@"
|
||||||
@@ -278,11 +334,12 @@ $(eval $(call libvpx_symlink_template,\
|
|||||||
$(LIBVPX_SO)))
|
$(LIBVPX_SO)))
|
||||||
|
|
||||||
|
|
||||||
INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBVPX_SO_SYMLINKS)
|
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
|
||||||
INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBSUBDIR)/$(LIBVPX_SO)
|
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
|
||||||
|
INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB))
|
||||||
|
|
||||||
|
|
||||||
LIBS-$(BUILD_LIBVPX) += vpx.pc
|
LIBS-yes += vpx.pc
|
||||||
vpx.pc: config.mk libs.mk
|
vpx.pc: config.mk libs.mk
|
||||||
@echo " [CREATE] $@"
|
@echo " [CREATE] $@"
|
||||||
$(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@
|
$(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@
|
||||||
@@ -308,9 +365,6 @@ INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
|
|||||||
CLEAN-OBJS += vpx.pc
|
CLEAN-OBJS += vpx.pc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS-$(LIPO_LIBVPX) += libvpx.a
|
|
||||||
$(eval $(if $(LIPO_LIBVPX),$(call lipo_lib_template,libvpx.a)))
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rule to make assembler configuration file from C configuration file
|
# Rule to make assembler configuration file from C configuration file
|
||||||
#
|
#
|
||||||
@@ -349,11 +403,15 @@ LIBVPX_TEST_DATA_PATH ?= .
|
|||||||
|
|
||||||
include $(SRC_PATH_BARE)/test/test.mk
|
include $(SRC_PATH_BARE)/test/test.mk
|
||||||
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
|
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
|
||||||
LIBVPX_TEST_BINS=./test_libvpx$(EXE_SFX)
|
LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX)
|
||||||
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
|
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
|
||||||
$(call enabled,LIBVPX_TEST_DATA))
|
$(call enabled,LIBVPX_TEST_DATA))
|
||||||
libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
|
libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
|
||||||
|
|
||||||
|
TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX)
|
||||||
|
TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS))
|
||||||
|
TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
|
||||||
|
|
||||||
libvpx_test_srcs.txt:
|
libvpx_test_srcs.txt:
|
||||||
@echo " [CREATE] $@"
|
@echo " [CREATE] $@"
|
||||||
@echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
|
@echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
|
||||||
@@ -371,12 +429,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
|
||||||
@@ -417,7 +473,25 @@ test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_
|
|||||||
|
|
||||||
PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
|
PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
|
||||||
|
|
||||||
LIBVPX_TEST_BINS := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BINS)))
|
LIBVPX_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BIN)))
|
||||||
|
|
||||||
|
ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
|
||||||
|
PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX)
|
||||||
|
test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
|
||||||
|
@echo " [CREATE] $@"
|
||||||
|
$(qexec)$(GEN_VCPROJ) \
|
||||||
|
--exe \
|
||||||
|
--target=$(TOOLCHAIN) \
|
||||||
|
--name=test_intra_pred_speed \
|
||||||
|
-D_VARIADIC_MAX=10 \
|
||||||
|
--proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
|
||||||
|
--ver=$(CONFIG_VS_VERSION) \
|
||||||
|
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||||
|
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||||
|
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
||||||
|
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
||||||
|
-L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
|
||||||
|
endif # TEST_INTRA_PRED_SPEED
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -428,45 +502,54 @@ ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS))
|
|||||||
# Disabling pthreads globally will cause issues on darwin and possibly elsewhere
|
# Disabling pthreads globally will cause issues on darwin and possibly elsewhere
|
||||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0
|
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0
|
||||||
endif
|
endif
|
||||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src
|
GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src
|
||||||
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
|
GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
|
||||||
OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS)
|
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
|
||||||
LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
|
OBJS-yes += $(GTEST_OBJS)
|
||||||
|
LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
|
||||||
$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS)
|
$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS)
|
||||||
|
|
||||||
LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS)))
|
LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS)))
|
||||||
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src
|
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
|
||||||
$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
|
OBJS-yes += $(LIBVPX_TEST_OBJS)
|
||||||
OBJS-$(BUILD_LIBVPX) += $(LIBVPX_TEST_OBJS)
|
BINS-yes += $(LIBVPX_TEST_BIN)
|
||||||
BINS-$(BUILD_LIBVPX) += $(LIBVPX_TEST_BINS)
|
|
||||||
|
|
||||||
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
|
CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
|
||||||
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.so,.a)
|
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
|
||||||
$(foreach bin,$(LIBVPX_TEST_BINS),\
|
TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a
|
||||||
$(if $(BUILD_LIBVPX),$(eval $(bin): \
|
$(LIBVPX_TEST_BIN): $(TEST_LIBS)
|
||||||
lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\
|
$(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \
|
||||||
$(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\
|
|
||||||
$(LIBVPX_TEST_OBJS) \
|
$(LIBVPX_TEST_OBJS) \
|
||||||
-L. -lvpx -lgtest $(extralibs) -lm)\
|
-L. -lvpx -lgtest $(extralibs) -lm))
|
||||||
)))\
|
|
||||||
$(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\
|
|
||||||
|
|
||||||
endif
|
ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
|
||||||
|
$(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
|
||||||
|
OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS)
|
||||||
|
BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN)
|
||||||
|
|
||||||
|
$(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS)
|
||||||
|
$(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \
|
||||||
|
$(TEST_INTRA_PRED_SPEED_OBJS) \
|
||||||
|
-L. -lvpx -lgtest $(extralibs) -lm))
|
||||||
|
endif # TEST_INTRA_PRED_SPEED
|
||||||
|
|
||||||
|
endif # CONFIG_UNIT_TESTS
|
||||||
|
|
||||||
# Install test sources only if codec source is included
|
# Install test sources only if codec source is included
|
||||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
|
||||||
$(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
|
$(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
|
||||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
|
||||||
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS)
|
||||||
|
|
||||||
define test_shard_template
|
define test_shard_template
|
||||||
test:: test_shard.$(1)
|
test:: test_shard.$(1)
|
||||||
test_shard.$(1): $(LIBVPX_TEST_BINS) testdata
|
test-no-data-check:: test_shard_ndc.$(1)
|
||||||
|
test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN)
|
||||||
@set -e; \
|
@set -e; \
|
||||||
for t in $(LIBVPX_TEST_BINS); do \
|
|
||||||
export GTEST_SHARD_INDEX=$(1); \
|
export GTEST_SHARD_INDEX=$(1); \
|
||||||
export GTEST_TOTAL_SHARDS=$(2); \
|
export GTEST_TOTAL_SHARDS=$(2); \
|
||||||
$$$$t; \
|
$(LIBVPX_TEST_BIN)
|
||||||
done
|
test_shard.$(1): testdata
|
||||||
.PHONY: test_shard.$(1)
|
.PHONY: test_shard.$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -511,15 +594,16 @@ ifeq ($(CONFIG_MSVS),yes)
|
|||||||
# TODO(tomfinegan): Support running the debug versions of tools?
|
# TODO(tomfinegan): Support running the debug versions of tools?
|
||||||
TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
|
TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
|
||||||
endif
|
endif
|
||||||
utiltest: testdata
|
utiltest utiltest-no-data-check:
|
||||||
$(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
|
$(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
|
||||||
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
||||||
--bin-path $(TEST_BIN_PATH)
|
--bin-path $(TEST_BIN_PATH)
|
||||||
$(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
|
$(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
|
||||||
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
||||||
--bin-path $(TEST_BIN_PATH)
|
--bin-path $(TEST_BIN_PATH)
|
||||||
|
utiltest: testdata
|
||||||
else
|
else
|
||||||
utiltest:
|
utiltest utiltest-no-data-check:
|
||||||
@echo Unit tests must be enabled to make the utiltest target.
|
@echo Unit tests must be enabled to make the utiltest target.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -537,11 +621,12 @@ ifeq ($(CONFIG_MSVS),yes)
|
|||||||
# TODO(tomfinegan): Support running the debug versions of tools?
|
# TODO(tomfinegan): Support running the debug versions of tools?
|
||||||
EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
|
EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
|
||||||
endif
|
endif
|
||||||
exampletest: examples testdata
|
exampletest exampletest-no-data-check: examples
|
||||||
$(qexec)$(SRC_PATH_BARE)/test/examples.sh \
|
$(qexec)$(SRC_PATH_BARE)/test/examples.sh \
|
||||||
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
|
||||||
--bin-path $(EXAMPLES_BIN_PATH)
|
--bin-path $(EXAMPLES_BIN_PATH)
|
||||||
|
exampletest: testdata
|
||||||
else
|
else
|
||||||
exampletest:
|
exampletest exampletest-no-data-check:
|
||||||
@echo Unit tests must be enabled to make the exampletest target.
|
@echo Unit tests must be enabled to make the exampletest target.
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "md5_utils.h"
|
#include "md5_utils.h"
|
||||||
|
|
||||||
void
|
static void
|
||||||
byteSwap(UWORD32 *buf, unsigned words) {
|
byteSwap(UWORD32 *buf, unsigned words) {
|
||||||
md5byte *p;
|
md5byte *p;
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ void update_rate_histogram(struct rate_hist *hist,
|
|||||||
if (now < cfg->rc_buf_initial_sz)
|
if (now < cfg->rc_buf_initial_sz)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!cfg->rc_target_bitrate)
|
||||||
|
return;
|
||||||
|
|
||||||
then = now;
|
then = now;
|
||||||
|
|
||||||
/* Sum the size over the past rc_buf_sz ms */
|
/* Sum the size over the past rc_buf_sz ms */
|
||||||
|
|||||||
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 6));
|
||||||
|
} // namespace
|
||||||
@@ -83,7 +83,7 @@ TEST_P(ActiveMapTest, Test) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
|
VP10_INSTANTIATE_TEST_CASE(ActiveMapTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime),
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
::testing::Range(0, 6));
|
::testing::Range(0, 6));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,69 +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 "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/encode_test_driver.h"
|
|
||||||
#include "test/i420_video_source.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
// lookahead range: [kLookAheadMin, kLookAheadMax).
|
|
||||||
const int kLookAheadMin = 5;
|
|
||||||
const int kLookAheadMax = 26;
|
|
||||||
|
|
||||||
class AltRefTest : public ::libvpx_test::EncoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<int> {
|
|
||||||
protected:
|
|
||||||
AltRefTest() : EncoderTest(GET_PARAM(0)), altref_count_(0) {}
|
|
||||||
virtual ~AltRefTest() {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
InitializeConfig();
|
|
||||||
SetMode(libvpx_test::kTwoPassGood);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void BeginPassHook(unsigned int pass) {
|
|
||||||
altref_count_ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
|
||||||
libvpx_test::Encoder *encoder) {
|
|
||||||
if (video->frame() == 1) {
|
|
||||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
|
||||||
encoder->Control(VP8E_SET_CPUUSED, 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
|
||||||
if (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) ++altref_count_;
|
|
||||||
}
|
|
||||||
|
|
||||||
int altref_count() const { return altref_count_; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
int altref_count_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_P(AltRefTest, MonotonicTimestamps) {
|
|
||||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
|
||||||
cfg_.g_timebase = timebase;
|
|
||||||
cfg_.rc_target_bitrate = 1000;
|
|
||||||
cfg_.g_lag_in_frames = GET_PARAM(1);
|
|
||||||
|
|
||||||
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
|
||||||
timebase.den, timebase.num, 0, 30);
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
EXPECT_GE(altref_count(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(AltRefTest,
|
|
||||||
::testing::Range(kLookAheadMin, kLookAheadMax));
|
|
||||||
} // namespace
|
|
||||||
@@ -40,9 +40,17 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_ARM_MODE := arm
|
LOCAL_ARM_MODE := arm
|
||||||
LOCAL_MODULE := libvpx_test
|
LOCAL_MODULE := libvpx_test
|
||||||
LOCAL_STATIC_LIBRARIES := gtest libwebm
|
LOCAL_STATIC_LIBRARIES := gtest libwebm
|
||||||
LOCAL_SHARED_LIBRARIES := vpx
|
|
||||||
|
ifeq ($(ENABLE_SHARED),1)
|
||||||
|
LOCAL_SHARED_LIBRARIES := vpx
|
||||||
|
else
|
||||||
|
LOCAL_STATIC_LIBRARIES += vpx
|
||||||
|
endif
|
||||||
|
|
||||||
include $(LOCAL_PATH)/test/test.mk
|
include $(LOCAL_PATH)/test/test.mk
|
||||||
LOCAL_C_INCLUDES := $(BINDINGS_DIR)
|
LOCAL_C_INCLUDES := $(BINDINGS_DIR)
|
||||||
FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBVPX_TEST_SRCS-yes)))
|
FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBVPX_TEST_SRCS-yes)))
|
||||||
LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
|
LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
|
||||||
|
# some test files depend on *_rtcd.h, ensure they're generated first.
|
||||||
|
$(eval $(call rtcd_dep_template))
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ TEST_P(AqSegmentTest, TestNoMisMatchAQ3) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(AqSegmentTest,
|
VP10_INSTANTIATE_TEST_CASE(AqSegmentTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime,
|
::testing::Values(::libvpx_test::kRealTime,
|
||||||
::libvpx_test::kOnePassGood),
|
::libvpx_test::kOnePassGood),
|
||||||
::testing::Range(3, 9));
|
::testing::Range(3, 9));
|
||||||
|
|||||||
246
test/arf_freq_test.cc
Normal file
246
test/arf_freq_test.cc
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
/*
|
||||||
|
* 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 "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"
|
||||||
|
#include "test/yuv_video_source.h"
|
||||||
|
#include "vp10/encoder/ratectrl.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const unsigned int kFrames = 100;
|
||||||
|
const int kBitrate = 500;
|
||||||
|
|
||||||
|
#define ARF_NOT_SEEN 1000001
|
||||||
|
#define ARF_SEEN_ONCE 1000000
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char *filename;
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
unsigned int framerate_num;
|
||||||
|
unsigned int framerate_den;
|
||||||
|
unsigned int input_bit_depth;
|
||||||
|
vpx_img_fmt fmt;
|
||||||
|
vpx_bit_depth_t bit_depth;
|
||||||
|
unsigned int profile;
|
||||||
|
} TestVideoParam;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
libvpx_test::TestMode mode;
|
||||||
|
int cpu_used;
|
||||||
|
} TestEncodeParam;
|
||||||
|
|
||||||
|
const TestVideoParam kTestVectors[] = {
|
||||||
|
// artificially increase framerate to trigger default check
|
||||||
|
{"hantro_collage_w352h288.yuv", 352, 288, 5000, 1,
|
||||||
|
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
|
||||||
|
{"hantro_collage_w352h288.yuv", 352, 288, 30, 1,
|
||||||
|
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
|
||||||
|
{"rush_hour_444.y4m", 352, 288, 30, 1,
|
||||||
|
8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
|
||||||
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
// Add list of profile 2/3 test videos here ...
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
};
|
||||||
|
|
||||||
|
const TestEncodeParam kEncodeVectors[] = {
|
||||||
|
{::libvpx_test::kOnePassGood, 2},
|
||||||
|
{::libvpx_test::kOnePassGood, 5},
|
||||||
|
{::libvpx_test::kTwoPassGood, 1},
|
||||||
|
{::libvpx_test::kTwoPassGood, 2},
|
||||||
|
{::libvpx_test::kTwoPassGood, 5},
|
||||||
|
{::libvpx_test::kRealTime, 5},
|
||||||
|
};
|
||||||
|
|
||||||
|
const int kMinArfVectors[] = {
|
||||||
|
// NOTE: 0 refers to the default built-in logic in:
|
||||||
|
// vp9_rc_get_default_min_gf_interval(...)
|
||||||
|
0, 4, 8, 12, 15
|
||||||
|
};
|
||||||
|
|
||||||
|
int is_extension_y4m(const char *filename) {
|
||||||
|
const char *dot = strrchr(filename, '.');
|
||||||
|
if (!dot || dot == filename)
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return !strcmp(dot, ".y4m");
|
||||||
|
}
|
||||||
|
|
||||||
|
class ArfFreqTest
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith3Params<TestVideoParam, \
|
||||||
|
TestEncodeParam, int> {
|
||||||
|
protected:
|
||||||
|
ArfFreqTest()
|
||||||
|
: EncoderTest(GET_PARAM(0)),
|
||||||
|
test_video_param_(GET_PARAM(1)),
|
||||||
|
test_encode_param_(GET_PARAM(2)),
|
||||||
|
min_arf_requested_(GET_PARAM(3)) {
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~ArfFreqTest() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(test_encode_param_.mode);
|
||||||
|
if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
|
||||||
|
cfg_.g_lag_in_frames = 25;
|
||||||
|
cfg_.rc_end_usage = VPX_VBR;
|
||||||
|
} else {
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 600;
|
||||||
|
}
|
||||||
|
dec_cfg_.threads = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void BeginPassHook(unsigned int) {
|
||||||
|
min_run_ = ARF_NOT_SEEN;
|
||||||
|
run_of_visible_frames_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetNumFramesInPkt(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
|
const uint8_t *buffer = reinterpret_cast<uint8_t*>(pkt->data.frame.buf);
|
||||||
|
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
|
||||||
|
const int mag = ((marker >> 3) & 3) + 1;
|
||||||
|
int frames = (marker & 0x7) + 1;
|
||||||
|
const unsigned int index_sz = 2 + mag * frames;
|
||||||
|
// Check for superframe or not.
|
||||||
|
// Assume superframe has only one visible frame, the rest being
|
||||||
|
// invisible. If superframe index is not found, then there is only
|
||||||
|
// one frame.
|
||||||
|
if (!((marker & 0xe0) == 0xc0 &&
|
||||||
|
pkt->data.frame.sz >= index_sz &&
|
||||||
|
buffer[pkt->data.frame.sz - index_sz] == marker)) {
|
||||||
|
frames = 1;
|
||||||
|
}
|
||||||
|
return frames;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
|
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
|
||||||
|
return;
|
||||||
|
const int frames = GetNumFramesInPkt(pkt);
|
||||||
|
if (frames == 1) {
|
||||||
|
run_of_visible_frames_++;
|
||||||
|
} else if (frames == 2) {
|
||||||
|
if (min_run_ == ARF_NOT_SEEN) {
|
||||||
|
min_run_ = ARF_SEEN_ONCE;
|
||||||
|
} else if (min_run_ == ARF_SEEN_ONCE ||
|
||||||
|
run_of_visible_frames_ < min_run_) {
|
||||||
|
min_run_ = run_of_visible_frames_;
|
||||||
|
}
|
||||||
|
run_of_visible_frames_ = 1;
|
||||||
|
} else {
|
||||||
|
min_run_ = 0;
|
||||||
|
run_of_visible_frames_ = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||||
|
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, test_encode_param_.cpu_used);
|
||||||
|
encoder->Control(VP9E_SET_MIN_GF_INTERVAL, min_arf_requested_);
|
||||||
|
if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
|
||||||
|
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetMinVisibleRun() const {
|
||||||
|
return min_run_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetMinArfDistanceRequested() const {
|
||||||
|
if (min_arf_requested_)
|
||||||
|
return min_arf_requested_;
|
||||||
|
else
|
||||||
|
return vp10_rc_get_default_min_gf_interval(
|
||||||
|
test_video_param_.width, test_video_param_.height,
|
||||||
|
(double)test_video_param_.framerate_num /
|
||||||
|
test_video_param_.framerate_den);
|
||||||
|
}
|
||||||
|
|
||||||
|
TestVideoParam test_video_param_;
|
||||||
|
TestEncodeParam test_encode_param_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int min_arf_requested_;
|
||||||
|
int min_run_;
|
||||||
|
int run_of_visible_frames_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(ArfFreqTest, MinArfFreqTest) {
|
||||||
|
cfg_.rc_target_bitrate = kBitrate;
|
||||||
|
cfg_.g_error_resilient = 0;
|
||||||
|
cfg_.g_profile = test_video_param_.profile;
|
||||||
|
cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
|
||||||
|
cfg_.g_bit_depth = test_video_param_.bit_depth;
|
||||||
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
if (cfg_.g_bit_depth > 8)
|
||||||
|
init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
|
||||||
|
|
||||||
|
libvpx_test::VideoSource *video;
|
||||||
|
if (is_extension_y4m(test_video_param_.filename)) {
|
||||||
|
video = new libvpx_test::Y4mVideoSource(test_video_param_.filename,
|
||||||
|
0, kFrames);
|
||||||
|
} else {
|
||||||
|
video = new libvpx_test::YUVVideoSource(test_video_param_.filename,
|
||||||
|
test_video_param_.fmt,
|
||||||
|
test_video_param_.width,
|
||||||
|
test_video_param_.height,
|
||||||
|
test_video_param_.framerate_num,
|
||||||
|
test_video_param_.framerate_den,
|
||||||
|
0, kFrames);
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||||
|
const int min_run = GetMinVisibleRun();
|
||||||
|
const int min_arf_dist_requested = GetMinArfDistanceRequested();
|
||||||
|
if (min_run != ARF_NOT_SEEN && min_run != ARF_SEEN_ONCE) {
|
||||||
|
const int min_arf_dist = min_run + 1;
|
||||||
|
EXPECT_GE(min_arf_dist, min_arf_dist_requested);
|
||||||
|
}
|
||||||
|
delete(video);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CONFIG_VPX_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(
|
||||||
|
ArfFreqTest,
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
} // namespace
|
||||||
411
test/avg_test.cc
Normal file
411
test/avg_test.cc
Normal file
@@ -0,0 +1,411 @@
|
|||||||
|
/*
|
||||||
|
* 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 <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.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 "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
class AverageTestBase : public ::testing::Test {
|
||||||
|
public:
|
||||||
|
AverageTestBase(int width, int height) : width_(width), height_(height) {}
|
||||||
|
|
||||||
|
static void SetUpTestCase() {
|
||||||
|
source_data_ = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBlockSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TearDownTestCase() {
|
||||||
|
vpx_free(source_data_);
|
||||||
|
source_data_ = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Handle blocks up to 4 blocks 64x64 with stride up to 128
|
||||||
|
static const int kDataAlignment = 16;
|
||||||
|
static const int kDataBlockSize = 64 * 128;
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
source_stride_ = (width_ + 31) & ~31;
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sum Pixels
|
||||||
|
unsigned int ReferenceAverage8x8(const uint8_t* source, int pitch ) {
|
||||||
|
unsigned int average = 0;
|
||||||
|
for (int h = 0; h < 8; ++h)
|
||||||
|
for (int w = 0; w < 8; ++w)
|
||||||
|
average += source[h * source_stride_ + w];
|
||||||
|
return ((average + 32) >> 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int ReferenceAverage4x4(const uint8_t* source, int pitch ) {
|
||||||
|
unsigned int average = 0;
|
||||||
|
for (int h = 0; h < 4; ++h)
|
||||||
|
for (int w = 0; w < 4; ++w)
|
||||||
|
average += source[h * source_stride_ + w];
|
||||||
|
return ((average + 8) >> 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillConstant(uint8_t fill_constant) {
|
||||||
|
for (int i = 0; i < width_ * height_; ++i) {
|
||||||
|
source_data_[i] = fill_constant;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom() {
|
||||||
|
for (int i = 0; i < width_ * height_; ++i) {
|
||||||
|
source_data_[i] = rnd_.Rand8();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int width_, height_;
|
||||||
|
static uint8_t* source_data_;
|
||||||
|
int source_stride_;
|
||||||
|
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
typedef unsigned int (*AverageFunction)(const uint8_t* s, int pitch);
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<int, int, int, int, AverageFunction> AvgFunc;
|
||||||
|
|
||||||
|
class AverageTest
|
||||||
|
: public AverageTestBase,
|
||||||
|
public ::testing::WithParamInterface<AvgFunc>{
|
||||||
|
public:
|
||||||
|
AverageTest() : AverageTestBase(GET_PARAM(0), GET_PARAM(1)) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void CheckAverages() {
|
||||||
|
unsigned int expected = 0;
|
||||||
|
if (GET_PARAM(3) == 8) {
|
||||||
|
expected = ReferenceAverage8x8(source_data_+ GET_PARAM(2),
|
||||||
|
source_stride_);
|
||||||
|
} else if (GET_PARAM(3) == 4) {
|
||||||
|
expected = ReferenceAverage4x4(source_data_+ GET_PARAM(2),
|
||||||
|
source_stride_);
|
||||||
|
}
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(GET_PARAM(4)(source_data_+ GET_PARAM(2),
|
||||||
|
source_stride_));
|
||||||
|
unsigned int actual = GET_PARAM(4)(source_data_+ GET_PARAM(2),
|
||||||
|
source_stride_);
|
||||||
|
|
||||||
|
EXPECT_EQ(expected, actual);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref,
|
||||||
|
const int ref_stride, const int height);
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<int, IntProRowFunc, IntProRowFunc> IntProRowParam;
|
||||||
|
|
||||||
|
class IntProRowTest
|
||||||
|
: public AverageTestBase,
|
||||||
|
public ::testing::WithParamInterface<IntProRowParam> {
|
||||||
|
public:
|
||||||
|
IntProRowTest()
|
||||||
|
: AverageTestBase(16, GET_PARAM(0)),
|
||||||
|
hbuf_asm_(NULL),
|
||||||
|
hbuf_c_(NULL) {
|
||||||
|
asm_func_ = GET_PARAM(1);
|
||||||
|
c_func_ = GET_PARAM(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void SetUp() {
|
||||||
|
hbuf_asm_ = reinterpret_cast<int16_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16));
|
||||||
|
hbuf_c_ = reinterpret_cast<int16_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
vpx_free(hbuf_c_);
|
||||||
|
hbuf_c_ = NULL;
|
||||||
|
vpx_free(hbuf_asm_);
|
||||||
|
hbuf_asm_ = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RunComparison() {
|
||||||
|
ASM_REGISTER_STATE_CHECK(c_func_(hbuf_c_, source_data_, 0, height_));
|
||||||
|
ASM_REGISTER_STATE_CHECK(asm_func_(hbuf_asm_, source_data_, 0, height_));
|
||||||
|
EXPECT_EQ(0, memcmp(hbuf_c_, hbuf_asm_, sizeof(*hbuf_c_) * 16))
|
||||||
|
<< "Output mismatch";
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
IntProRowFunc asm_func_;
|
||||||
|
IntProRowFunc c_func_;
|
||||||
|
int16_t *hbuf_asm_;
|
||||||
|
int16_t *hbuf_c_;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef int16_t (*IntProColFunc)(uint8_t const *ref, const int width);
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<int, IntProColFunc, IntProColFunc> IntProColParam;
|
||||||
|
|
||||||
|
class IntProColTest
|
||||||
|
: public AverageTestBase,
|
||||||
|
public ::testing::WithParamInterface<IntProColParam> {
|
||||||
|
public:
|
||||||
|
IntProColTest() : AverageTestBase(GET_PARAM(0), 1), sum_asm_(0), sum_c_(0) {
|
||||||
|
asm_func_ = GET_PARAM(1);
|
||||||
|
c_func_ = GET_PARAM(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void RunComparison() {
|
||||||
|
ASM_REGISTER_STATE_CHECK(sum_c_ = c_func_(source_data_, width_));
|
||||||
|
ASM_REGISTER_STATE_CHECK(sum_asm_ = asm_func_(source_data_, width_));
|
||||||
|
EXPECT_EQ(sum_c_, sum_asm_) << "Output mismatch";
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
IntProColFunc asm_func_;
|
||||||
|
IntProColFunc c_func_;
|
||||||
|
int16_t sum_asm_;
|
||||||
|
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;
|
||||||
|
|
||||||
|
TEST_P(AverageTest, MinValue) {
|
||||||
|
FillConstant(0);
|
||||||
|
CheckAverages();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(AverageTest, MaxValue) {
|
||||||
|
FillConstant(255);
|
||||||
|
CheckAverages();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(AverageTest, Random) {
|
||||||
|
// The reference frame, but not the source frame, may be unaligned for
|
||||||
|
// certain types of searches.
|
||||||
|
for (int i = 0; i < 1000; i++) {
|
||||||
|
FillRandom();
|
||||||
|
CheckAverages();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProRowTest, MinValue) {
|
||||||
|
FillConstant(0);
|
||||||
|
RunComparison();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProRowTest, MaxValue) {
|
||||||
|
FillConstant(255);
|
||||||
|
RunComparison();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProRowTest, Random) {
|
||||||
|
FillRandom();
|
||||||
|
RunComparison();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProColTest, MinValue) {
|
||||||
|
FillConstant(0);
|
||||||
|
RunComparison();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProColTest, MaxValue) {
|
||||||
|
FillConstant(255);
|
||||||
|
RunComparison();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(IntProColTest, Random) {
|
||||||
|
FillRandom();
|
||||||
|
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;
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, AverageTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, 16, 1, 8, &vpx_avg_8x8_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
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, AverageTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2),
|
||||||
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2),
|
||||||
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_sse2),
|
||||||
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_sse2),
|
||||||
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2),
|
||||||
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, IntProRowTest, ::testing::Values(
|
||||||
|
make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
|
make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
|
make_tuple(64, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, IntProColTest, ::testing::Values(
|
||||||
|
make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||||
|
make_tuple(32, &vpx_int_pro_col_sse2, &vpx_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
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
NEON, AverageTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon),
|
||||||
|
make_tuple(16, 16, 5, 8, &vpx_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(
|
||||||
|
NEON, IntProRowTest, ::testing::Values(
|
||||||
|
make_tuple(16, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||||
|
make_tuple(32, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||||
|
make_tuple(64, &vpx_int_pro_row_neon, &vpx_int_pro_row_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
NEON, IntProColTest, ::testing::Values(
|
||||||
|
make_tuple(16, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
|
||||||
|
make_tuple(32, &vpx_int_pro_col_neon, &vpx_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
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, AverageTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa),
|
||||||
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa),
|
||||||
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_msa),
|
||||||
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_msa),
|
||||||
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa),
|
||||||
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace
|
||||||
229
test/blockiness_test.cc
Normal file
229
test/blockiness_test.cc
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
/*
|
||||||
|
* 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 <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
|
||||||
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
double vp9_get_blockiness(const unsigned char *img1, int img1_pitch,
|
||||||
|
const unsigned char *img2, int img2_pitch,
|
||||||
|
int width, int height);
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
class BlockinessTestBase : public ::testing::Test {
|
||||||
|
public:
|
||||||
|
BlockinessTestBase(int width, int height) : width_(width), height_(height) {}
|
||||||
|
|
||||||
|
static void SetUpTestCase() {
|
||||||
|
source_data_ = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
reference_data_ = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TearDownTestCase() {
|
||||||
|
vpx_free(source_data_);
|
||||||
|
source_data_ = NULL;
|
||||||
|
vpx_free(reference_data_);
|
||||||
|
reference_data_ = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Handle frames up to 640x480
|
||||||
|
static const int kDataAlignment = 16;
|
||||||
|
static const int kDataBufferSize = 640*480;
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
source_stride_ = (width_ + 31) & ~31;
|
||||||
|
reference_stride_ = width_ * 2;
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillConstant(uint8_t *data, int stride, uint8_t fill_constant,
|
||||||
|
int width, int height) {
|
||||||
|
for (int h = 0; h < height; ++h) {
|
||||||
|
for (int w = 0; w < width; ++w) {
|
||||||
|
data[h * stride + w] = fill_constant;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillConstant(uint8_t *data, int stride, uint8_t fill_constant) {
|
||||||
|
FillConstant(data, stride, fill_constant, width_, height_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom(uint8_t *data, int stride, int width, int height) {
|
||||||
|
for (int h = 0; h < height; ++h) {
|
||||||
|
for (int w = 0; w < width; ++w) {
|
||||||
|
data[h * stride + w] = rnd_.Rand8();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom(uint8_t *data, int stride) {
|
||||||
|
FillRandom(data, stride, width_, height_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandomBlocky(uint8_t *data, int stride) {
|
||||||
|
for (int h = 0; h < height_; h += 4) {
|
||||||
|
for (int w = 0; w < width_; w += 4) {
|
||||||
|
FillRandom(data + h * stride + w, stride, 4, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillCheckerboard(uint8_t *data, int stride) {
|
||||||
|
for (int h = 0; h < height_; h += 4) {
|
||||||
|
for (int w = 0; w < width_; w += 4) {
|
||||||
|
if (((h/4) ^ (w/4)) & 1)
|
||||||
|
FillConstant(data + h * stride + w, stride, 255, 4, 4);
|
||||||
|
else
|
||||||
|
FillConstant(data + h * stride + w, stride, 0, 4, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Blur(uint8_t *data, int stride, int taps) {
|
||||||
|
int sum = 0;
|
||||||
|
int half_taps = taps / 2;
|
||||||
|
for (int h = 0; h < height_; ++h) {
|
||||||
|
for (int w = 0; w < taps; ++w) {
|
||||||
|
sum += data[w + h * stride];
|
||||||
|
}
|
||||||
|
for (int w = taps; w < width_; ++w) {
|
||||||
|
sum += data[w + h * stride] - data[w - taps + h * stride];
|
||||||
|
data[w - half_taps + h * stride] = (sum + half_taps) / taps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int w = 0; w < width_; ++w) {
|
||||||
|
for (int h = 0; h < taps; ++h) {
|
||||||
|
sum += data[h + w * stride];
|
||||||
|
}
|
||||||
|
for (int h = taps; h < height_; ++h) {
|
||||||
|
sum += data[w + h * stride] - data[(h - taps) * stride + w];
|
||||||
|
data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int width_, height_;
|
||||||
|
static uint8_t* source_data_;
|
||||||
|
int source_stride_;
|
||||||
|
static uint8_t* reference_data_;
|
||||||
|
int reference_stride_;
|
||||||
|
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
typedef std::tr1::tuple<int, int> BlockinessParam;
|
||||||
|
class BlockinessVP9Test
|
||||||
|
: public BlockinessTestBase,
|
||||||
|
public ::testing::WithParamInterface<BlockinessParam> {
|
||||||
|
public:
|
||||||
|
BlockinessVP9Test() : BlockinessTestBase(GET_PARAM(0), GET_PARAM(1)) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int CheckBlockiness() {
|
||||||
|
return vp9_get_blockiness(source_data_, source_stride_,
|
||||||
|
reference_data_, reference_stride_,
|
||||||
|
width_, height_);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif // CONFIG_VP9_ENCODER
|
||||||
|
|
||||||
|
uint8_t* BlockinessTestBase::source_data_ = NULL;
|
||||||
|
uint8_t* BlockinessTestBase::reference_data_ = NULL;
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
TEST_P(BlockinessVP9Test, SourceBlockierThanReference) {
|
||||||
|
// Source is blockier than reference.
|
||||||
|
FillRandomBlocky(source_data_, source_stride_);
|
||||||
|
FillConstant(reference_data_, reference_stride_, 128);
|
||||||
|
int super_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
EXPECT_EQ(0, super_blocky) << "Blocky source should produce 0 blockiness.";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(BlockinessVP9Test, ReferenceBlockierThanSource) {
|
||||||
|
// Source is blockier than reference.
|
||||||
|
FillConstant(source_data_, source_stride_, 128);
|
||||||
|
FillRandomBlocky(reference_data_, reference_stride_);
|
||||||
|
int super_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
EXPECT_GT(super_blocky, 0.0)
|
||||||
|
<< "Blocky reference should score high for blockiness.";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(BlockinessVP9Test, BlurringDecreasesBlockiness) {
|
||||||
|
// Source is blockier than reference.
|
||||||
|
FillConstant(source_data_, source_stride_, 128);
|
||||||
|
FillRandomBlocky(reference_data_, reference_stride_);
|
||||||
|
int super_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
Blur(reference_data_, reference_stride_, 4);
|
||||||
|
int less_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
EXPECT_GT(super_blocky, less_blocky)
|
||||||
|
<< "A straight blur should decrease blockiness.";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(BlockinessVP9Test, WorstCaseBlockiness) {
|
||||||
|
// Source is blockier than reference.
|
||||||
|
FillConstant(source_data_, source_stride_, 128);
|
||||||
|
FillCheckerboard(reference_data_, reference_stride_);
|
||||||
|
|
||||||
|
int super_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
Blur(reference_data_, reference_stride_, 4);
|
||||||
|
int less_blocky = CheckBlockiness();
|
||||||
|
|
||||||
|
EXPECT_GT(super_blocky, less_blocky)
|
||||||
|
<< "A straight blur should decrease blockiness.";
|
||||||
|
}
|
||||||
|
#endif // CONFIG_VP9_ENCODER
|
||||||
|
|
||||||
|
|
||||||
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// C functions
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
const BlockinessParam c_vp9_tests[] = {
|
||||||
|
make_tuple(320, 240),
|
||||||
|
make_tuple(318, 242),
|
||||||
|
make_tuple(318, 238),
|
||||||
|
};
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, BlockinessVP9Test, ::testing::ValuesIn(c_vp9_tests));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace
|
||||||
@@ -14,11 +14,10 @@
|
|||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "vp9/decoder/vp9_reader.h"
|
|
||||||
#include "vp9/encoder/vp9_writer.h"
|
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_dsp/bitreader.h"
|
||||||
|
#include "vpx_dsp/bitwriter.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -50,9 +49,9 @@ TEST(VP9, TestBitIO) {
|
|||||||
const int random_seed = 6432;
|
const int random_seed = 6432;
|
||||||
const int kBufferSize = 10000;
|
const int kBufferSize = 10000;
|
||||||
ACMRandom bit_rnd(random_seed);
|
ACMRandom bit_rnd(random_seed);
|
||||||
vp9_writer bw;
|
vpx_writer bw;
|
||||||
uint8_t bw_buffer[kBufferSize];
|
uint8_t bw_buffer[kBufferSize];
|
||||||
vp9_start_encode(&bw, bw_buffer);
|
vpx_start_encode(&bw, bw_buffer);
|
||||||
|
|
||||||
int bit = (bit_method == 0) ? 0 : (bit_method == 1) ? 1 : 0;
|
int bit = (bit_method == 0) ? 0 : (bit_method == 1) ? 1 : 0;
|
||||||
for (int i = 0; i < kBitsToTest; ++i) {
|
for (int i = 0; i < kBitsToTest; ++i) {
|
||||||
@@ -61,16 +60,16 @@ TEST(VP9, TestBitIO) {
|
|||||||
} else if (bit_method == 3) {
|
} else if (bit_method == 3) {
|
||||||
bit = bit_rnd(2);
|
bit = bit_rnd(2);
|
||||||
}
|
}
|
||||||
vp9_write(&bw, bit, static_cast<int>(probas[i]));
|
vpx_write(&bw, bit, static_cast<int>(probas[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
vp9_stop_encode(&bw);
|
vpx_stop_encode(&bw);
|
||||||
|
|
||||||
// First bit should be zero
|
// First bit should be zero
|
||||||
GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
|
GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
|
||||||
|
|
||||||
vp9_reader br;
|
vpx_reader br;
|
||||||
vp9_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
|
vpx_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
|
||||||
bit_rnd.Reset(random_seed);
|
bit_rnd.Reset(random_seed);
|
||||||
for (int i = 0; i < kBitsToTest; ++i) {
|
for (int i = 0; i < kBitsToTest; ++i) {
|
||||||
if (bit_method == 2) {
|
if (bit_method == 2) {
|
||||||
@@ -78,7 +77,7 @@ TEST(VP9, TestBitIO) {
|
|||||||
} else if (bit_method == 3) {
|
} else if (bit_method == 3) {
|
||||||
bit = bit_rnd(2);
|
bit = bit_rnd(2);
|
||||||
}
|
}
|
||||||
GTEST_ASSERT_EQ(vp9_read(&br, probas[i]), bit)
|
GTEST_ASSERT_EQ(vpx_read(&br, probas[i]), bit)
|
||||||
<< "pos: " << i << " / " << kBitsToTest
|
<< "pos: " << i << " / " << kBitsToTest
|
||||||
<< " bit_method: " << bit_method
|
<< " bit_method: " << bit_method
|
||||||
<< " method: " << method;
|
<< " method: " << method;
|
||||||
@@ -78,6 +78,6 @@ TEST_P(BordersTest, TestLowBitrate) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2014 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>
|
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/decode_test_driver.h"
|
|
||||||
#include "test/md5_helper.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
#include "test/webm_video_source.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const int kLegacyByteAlignment = 0;
|
|
||||||
const int kLegacyYPlaneByteAlignment = 32;
|
|
||||||
const int kNumPlanesToCheck = 3;
|
|
||||||
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
|
||||||
const char kVP9Md5File[] = "vp90-2-02-size-lf-1920x1080.webm.md5";
|
|
||||||
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
|
|
||||||
struct ByteAlignmentTestParam {
|
|
||||||
int byte_alignment;
|
|
||||||
vpx_codec_err_t expected_value;
|
|
||||||
bool decode_remaining;
|
|
||||||
};
|
|
||||||
|
|
||||||
const ByteAlignmentTestParam kBaTestParams[] = {
|
|
||||||
{kLegacyByteAlignment, VPX_CODEC_OK, true},
|
|
||||||
{32, VPX_CODEC_OK, true},
|
|
||||||
{64, VPX_CODEC_OK, true},
|
|
||||||
{128, VPX_CODEC_OK, true},
|
|
||||||
{256, VPX_CODEC_OK, true},
|
|
||||||
{512, VPX_CODEC_OK, true},
|
|
||||||
{1024, VPX_CODEC_OK, true},
|
|
||||||
{1, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
{-2, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
{4, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
{16, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
{255, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
{2048, VPX_CODEC_INVALID_PARAM, false},
|
|
||||||
};
|
|
||||||
|
|
||||||
// Class for testing byte alignment of reference buffers.
|
|
||||||
class ByteAlignmentTest
|
|
||||||
: public ::testing::TestWithParam<ByteAlignmentTestParam> {
|
|
||||||
protected:
|
|
||||||
ByteAlignmentTest()
|
|
||||||
: video_(NULL),
|
|
||||||
decoder_(NULL),
|
|
||||||
md5_file_(NULL) {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
|
||||||
ASSERT_TRUE(video_ != NULL);
|
|
||||||
video_->Init();
|
|
||||||
video_->Begin();
|
|
||||||
|
|
||||||
const vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
|
||||||
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
|
|
||||||
ASSERT_TRUE(decoder_ != NULL);
|
|
||||||
|
|
||||||
OpenMd5File(kVP9Md5File);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void TearDown() {
|
|
||||||
if (md5_file_ != NULL)
|
|
||||||
fclose(md5_file_);
|
|
||||||
|
|
||||||
delete decoder_;
|
|
||||||
delete video_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetByteAlignment(int byte_alignment, vpx_codec_err_t expected_value) {
|
|
||||||
decoder_->Control(VP9_SET_BYTE_ALIGNMENT, byte_alignment, expected_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
vpx_codec_err_t DecodeOneFrame(int byte_alignment_to_check) {
|
|
||||||
const vpx_codec_err_t res =
|
|
||||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
|
||||||
CheckDecodedFrames(byte_alignment_to_check);
|
|
||||||
if (res == VPX_CODEC_OK)
|
|
||||||
video_->Next();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
vpx_codec_err_t DecodeRemainingFrames(int byte_alignment_to_check) {
|
|
||||||
for (; video_->cxdata() != NULL; video_->Next()) {
|
|
||||||
const vpx_codec_err_t res =
|
|
||||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
|
||||||
if (res != VPX_CODEC_OK)
|
|
||||||
return res;
|
|
||||||
CheckDecodedFrames(byte_alignment_to_check);
|
|
||||||
}
|
|
||||||
return VPX_CODEC_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Check if |data| is aligned to |byte_alignment_to_check|.
|
|
||||||
// |byte_alignment_to_check| must be a power of 2.
|
|
||||||
void CheckByteAlignment(const uint8_t *data, int byte_alignment_to_check) {
|
|
||||||
ASSERT_EQ(0u, reinterpret_cast<size_t>(data) % byte_alignment_to_check);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Iterate through the planes of the decoded frames and check for
|
|
||||||
// alignment based off |byte_alignment_to_check|.
|
|
||||||
void CheckDecodedFrames(int byte_alignment_to_check) {
|
|
||||||
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
|
|
||||||
const vpx_image_t *img;
|
|
||||||
|
|
||||||
// Get decompressed data
|
|
||||||
while ((img = dec_iter.Next()) != NULL) {
|
|
||||||
if (byte_alignment_to_check == kLegacyByteAlignment) {
|
|
||||||
CheckByteAlignment(img->planes[0], kLegacyYPlaneByteAlignment);
|
|
||||||
} else {
|
|
||||||
for (int i = 0; i < kNumPlanesToCheck; ++i) {
|
|
||||||
CheckByteAlignment(img->planes[i], byte_alignment_to_check);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CheckMd5(*img);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(fgalligan): Move the MD5 testing code into another class.
|
|
||||||
void OpenMd5File(const std::string &md5_file_name_) {
|
|
||||||
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
|
|
||||||
ASSERT_TRUE(md5_file_ != NULL) << "MD5 file open failed. Filename: "
|
|
||||||
<< md5_file_name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CheckMd5(const vpx_image_t &img) {
|
|
||||||
ASSERT_TRUE(md5_file_ != NULL);
|
|
||||||
char expected_md5[33];
|
|
||||||
char junk[128];
|
|
||||||
|
|
||||||
// Read correct md5 checksums.
|
|
||||||
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
|
|
||||||
ASSERT_NE(EOF, res) << "Read md5 data failed";
|
|
||||||
expected_md5[32] = '\0';
|
|
||||||
|
|
||||||
::libvpx_test::MD5 md5_res;
|
|
||||||
md5_res.Add(&img);
|
|
||||||
const char *const actual_md5 = md5_res.Get();
|
|
||||||
|
|
||||||
// Check md5 match.
|
|
||||||
ASSERT_STREQ(expected_md5, actual_md5) << "MD5 checksums don't match";
|
|
||||||
}
|
|
||||||
|
|
||||||
libvpx_test::WebMVideoSource *video_;
|
|
||||||
libvpx_test::VP9Decoder *decoder_;
|
|
||||||
FILE *md5_file_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_F(ByteAlignmentTest, SwitchByteAlignment) {
|
|
||||||
const int num_elements = 14;
|
|
||||||
const int byte_alignments[] = { 0, 32, 64, 128, 256, 512, 1024,
|
|
||||||
0, 1024, 32, 512, 64, 256, 128 };
|
|
||||||
|
|
||||||
for (int i = 0; i < num_elements; ++i) {
|
|
||||||
SetByteAlignment(byte_alignments[i], VPX_CODEC_OK);
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame(byte_alignments[i]));
|
|
||||||
}
|
|
||||||
SetByteAlignment(byte_alignments[0], VPX_CODEC_OK);
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames(byte_alignments[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(ByteAlignmentTest, TestAlignment) {
|
|
||||||
const ByteAlignmentTestParam t = GetParam();
|
|
||||||
SetByteAlignment(t.byte_alignment, t.expected_value);
|
|
||||||
if (t.decode_remaining)
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames(t.byte_alignment));
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(Alignments, ByteAlignmentTest,
|
|
||||||
::testing::ValuesIn(kBaTestParams));
|
|
||||||
|
|
||||||
#endif // CONFIG_WEBM_IO
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@@ -13,10 +13,10 @@
|
|||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
#if CONFIG_VP10_ENCODER
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP10_DECODER
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -69,47 +69,47 @@ class CodecTestWith3Params : public ::testing::TestWithParam<
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VP8 Codec Definitions
|
* VP10 Codec Definitions
|
||||||
*/
|
*/
|
||||||
#if CONFIG_VP8
|
#if CONFIG_VP10
|
||||||
class VP8Decoder : public Decoder {
|
class VP10Decoder : public Decoder {
|
||||||
public:
|
public:
|
||||||
VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
|
VP10Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
|
||||||
: Decoder(cfg, deadline) {}
|
: Decoder(cfg, deadline) {}
|
||||||
|
|
||||||
VP8Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
|
VP10Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
|
||||||
unsigned long deadline) // NOLINT
|
unsigned long deadline) // NOLINT
|
||||||
: Decoder(cfg, flag, deadline) {}
|
: Decoder(cfg, flag, deadline) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
virtual vpx_codec_iface_t* CodecInterface() const {
|
||||||
#if CONFIG_VP8_DECODER
|
#if CONFIG_VP10_DECODER
|
||||||
return &vpx_codec_vp8_dx_algo;
|
return &vpx_codec_vp10_dx_algo;
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class VP8Encoder : public Encoder {
|
class VP10Encoder : public Encoder {
|
||||||
public:
|
public:
|
||||||
VP8Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
|
VP10Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
|
||||||
const unsigned long init_flags, TwopassStatsStore *stats)
|
const unsigned long init_flags, TwopassStatsStore *stats)
|
||||||
: Encoder(cfg, deadline, init_flags, stats) {}
|
: Encoder(cfg, deadline, init_flags, stats) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
virtual vpx_codec_iface_t* CodecInterface() const {
|
||||||
#if CONFIG_VP8_ENCODER
|
#if CONFIG_VP10_ENCODER
|
||||||
return &vpx_codec_vp8_cx_algo;
|
return &vpx_codec_vp10_cx_algo;
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class VP8CodecFactory : public CodecFactory {
|
class VP10CodecFactory : public CodecFactory {
|
||||||
public:
|
public:
|
||||||
VP8CodecFactory() : CodecFactory() {}
|
VP10CodecFactory() : CodecFactory() {}
|
||||||
|
|
||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
||||||
unsigned long deadline) const {
|
unsigned long deadline) const {
|
||||||
@@ -119,8 +119,8 @@ class VP8CodecFactory : public CodecFactory {
|
|||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
||||||
const vpx_codec_flags_t flags,
|
const vpx_codec_flags_t flags,
|
||||||
unsigned long deadline) const { // NOLINT
|
unsigned long deadline) const { // NOLINT
|
||||||
#if CONFIG_VP8_DECODER
|
#if CONFIG_VP10_DECODER
|
||||||
return new VP8Decoder(cfg, flags, deadline);
|
return new VP10Decoder(cfg, flags, deadline);
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -130,8 +130,8 @@ class VP8CodecFactory : public CodecFactory {
|
|||||||
unsigned long deadline,
|
unsigned long deadline,
|
||||||
const unsigned long init_flags,
|
const unsigned long init_flags,
|
||||||
TwopassStatsStore *stats) const {
|
TwopassStatsStore *stats) const {
|
||||||
#if CONFIG_VP8_ENCODER
|
#if CONFIG_VP10_ENCODER
|
||||||
return new VP8Encoder(cfg, deadline, init_flags, stats);
|
return new VP10Encoder(cfg, deadline, init_flags, stats);
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -139,119 +139,25 @@ class VP8CodecFactory : public CodecFactory {
|
|||||||
|
|
||||||
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
|
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
|
||||||
int usage) const {
|
int usage) const {
|
||||||
#if CONFIG_VP8_ENCODER
|
#if CONFIG_VP10_ENCODER
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp8_cx_algo, cfg, usage);
|
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
|
||||||
#else
|
#else
|
||||||
return VPX_CODEC_INCAPABLE;
|
return VPX_CODEC_INCAPABLE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const libvpx_test::VP8CodecFactory kVP8;
|
const libvpx_test::VP10CodecFactory kVP10;
|
||||||
|
|
||||||
#define VP8_INSTANTIATE_TEST_CASE(test, ...)\
|
#define VP10_INSTANTIATE_TEST_CASE(test, ...)\
|
||||||
INSTANTIATE_TEST_CASE_P(VP8, test, \
|
INSTANTIATE_TEST_CASE_P(VP10, test, \
|
||||||
::testing::Combine( \
|
::testing::Combine( \
|
||||||
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
|
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
|
||||||
&libvpx_test::kVP8)), \
|
&libvpx_test::kVP10)), \
|
||||||
__VA_ARGS__))
|
__VA_ARGS__))
|
||||||
#else
|
#else
|
||||||
#define VP8_INSTANTIATE_TEST_CASE(test, ...)
|
#define VP10_INSTANTIATE_TEST_CASE(test, ...)
|
||||||
#endif // CONFIG_VP8
|
#endif // CONFIG_VP10
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* VP9 Codec Definitions
|
|
||||||
*/
|
|
||||||
#if CONFIG_VP9
|
|
||||||
class VP9Decoder : public Decoder {
|
|
||||||
public:
|
|
||||||
VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
|
|
||||||
: Decoder(cfg, deadline) {}
|
|
||||||
|
|
||||||
VP9Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
|
|
||||||
unsigned long deadline) // NOLINT
|
|
||||||
: Decoder(cfg, flag, deadline) {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
|
||||||
#if CONFIG_VP9_DECODER
|
|
||||||
return &vpx_codec_vp9_dx_algo;
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class VP9Encoder : public Encoder {
|
|
||||||
public:
|
|
||||||
VP9Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
|
|
||||||
const unsigned long init_flags, TwopassStatsStore *stats)
|
|
||||||
: Encoder(cfg, deadline, init_flags, stats) {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
return &vpx_codec_vp9_cx_algo;
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class VP9CodecFactory : public CodecFactory {
|
|
||||||
public:
|
|
||||||
VP9CodecFactory() : CodecFactory() {}
|
|
||||||
|
|
||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
|
||||||
unsigned long deadline) const {
|
|
||||||
return CreateDecoder(cfg, 0, deadline);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
|
||||||
const vpx_codec_flags_t flags,
|
|
||||||
unsigned long deadline) const { // NOLINT
|
|
||||||
#if CONFIG_VP9_DECODER
|
|
||||||
return new VP9Decoder(cfg, flags, deadline);
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
|
|
||||||
unsigned long deadline,
|
|
||||||
const unsigned long init_flags,
|
|
||||||
TwopassStatsStore *stats) const {
|
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
return new VP9Encoder(cfg, deadline, init_flags, stats);
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
|
|
||||||
int usage) const {
|
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
|
|
||||||
#else
|
|
||||||
return VPX_CODEC_INCAPABLE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const libvpx_test::VP9CodecFactory kVP9;
|
|
||||||
|
|
||||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)\
|
|
||||||
INSTANTIATE_TEST_CASE_P(VP9, test, \
|
|
||||||
::testing::Combine( \
|
|
||||||
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
|
|
||||||
&libvpx_test::kVP9)), \
|
|
||||||
__VA_ARGS__))
|
|
||||||
#else
|
|
||||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
|
||||||
#endif // CONFIG_VP9
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|
||||||
#endif // TEST_CODEC_FACTORY_H_
|
#endif // TEST_CODEC_FACTORY_H_
|
||||||
|
|||||||
@@ -1,60 +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 "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/video_source.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
class ConfigTest : public ::libvpx_test::EncoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
|
||||||
protected:
|
|
||||||
ConfigTest() : EncoderTest(GET_PARAM(0)),
|
|
||||||
frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {}
|
|
||||||
virtual ~ConfigTest() {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
InitializeConfig();
|
|
||||||
SetMode(GET_PARAM(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
|
||||||
frame_count_in_ = 0;
|
|
||||||
frame_count_out_ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource* /*video*/) {
|
|
||||||
++frame_count_in_;
|
|
||||||
abort_ |= (frame_count_in_ >= frame_count_max_);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t* /*pkt*/) {
|
|
||||||
++frame_count_out_;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int frame_count_in_;
|
|
||||||
unsigned int frame_count_out_;
|
|
||||||
unsigned int frame_count_max_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_P(ConfigTest, LagIsDisabled) {
|
|
||||||
frame_count_max_ = 2;
|
|
||||||
cfg_.g_lag_in_frames = 15;
|
|
||||||
|
|
||||||
libvpx_test::DummyVideoSource video;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
EXPECT_EQ(frame_count_in_, frame_count_out_);
|
|
||||||
}
|
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES);
|
|
||||||
} // namespace
|
|
||||||
224
test/consistency_test.cc
Normal file
224
test/consistency_test.cc
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
/*
|
||||||
|
* 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 <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "vpx_dsp/ssim.h"
|
||||||
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch,
|
||||||
|
uint8_t *img2, int img2_pitch,
|
||||||
|
int width, int height,
|
||||||
|
Ssimv *sv2, Metrics *m,
|
||||||
|
int do_inconsistency);
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
class ConsistencyTestBase : public ::testing::Test {
|
||||||
|
public:
|
||||||
|
ConsistencyTestBase(int width, int height) : width_(width), height_(height) {}
|
||||||
|
|
||||||
|
static void SetUpTestCase() {
|
||||||
|
source_data_[0] = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
reference_data_[0] = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
source_data_[1] = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
reference_data_[1] = reinterpret_cast<uint8_t*>(
|
||||||
|
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||||
|
ssim_array_ = new Ssimv[kDataBufferSize / 16];
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ClearSsim() {
|
||||||
|
memset(ssim_array_, 0, kDataBufferSize / 16);
|
||||||
|
}
|
||||||
|
static void TearDownTestCase() {
|
||||||
|
vpx_free(source_data_[0]);
|
||||||
|
source_data_[0] = NULL;
|
||||||
|
vpx_free(reference_data_[0]);
|
||||||
|
reference_data_[0] = NULL;
|
||||||
|
vpx_free(source_data_[1]);
|
||||||
|
source_data_[1] = NULL;
|
||||||
|
vpx_free(reference_data_[1]);
|
||||||
|
reference_data_[1] = NULL;
|
||||||
|
|
||||||
|
delete[] ssim_array_;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Handle frames up to 640x480
|
||||||
|
static const int kDataAlignment = 16;
|
||||||
|
static const int kDataBufferSize = 640*480;
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
source_stride_ = (width_ + 31) & ~31;
|
||||||
|
reference_stride_ = width_ * 2;
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom(uint8_t *data, int stride, int width, int height) {
|
||||||
|
for (int h = 0; h < height; ++h) {
|
||||||
|
for (int w = 0; w < width; ++w) {
|
||||||
|
data[h * stride + w] = rnd_.Rand8();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom(uint8_t *data, int stride) {
|
||||||
|
FillRandom(data, stride, width_, height_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Copy(uint8_t *reference, uint8_t *source) {
|
||||||
|
memcpy(reference, source, kDataBufferSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Blur(uint8_t *data, int stride, int taps) {
|
||||||
|
int sum = 0;
|
||||||
|
int half_taps = taps / 2;
|
||||||
|
for (int h = 0; h < height_; ++h) {
|
||||||
|
for (int w = 0; w < taps; ++w) {
|
||||||
|
sum += data[w + h * stride];
|
||||||
|
}
|
||||||
|
for (int w = taps; w < width_; ++w) {
|
||||||
|
sum += data[w + h * stride] - data[w - taps + h * stride];
|
||||||
|
data[w - half_taps + h * stride] = (sum + half_taps) / taps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int w = 0; w < width_; ++w) {
|
||||||
|
for (int h = 0; h < taps; ++h) {
|
||||||
|
sum += data[h + w * stride];
|
||||||
|
}
|
||||||
|
for (int h = taps; h < height_; ++h) {
|
||||||
|
sum += data[w + h * stride] - data[(h - taps) * stride + w];
|
||||||
|
data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int width_, height_;
|
||||||
|
static uint8_t* source_data_[2];
|
||||||
|
int source_stride_;
|
||||||
|
static uint8_t* reference_data_[2];
|
||||||
|
int reference_stride_;
|
||||||
|
static Ssimv *ssim_array_;
|
||||||
|
Metrics metrics_;
|
||||||
|
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
typedef std::tr1::tuple<int, int> ConsistencyParam;
|
||||||
|
class ConsistencyVP9Test
|
||||||
|
: public ConsistencyTestBase,
|
||||||
|
public ::testing::WithParamInterface<ConsistencyParam> {
|
||||||
|
public:
|
||||||
|
ConsistencyVP9Test() : ConsistencyTestBase(GET_PARAM(0), GET_PARAM(1)) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
double CheckConsistency(int frame) {
|
||||||
|
EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
|
||||||
|
return
|
||||||
|
vpx_get_ssim_metrics(source_data_[frame], source_stride_,
|
||||||
|
reference_data_[frame], reference_stride_,
|
||||||
|
width_, height_, ssim_array_, &metrics_, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif // CONFIG_VP9_ENCODER
|
||||||
|
|
||||||
|
uint8_t* ConsistencyTestBase::source_data_[2] = {NULL, NULL};
|
||||||
|
uint8_t* ConsistencyTestBase::reference_data_[2] = {NULL, NULL};
|
||||||
|
Ssimv* ConsistencyTestBase::ssim_array_ = NULL;
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
TEST_P(ConsistencyVP9Test, ConsistencyIsZero) {
|
||||||
|
FillRandom(source_data_[0], source_stride_);
|
||||||
|
Copy(source_data_[1], source_data_[0]);
|
||||||
|
Copy(reference_data_[0], source_data_[0]);
|
||||||
|
Blur(reference_data_[0], reference_stride_, 3);
|
||||||
|
Copy(reference_data_[1], source_data_[0]);
|
||||||
|
Blur(reference_data_[1], reference_stride_, 3);
|
||||||
|
|
||||||
|
double inconsistency = CheckConsistency(1);
|
||||||
|
inconsistency = CheckConsistency(0);
|
||||||
|
EXPECT_EQ(inconsistency, 0.0)
|
||||||
|
<< "Should have 0 inconsistency if they are exactly the same.";
|
||||||
|
|
||||||
|
// If sources are not consistent reference frames inconsistency should
|
||||||
|
// be less than if the source is consistent.
|
||||||
|
FillRandom(source_data_[0], source_stride_);
|
||||||
|
FillRandom(source_data_[1], source_stride_);
|
||||||
|
FillRandom(reference_data_[0], reference_stride_);
|
||||||
|
FillRandom(reference_data_[1], reference_stride_);
|
||||||
|
CheckConsistency(0);
|
||||||
|
inconsistency = CheckConsistency(1);
|
||||||
|
|
||||||
|
Copy(source_data_[1], source_data_[0]);
|
||||||
|
CheckConsistency(0);
|
||||||
|
double inconsistency2 = CheckConsistency(1);
|
||||||
|
EXPECT_LT(inconsistency, inconsistency2)
|
||||||
|
<< "Should have less inconsistency if source itself is inconsistent.";
|
||||||
|
|
||||||
|
// Less of a blur should be less inconsistent than more blur coming off a
|
||||||
|
// a frame with no blur.
|
||||||
|
ClearSsim();
|
||||||
|
FillRandom(source_data_[0], source_stride_);
|
||||||
|
Copy(source_data_[1], source_data_[0]);
|
||||||
|
Copy(reference_data_[0], source_data_[0]);
|
||||||
|
Copy(reference_data_[1], source_data_[0]);
|
||||||
|
Blur(reference_data_[1], reference_stride_, 4);
|
||||||
|
CheckConsistency(0);
|
||||||
|
inconsistency = CheckConsistency(1);
|
||||||
|
ClearSsim();
|
||||||
|
Copy(reference_data_[1], source_data_[0]);
|
||||||
|
Blur(reference_data_[1], reference_stride_, 8);
|
||||||
|
CheckConsistency(0);
|
||||||
|
inconsistency2 = CheckConsistency(1);
|
||||||
|
|
||||||
|
EXPECT_LT(inconsistency, inconsistency2)
|
||||||
|
<< "Stronger Blur should produce more inconsistency.";
|
||||||
|
}
|
||||||
|
#endif // CONFIG_VP9_ENCODER
|
||||||
|
|
||||||
|
|
||||||
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// C functions
|
||||||
|
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
const ConsistencyParam c_vp9_tests[] = {
|
||||||
|
make_tuple(320, 240),
|
||||||
|
make_tuple(318, 242),
|
||||||
|
make_tuple(318, 238),
|
||||||
|
};
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, ConsistencyVP9Test,
|
||||||
|
::testing::ValuesIn(c_vp9_tests));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -135,9 +135,8 @@ TEST_P(CpuSpeedTest, TestLowBitrate) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
CpuSpeedTest,
|
CpuSpeedTest,
|
||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||||
::libvpx_test::kRealTime),
|
::testing::Range(0, 3));
|
||||||
::testing::Range(0, 9));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
134
test/cq_test.cc
134
test/cq_test.cc
@@ -1,134 +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 <cmath>
|
|
||||||
#include <map>
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/encode_test_driver.h"
|
|
||||||
#include "test/i420_video_source.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
// CQ level range: [kCQLevelMin, kCQLevelMax).
|
|
||||||
const int kCQLevelMin = 4;
|
|
||||||
const int kCQLevelMax = 63;
|
|
||||||
const int kCQLevelStep = 8;
|
|
||||||
const unsigned int kCQTargetBitrate = 2000;
|
|
||||||
|
|
||||||
class CQTest : public ::libvpx_test::EncoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<int> {
|
|
||||||
public:
|
|
||||||
// maps the cqlevel to the bitrate produced.
|
|
||||||
typedef std::map<int, uint32_t> BitrateMap;
|
|
||||||
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
bitrates_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
ASSERT_TRUE(!HasFailure())
|
|
||||||
<< "skipping bitrate validation due to earlier failure.";
|
|
||||||
uint32_t prev_actual_bitrate = kCQTargetBitrate;
|
|
||||||
for (BitrateMap::const_iterator iter = bitrates_.begin();
|
|
||||||
iter != bitrates_.end(); ++iter) {
|
|
||||||
const uint32_t cq_actual_bitrate = iter->second;
|
|
||||||
EXPECT_LE(cq_actual_bitrate, prev_actual_bitrate)
|
|
||||||
<< "cq_level: " << iter->first
|
|
||||||
<< ", bitrate should decrease with increase in CQ level.";
|
|
||||||
prev_actual_bitrate = cq_actual_bitrate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
CQTest() : EncoderTest(GET_PARAM(0)), cq_level_(GET_PARAM(1)) {
|
|
||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~CQTest() {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
InitializeConfig();
|
|
||||||
SetMode(libvpx_test::kTwoPassGood);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
|
||||||
file_size_ = 0;
|
|
||||||
psnr_ = 0.0;
|
|
||||||
n_frames_ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
|
||||||
libvpx_test::Encoder *encoder) {
|
|
||||||
if (video->frame() == 1) {
|
|
||||||
if (cfg_.rc_end_usage == VPX_CQ) {
|
|
||||||
encoder->Control(VP8E_SET_CQ_LEVEL, cq_level_);
|
|
||||||
}
|
|
||||||
encoder->Control(VP8E_SET_CPUUSED, 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
|
||||||
psnr_ += pow(10.0, pkt->data.psnr.psnr[0] / 10.0);
|
|
||||||
n_frames_++;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
|
||||||
file_size_ += pkt->data.frame.sz;
|
|
||||||
}
|
|
||||||
|
|
||||||
double GetLinearPSNROverBitrate() const {
|
|
||||||
double avg_psnr = log10(psnr_ / n_frames_) * 10.0;
|
|
||||||
return pow(10.0, avg_psnr / 10.0) / file_size_;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cq_level() const { return cq_level_; }
|
|
||||||
size_t file_size() const { return file_size_; }
|
|
||||||
int n_frames() const { return n_frames_; }
|
|
||||||
|
|
||||||
static BitrateMap bitrates_;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int cq_level_;
|
|
||||||
size_t file_size_;
|
|
||||||
double psnr_;
|
|
||||||
int n_frames_;
|
|
||||||
};
|
|
||||||
|
|
||||||
CQTest::BitrateMap CQTest::bitrates_;
|
|
||||||
|
|
||||||
TEST_P(CQTest, LinearPSNRIsHigherForCQLevel) {
|
|
||||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
|
||||||
cfg_.g_timebase = timebase;
|
|
||||||
cfg_.rc_target_bitrate = kCQTargetBitrate;
|
|
||||||
cfg_.g_lag_in_frames = 25;
|
|
||||||
|
|
||||||
cfg_.rc_end_usage = VPX_CQ;
|
|
||||||
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
|
||||||
timebase.den, timebase.num, 0, 30);
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
const double cq_psnr_lin = GetLinearPSNROverBitrate();
|
|
||||||
const unsigned int cq_actual_bitrate =
|
|
||||||
static_cast<unsigned int>(file_size()) * 8 * 30 / (n_frames() * 1000);
|
|
||||||
EXPECT_LE(cq_actual_bitrate, kCQTargetBitrate);
|
|
||||||
bitrates_[cq_level()] = cq_actual_bitrate;
|
|
||||||
|
|
||||||
// try targeting the approximate same bitrate with VBR mode
|
|
||||||
cfg_.rc_end_usage = VPX_VBR;
|
|
||||||
cfg_.rc_target_bitrate = cq_actual_bitrate;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
const double vbr_psnr_lin = GetLinearPSNROverBitrate();
|
|
||||||
EXPECT_GE(cq_psnr_lin, vbr_psnr_lin);
|
|
||||||
}
|
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(CQTest,
|
|
||||||
::testing::Range(kCQLevelMin, kCQLevelMax,
|
|
||||||
kCQLevelStep));
|
|
||||||
} // namespace
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "test/i420_video_source.h"
|
#include "test/i420_video_source.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
#include "test/y4m_video_source.h"
|
#include "test/y4m_video_source.h"
|
||||||
|
#include "vpx/vpx_codec.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -371,9 +372,7 @@ class DatarateTestVP9Large : public ::libvpx_test::EncoderTest,
|
|||||||
encoder->Control(VP9E_SET_SVC, 1);
|
encoder->Control(VP9E_SET_SVC, 1);
|
||||||
}
|
}
|
||||||
vpx_svc_layer_id_t layer_id;
|
vpx_svc_layer_id_t layer_id;
|
||||||
#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
|
|
||||||
layer_id.spatial_layer_id = 0;
|
layer_id.spatial_layer_id = 0;
|
||||||
#endif
|
|
||||||
frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers);
|
frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers);
|
||||||
layer_id.temporal_layer_id = SetLayerId(video->frame(),
|
layer_id.temporal_layer_id = SetLayerId(video->frame(),
|
||||||
cfg_.ts_number_layers);
|
cfg_.ts_number_layers);
|
||||||
@@ -539,7 +538,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;
|
||||||
@@ -549,6 +548,7 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check basic rate targeting for 2 temporal layers.
|
// Check basic rate targeting for 2 temporal layers.
|
||||||
|
#if 0 // VP10 does not support multiple layers yet
|
||||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
cfg_.rc_buf_optimal_sz = 500;
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
@@ -565,6 +565,8 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
|||||||
cfg_.ts_rate_decimator[0] = 2;
|
cfg_.ts_rate_decimator[0] = 2;
|
||||||
cfg_.ts_rate_decimator[1] = 1;
|
cfg_.ts_rate_decimator[1] = 1;
|
||||||
|
|
||||||
|
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||||
|
|
||||||
if (deadline_ == VPX_DL_REALTIME)
|
if (deadline_ == VPX_DL_REALTIME)
|
||||||
cfg_.g_error_resilient = 1;
|
cfg_.g_error_resilient = 1;
|
||||||
|
|
||||||
@@ -574,14 +576,14 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
|||||||
cfg_.rc_target_bitrate = i;
|
cfg_.rc_target_bitrate = i;
|
||||||
ResetModel();
|
ResetModel();
|
||||||
// 60-40 bitrate allocation for 2 temporal layers.
|
// 60-40 bitrate allocation for 2 temporal layers.
|
||||||
cfg_.ts_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
|
cfg_.layer_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
|
||||||
cfg_.ts_target_bitrate[1] = cfg_.rc_target_bitrate;
|
cfg_.layer_target_bitrate[1] = cfg_.rc_target_bitrate;
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
||||||
ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.85)
|
ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.85)
|
||||||
<< " The datarate for the file is lower than target by too much, "
|
<< " The datarate for the file is lower than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.15)
|
ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.15)
|
||||||
<< " The datarate for the file is greater than target by too much, "
|
<< " The datarate for the file is greater than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
}
|
}
|
||||||
@@ -606,25 +608,27 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayers) {
|
|||||||
cfg_.ts_rate_decimator[1] = 2;
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
cfg_.ts_rate_decimator[2] = 1;
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
|
||||||
|
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||||
|
|
||||||
::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);
|
||||||
for (int i = 200; i <= 800; i += 200) {
|
for (int i = 200; i <= 800; i += 200) {
|
||||||
cfg_.rc_target_bitrate = i;
|
cfg_.rc_target_bitrate = i;
|
||||||
ResetModel();
|
ResetModel();
|
||||||
// 40-20-40 bitrate allocation for 3 temporal layers.
|
// 40-20-40 bitrate allocation for 3 temporal layers.
|
||||||
cfg_.ts_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
|
cfg_.layer_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
|
||||||
cfg_.ts_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
|
cfg_.layer_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
|
||||||
cfg_.ts_target_bitrate[2] = cfg_.rc_target_bitrate;
|
cfg_.layer_target_bitrate[2] = cfg_.rc_target_bitrate;
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
||||||
// TODO(yaowu): Work out more stable rc control strategy and
|
// TODO(yaowu): Work out more stable rc control strategy and
|
||||||
// Adjust the thresholds to be tighter than .75.
|
// Adjust the thresholds to be tighter than .75.
|
||||||
ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.75)
|
ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.75)
|
||||||
<< " The datarate for the file is lower than target by too much, "
|
<< " The datarate for the file is lower than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
// TODO(yaowu): Work out more stable rc control strategy and
|
// TODO(yaowu): Work out more stable rc control strategy and
|
||||||
// Adjust the thresholds to be tighter than 1.25.
|
// Adjust the thresholds to be tighter than 1.25.
|
||||||
ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.25)
|
ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.25)
|
||||||
<< " The datarate for the file is greater than target by too much, "
|
<< " The datarate for the file is greater than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
}
|
}
|
||||||
@@ -652,20 +656,22 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
|
|||||||
cfg_.ts_rate_decimator[1] = 2;
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
cfg_.ts_rate_decimator[2] = 1;
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
|
||||||
|
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||||
|
|
||||||
::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);
|
||||||
cfg_.rc_target_bitrate = 200;
|
cfg_.rc_target_bitrate = 200;
|
||||||
ResetModel();
|
ResetModel();
|
||||||
// 40-20-40 bitrate allocation for 3 temporal layers.
|
// 40-20-40 bitrate allocation for 3 temporal layers.
|
||||||
cfg_.ts_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
|
cfg_.layer_target_bitrate[0] = 40 * cfg_.rc_target_bitrate / 100;
|
||||||
cfg_.ts_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
|
cfg_.layer_target_bitrate[1] = 60 * cfg_.rc_target_bitrate / 100;
|
||||||
cfg_.ts_target_bitrate[2] = cfg_.rc_target_bitrate;
|
cfg_.layer_target_bitrate[2] = cfg_.rc_target_bitrate;
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
for (int j = 0; j < static_cast<int>(cfg_.ts_number_layers); ++j) {
|
||||||
ASSERT_GE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 0.85)
|
ASSERT_GE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 0.85)
|
||||||
<< " The datarate for the file is lower than target by too much, "
|
<< " The datarate for the file is lower than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
ASSERT_LE(effective_datarate_[j], cfg_.ts_target_bitrate[j] * 1.15)
|
ASSERT_LE(effective_datarate_[j], cfg_.layer_target_bitrate[j] * 1.15)
|
||||||
<< " The datarate for the file is greater than target by too much, "
|
<< " The datarate for the file is greater than target by too much, "
|
||||||
"for layer: " << j;
|
"for layer: " << j;
|
||||||
// Expect some frame drops in this test: for this 200 frames test,
|
// Expect some frame drops in this test: for this 200 frames test,
|
||||||
@@ -674,6 +680,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
|
|||||||
ASSERT_LE(num_drops_, 130);
|
ASSERT_LE(num_drops_, 130);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_VP9_TEMPORAL_DENOISING
|
#if CONFIG_VP9_TEMPORAL_DENOISING
|
||||||
// Check basic datarate targeting, for a single bitrate, when denoiser is on.
|
// Check basic datarate targeting, for a single bitrate, when denoiser is on.
|
||||||
@@ -737,9 +744,239 @@ TEST_P(DatarateTestVP9Large, DenoiserOffOn) {
|
|||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_TEMPORAL_DENOISING
|
#endif // CONFIG_VP9_TEMPORAL_DENOISING
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
||||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
public:
|
||||||
|
DatarateOnePassCbrSvc() : EncoderTest(GET_PARAM(0)) {}
|
||||||
|
virtual ~DatarateOnePassCbrSvc() {}
|
||||||
|
protected:
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(GET_PARAM(1));
|
||||||
|
speed_setting_ = GET_PARAM(2);
|
||||||
|
ResetModel();
|
||||||
|
}
|
||||||
|
virtual void ResetModel() {
|
||||||
|
last_pts_ = 0;
|
||||||
|
bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz;
|
||||||
|
frame_number_ = 0;
|
||||||
|
first_drop_ = 0;
|
||||||
|
bits_total_ = 0;
|
||||||
|
duration_ = 0.0;
|
||||||
|
mismatch_psnr_ = 0.0;
|
||||||
|
mismatch_nframes_ = 0;
|
||||||
|
}
|
||||||
|
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||||
|
}
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < VPX_MAX_LAYERS; ++i) {
|
||||||
|
svc_params_.max_quantizers[i] = 63;
|
||||||
|
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_PARAMETERS, &svc_params_);
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
||||||
|
encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
|
||||||
|
encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 300);
|
||||||
|
encoder->Control(VP9E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1));
|
||||||
|
}
|
||||||
|
const vpx_rational_t tb = video->timebase();
|
||||||
|
timebase_ = static_cast<double>(tb.num) / tb.den;
|
||||||
|
duration_ = 0;
|
||||||
|
}
|
||||||
|
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
|
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
|
||||||
|
if (last_pts_ == 0)
|
||||||
|
duration = 1;
|
||||||
|
bits_in_buffer_model_ += static_cast<int64_t>(
|
||||||
|
duration * timebase_ * cfg_.rc_target_bitrate * 1000);
|
||||||
|
const bool key_frame = (pkt->data.frame.flags & VPX_FRAME_IS_KEY)
|
||||||
|
? true: false;
|
||||||
|
if (!key_frame) {
|
||||||
|
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
|
||||||
|
<< pkt->data.frame.pts;
|
||||||
|
}
|
||||||
|
const size_t frame_size_in_bits = pkt->data.frame.sz * 8;
|
||||||
|
bits_in_buffer_model_ -= frame_size_in_bits;
|
||||||
|
bits_total_ += frame_size_in_bits;
|
||||||
|
if (!first_drop_ && duration > 1)
|
||||||
|
first_drop_ = last_pts_ + 1;
|
||||||
|
last_pts_ = pkt->data.frame.pts;
|
||||||
|
bits_in_last_frame_ = frame_size_in_bits;
|
||||||
|
++frame_number_;
|
||||||
|
}
|
||||||
|
virtual void EndPassHook(void) {
|
||||||
|
if (bits_total_) {
|
||||||
|
const double file_size_in_kb = bits_total_ / 1000.; // bits per kilobit
|
||||||
|
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_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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_;
|
||||||
|
}
|
||||||
|
|
||||||
|
vpx_codec_pts_t last_pts_;
|
||||||
|
int64_t bits_in_buffer_model_;
|
||||||
|
double timebase_;
|
||||||
|
int frame_number_;
|
||||||
|
vpx_codec_pts_t first_drop_;
|
||||||
|
int64_t bits_total_;
|
||||||
|
double duration_;
|
||||||
|
double file_datarate_;
|
||||||
|
double effective_datarate_;
|
||||||
|
size_t bits_in_last_frame_;
|
||||||
|
vpx_svc_extra_cfg_t svc_params_;
|
||||||
|
int speed_setting_;
|
||||||
|
double mismatch_psnr_;
|
||||||
|
int mismatch_nframes_;
|
||||||
|
};
|
||||||
|
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
||||||
|
const vpx_svc_extra_cfg_t *svc_params,
|
||||||
|
int spatial_layers,
|
||||||
|
int temporal_layers,
|
||||||
|
int temporal_layering_mode,
|
||||||
|
unsigned int total_rate) {
|
||||||
|
int sl, spatial_layer_target;
|
||||||
|
float total = 0;
|
||||||
|
float alloc_ratio[VPX_MAX_LAYERS] = {0};
|
||||||
|
for (sl = 0; sl < spatial_layers; ++sl) {
|
||||||
|
if (svc_params->scaling_factor_den[sl] > 0) {
|
||||||
|
alloc_ratio[sl] = (float)(svc_params->scaling_factor_num[sl] *
|
||||||
|
1.0 / svc_params->scaling_factor_den[sl]);
|
||||||
|
total += alloc_ratio[sl];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (sl = 0; sl < spatial_layers; ++sl) {
|
||||||
|
enc_cfg->ss_target_bitrate[sl] = spatial_layer_target =
|
||||||
|
(unsigned int)(enc_cfg->rc_target_bitrate *
|
||||||
|
alloc_ratio[sl] / total);
|
||||||
|
const int index = sl * temporal_layers;
|
||||||
|
if (temporal_layering_mode == 3) {
|
||||||
|
enc_cfg->layer_target_bitrate[index] =
|
||||||
|
spatial_layer_target >> 1;
|
||||||
|
enc_cfg->layer_target_bitrate[index + 1] =
|
||||||
|
(spatial_layer_target >> 1) + (spatial_layer_target >> 2);
|
||||||
|
enc_cfg->layer_target_bitrate[index + 2] =
|
||||||
|
spatial_layer_target;
|
||||||
|
} else if (temporal_layering_mode == 2) {
|
||||||
|
enc_cfg->layer_target_bitrate[index] =
|
||||||
|
spatial_layer_target * 2 / 3;
|
||||||
|
enc_cfg->layer_target_bitrate[index + 1] =
|
||||||
|
spatial_layer_target;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||||
|
// 3 temporal layers. Run CIF clip with 1 thread.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
||||||
|
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;
|
||||||
|
// TODO(wonkap/marpan): No frame drop for now, we need to implement correct
|
||||||
|
// frame dropping for SVC.
|
||||||
|
cfg_.rc_dropframe_thresh = 0;
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 200);
|
||||||
|
// 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).
|
||||||
|
for (int i = 400; i <= 800; i += 200) {
|
||||||
|
cfg_.rc_target_bitrate = i;
|
||||||
|
ResetModel();
|
||||||
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode,
|
||||||
|
cfg_.rc_target_bitrate);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, effective_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(GetMismatchFrames(), (unsigned int) 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||||
|
// 3 temporal layers. Run HD clip with 4 threads.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
|
||||||
|
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 = 4;
|
||||||
|
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;
|
||||||
|
// TODO(wonkap/marpan): No frame drop for now, we need to implement correct
|
||||||
|
// frame dropping for SVC.
|
||||||
|
cfg_.rc_dropframe_thresh = 0;
|
||||||
|
::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,
|
||||||
|
cfg_.rc_target_bitrate);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, effective_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(GetMismatchFrames(), (unsigned int) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
VP10_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, 7));
|
||||||
|
|
||||||
|
/* VP10 does not support multiple layers yet.
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 8));
|
||||||
|
*/
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -13,15 +13,18 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.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/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vp9_rtcd.h"
|
#include "vp10/common/scan.h"
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_ports/mem.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -37,30 +40,6 @@ static int round(double x) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int kNumCoeffs = 256;
|
const int kNumCoeffs = 256;
|
||||||
const double PI = 3.1415926535898;
|
|
||||||
void reference2_16x16_idct_2d(double *input, double *output) {
|
|
||||||
double x;
|
|
||||||
for (int l = 0; l < 16; ++l) {
|
|
||||||
for (int k = 0; k < 16; ++k) {
|
|
||||||
double s = 0;
|
|
||||||
for (int i = 0; i < 16; ++i) {
|
|
||||||
for (int j = 0; j < 16; ++j) {
|
|
||||||
x = cos(PI * j * (l + 0.5) / 16.0) *
|
|
||||||
cos(PI * i * (k + 0.5) / 16.0) *
|
|
||||||
input[i * 16 + j] / 256;
|
|
||||||
if (i != 0)
|
|
||||||
x *= sqrt(2.0);
|
|
||||||
if (j != 0)
|
|
||||||
x *= sqrt(2.0);
|
|
||||||
s += x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
output[k*16+l] = s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const double C1 = 0.995184726672197;
|
const double C1 = 0.995184726672197;
|
||||||
const double C2 = 0.98078528040323;
|
const double C2 = 0.98078528040323;
|
||||||
const double C3 = 0.956940335732209;
|
const double C3 = 0.956940335732209;
|
||||||
@@ -269,31 +248,31 @@ typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t>
|
|||||||
|
|
||||||
void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride,
|
void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||||
int /*tx_type*/) {
|
int /*tx_type*/) {
|
||||||
vp9_fdct16x16_c(in, out, stride);
|
vpx_fdct16x16_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
||||||
int /*tx_type*/) {
|
int /*tx_type*/) {
|
||||||
vp9_idct16x16_256_add_c(in, dest, stride);
|
vpx_idct16x16_256_add_c(in, dest, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride,
|
void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||||
int tx_type) {
|
int tx_type) {
|
||||||
vp9_fht16x16_c(in, out, stride, tx_type);
|
vp10_fht16x16_c(in, out, stride, tx_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
||||||
int tx_type) {
|
int tx_type) {
|
||||||
vp9_iht16x16_256_add_c(in, dest, stride, tx_type);
|
vp10_iht16x16_256_add_c(in, dest, stride, tx_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_256_add_c(in, out, stride, 10);
|
vpx_highbd_idct16x16_256_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_256_add_c(in, out, stride, 12);
|
vpx_highbd_idct16x16_256_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
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,
|
||||||
@@ -307,39 +286,39 @@ void idct16x16_12_ref(const tran_low_t *in, uint8_t *out, int stride,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void iht16x16_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
void iht16x16_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
||||||
vp9_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 10);
|
vp10_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
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);
|
vp10_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
vp9_highbd_idct16x16_10_add_c(in, out, stride, 10);
|
vpx_highbd_idct16x16_10_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
vpx_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#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) {
|
||||||
vp9_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_256_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_256_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_256_add_sse2(in, out, stride, 12);
|
vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_10_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
|
vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
class Trans16x16TestBase {
|
class Trans16x16TestBase {
|
||||||
public:
|
public:
|
||||||
@@ -356,13 +335,13 @@ class Trans16x16TestBase {
|
|||||||
int64_t total_error = 0;
|
int64_t total_error = 0;
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
@@ -371,7 +350,7 @@ class Trans16x16TestBase {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
test_input_block[j] = src[j] - dst[j];
|
test_input_block[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -385,7 +364,7 @@ class Trans16x16TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, dst, pitch_));
|
RunInvTxfm(test_temp_block, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
||||||
@@ -393,7 +372,7 @@ class Trans16x16TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -416,9 +395,9 @@ class Trans16x16TestBase {
|
|||||||
void RunCoeffCheck() {
|
void RunCoeffCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
@@ -437,15 +416,13 @@ class Trans16x16TestBase {
|
|||||||
void RunMemCheck() {
|
void RunMemCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
|
||||||
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
||||||
}
|
}
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@@ -472,24 +449,19 @@ class Trans16x16TestBase {
|
|||||||
void RunQuantCheck(int dc_thred, int ac_thred) {
|
void RunQuantCheck(int dc_thred, int ac_thred) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 100000;
|
const int count_test_block = 100000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
|
||||||
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
if (bit_depth_ == VPX_BITS_8)
|
|
||||||
input_block[j] = rnd.Rand8() - rnd.Rand8();
|
|
||||||
else
|
|
||||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
|
||||||
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
||||||
}
|
}
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
@@ -502,11 +474,11 @@ class Trans16x16TestBase {
|
|||||||
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
|
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
|
||||||
|
|
||||||
// clear reconstructed pixel buffers
|
// clear reconstructed pixel buffers
|
||||||
vpx_memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
|
memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
|
||||||
vpx_memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
|
memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
vpx_memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
|
memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||||
vpx_memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
|
memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// quantization with maximum allowed step sizes
|
// quantization with maximum allowed step sizes
|
||||||
@@ -516,7 +488,7 @@ class Trans16x16TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
inv_txfm_ref(output_ref_block, ref, pitch_, tx_type_);
|
inv_txfm_ref(output_ref_block, ref, pitch_, tx_type_);
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(output_ref_block, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(output_ref_block, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
inv_txfm_ref(output_ref_block, CONVERT_TO_BYTEPTR(ref16), pitch_,
|
inv_txfm_ref(output_ref_block, CONVERT_TO_BYTEPTR(ref16), pitch_,
|
||||||
tx_type_);
|
tx_type_);
|
||||||
@@ -527,7 +499,7 @@ class Trans16x16TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
for (int j = 0; j < kNumCoeffs; ++j)
|
for (int j = 0; j < kNumCoeffs; ++j)
|
||||||
EXPECT_EQ(ref[j], dst[j]);
|
EXPECT_EQ(ref[j], dst[j]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < kNumCoeffs; ++j)
|
for (int j = 0; j < kNumCoeffs; ++j)
|
||||||
EXPECT_EQ(ref16[j], dst16[j]);
|
EXPECT_EQ(ref16[j], dst16[j]);
|
||||||
@@ -539,14 +511,14 @@ class Trans16x16TestBase {
|
|||||||
void RunInvAccuracyCheck() {
|
void RunInvAccuracyCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
double out_r[kNumCoeffs];
|
double out_r[kNumCoeffs];
|
||||||
@@ -557,12 +529,12 @@ class Trans16x16TestBase {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
in[j] = src[j] - dst[j];
|
in[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
in[j] = src16[j] - dst16[j];
|
in[j] = src16[j] - dst16[j];
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,20 +544,20 @@ class Trans16x16TestBase {
|
|||||||
|
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, 16));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, 16));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
||||||
16));
|
16));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const uint32_t diff = dst[j] - src[j];
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_GE(1u, error)
|
EXPECT_GE(1u, error)
|
||||||
<< "Error: 16x16 IDCT has error " << error
|
<< "Error: 16x16 IDCT has error " << error
|
||||||
@@ -598,14 +570,14 @@ class Trans16x16TestBase {
|
|||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
const int eob = 10;
|
const int eob = 10;
|
||||||
const int16_t *scan = vp9_default_scan_orders[TX_16X16].scan;
|
const int16_t *scan = vp10_default_scan_orders[TX_16X16].scan;
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
@@ -618,31 +590,31 @@ class Trans16x16TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
dst[j] = 0;
|
dst[j] = 0;
|
||||||
ref[j] = 0;
|
ref[j] = 0;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
dst16[j] = 0;
|
dst16[j] = 0;
|
||||||
ref16[j] = 0;
|
ref16[j] = 0;
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ref_txfm(coeff, ref, pitch_);
|
ref_txfm(coeff, ref, pitch_);
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
||||||
} else {
|
} else {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
|
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
||||||
pitch_));
|
pitch_));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - ref[j];
|
const uint32_t diff = dst[j] - ref[j];
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_EQ(0u, error)
|
EXPECT_EQ(0u, error)
|
||||||
<< "Error: 16x16 IDCT Comparison has error " << error
|
<< "Error: 16x16 IDCT Comparison has error " << error
|
||||||
@@ -674,7 +646,7 @@ class Trans16x16DCT
|
|||||||
fwd_txfm_ref = fdct16x16_ref;
|
fwd_txfm_ref = fdct16x16_ref;
|
||||||
inv_txfm_ref = idct16x16_ref;
|
inv_txfm_ref = idct16x16_ref;
|
||||||
mask_ = (1 << bit_depth_) - 1;
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
switch (bit_depth_) {
|
switch (bit_depth_) {
|
||||||
case VPX_BITS_10:
|
case VPX_BITS_10:
|
||||||
inv_txfm_ref = idct16x16_10_ref;
|
inv_txfm_ref = idct16x16_10_ref;
|
||||||
@@ -741,7 +713,7 @@ class Trans16x16HT
|
|||||||
fwd_txfm_ref = fht16x16_ref;
|
fwd_txfm_ref = fht16x16_ref;
|
||||||
inv_txfm_ref = iht16x16_ref;
|
inv_txfm_ref = iht16x16_ref;
|
||||||
mask_ = (1 << bit_depth_) - 1;
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
switch (bit_depth_) {
|
switch (bit_depth_) {
|
||||||
case VPX_BITS_10:
|
case VPX_BITS_10:
|
||||||
inv_txfm_ref = iht16x16_10;
|
inv_txfm_ref = iht16x16_10;
|
||||||
@@ -822,102 +794,97 @@ TEST_P(InvTrans16x16DCT, CompareReference) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans16x16DCT,
|
C, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
|
make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans16x16DCT,
|
C, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans16x16HT,
|
C, Trans16x16HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 1, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 1, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 2, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 2, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 3, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 3, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 0, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 1, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 1, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 2, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 2, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 3, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 3, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans16x16HT,
|
C, Trans16x16HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Trans16x16DCT,
|
NEON, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_neon, 0, VPX_BITS_8)));
|
&vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans16x16DCT,
|
SSE2, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_sse2,
|
make_tuple(&vpx_fdct16x16_sse2,
|
||||||
&vp9_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
|
&vpx_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans16x16HT,
|
SSE2, Trans16x16HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 0,
|
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 0,
|
||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 1,
|
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 1,
|
||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 2,
|
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 2,
|
||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 3,
|
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 3,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans16x16DCT,
|
SSE2, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct16x16_sse2,
|
make_tuple(&vpx_highbd_fdct16x16_sse2,
|
||||||
&idct16x16_10, 0, VPX_BITS_10),
|
&idct16x16_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct16x16_c,
|
make_tuple(&vpx_highbd_fdct16x16_c,
|
||||||
&idct16x16_256_add_10_sse2, 0, VPX_BITS_10),
|
&idct16x16_256_add_10_sse2, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct16x16_sse2,
|
make_tuple(&vpx_highbd_fdct16x16_sse2,
|
||||||
&idct16x16_12, 0, VPX_BITS_12),
|
&idct16x16_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fdct16x16_c,
|
make_tuple(&vpx_highbd_fdct16x16_c,
|
||||||
&idct16x16_256_add_12_sse2, 0, VPX_BITS_12),
|
&idct16x16_256_add_12_sse2, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct16x16_sse2,
|
make_tuple(&vpx_fdct16x16_sse2,
|
||||||
&vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
&vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans16x16HT,
|
SSE2, Trans16x16HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_fht16x16_sse2,
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 1, VPX_BITS_10),
|
&vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 2, VPX_BITS_10),
|
make_tuple(&vp10_fht16x16_sse2,
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 3, VPX_BITS_10),
|
&vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 0, VPX_BITS_12),
|
make_tuple(&vp10_fht16x16_sse2,
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 1, VPX_BITS_12),
|
&vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 2, VPX_BITS_12),
|
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_c, 3,
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 3, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
|
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 3,
|
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
// Optimizations take effect at a threshold of 3155, so we use a value close to
|
// Optimizations take effect at a threshold of 3155, so we use a value close to
|
||||||
// that to test both branches.
|
// that to test both branches.
|
||||||
@@ -932,13 +899,24 @@ 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)));
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3, Trans16x16DCT,
|
MSA, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_c, &vp9_idct16x16_256_add_ssse3, 0,
|
make_tuple(&vpx_fdct16x16_msa,
|
||||||
VPX_BITS_8)));
|
&vpx_idct16x16_256_add_msa, 0, VPX_BITS_8)));
|
||||||
#endif // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, Trans16x16HT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp10_fht16x16_msa,
|
||||||
|
&vp10_iht16x16_256_add_msa, 0, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht16x16_msa,
|
||||||
|
&vp10_iht16x16_256_add_msa, 1, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht16x16_msa,
|
||||||
|
&vp10_iht16x16_256_add_msa, 2, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht16x16_msa,
|
||||||
|
&vp10_iht16x16_256_add_msa, 3, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -13,16 +13,18 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_ports/mem.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -78,19 +80,19 @@ typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
|
|||||||
typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
|
typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
|
||||||
Trans32x32Param;
|
Trans32x32Param;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct32x32_1024_add_c(in, out, stride, 8);
|
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) {
|
||||||
vp9_highbd_idct32x32_1024_add_c(in, out, stride, 10);
|
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct32x32_1024_add_c(in, out, stride, 12);
|
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> {
|
class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> {
|
||||||
public:
|
public:
|
||||||
@@ -119,13 +121,13 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||||||
uint32_t max_error = 0;
|
uint32_t max_error = 0;
|
||||||
int64_t total_error = 0;
|
int64_t total_error = 0;
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -135,7 +137,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
test_input_block[j] = src[j] - dst[j];
|
test_input_block[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -147,7 +149,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||||||
ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
|
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block,
|
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block,
|
||||||
CONVERT_TO_BYTEPTR(dst16), 32));
|
CONVERT_TO_BYTEPTR(dst16), 32));
|
||||||
@@ -155,7 +157,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -184,16 +186,16 @@ TEST_P(Trans32x32Test, CoeffCheck) {
|
|||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
for (int j = 0; j < kNumCoeffs; ++j)
|
for (int j = 0; j < kNumCoeffs; ++j)
|
||||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
||||||
|
|
||||||
const int stride = 32;
|
const int stride = 32;
|
||||||
vp9_fdct32x32_c(input_block, output_ref_block, stride);
|
vpx_fdct32x32_c(input_block, output_ref_block, stride);
|
||||||
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride));
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride));
|
||||||
|
|
||||||
if (version_ == 0) {
|
if (version_ == 0) {
|
||||||
@@ -212,15 +214,13 @@ TEST_P(Trans32x32Test, MemCheck) {
|
|||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 2000;
|
const int count_test_block = 2000;
|
||||||
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
|
||||||
input_extreme_block[j] = rnd.Rand8() & 1 ? mask_ : -mask_;
|
input_extreme_block[j] = rnd.Rand8() & 1 ? mask_ : -mask_;
|
||||||
}
|
}
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@@ -232,7 +232,7 @@ TEST_P(Trans32x32Test, MemCheck) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const int stride = 32;
|
const int stride = 32;
|
||||||
vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride);
|
vpx_fdct32x32_c(input_extreme_block, output_ref_block, stride);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
fwd_txfm_(input_extreme_block, output_block, stride));
|
fwd_txfm_(input_extreme_block, output_block, stride));
|
||||||
|
|
||||||
@@ -257,13 +257,13 @@ TEST_P(Trans32x32Test, MemCheck) {
|
|||||||
TEST_P(Trans32x32Test, InverseAccuracy) {
|
TEST_P(Trans32x32Test, InverseAccuracy) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -275,7 +275,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
in[j] = src[j] - dst[j];
|
in[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -289,13 +289,13 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
|||||||
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
|
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
|
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, CONVERT_TO_BYTEPTR(dst16), 32));
|
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, CONVERT_TO_BYTEPTR(dst16), 32));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -311,75 +311,85 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans32x32Test,
|
C, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct32x32_c,
|
make_tuple(&vpx_highbd_fdct32x32_c,
|
||||||
&idct32x32_10, 0, VPX_BITS_10),
|
&idct32x32_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_rd_c,
|
make_tuple(&vpx_highbd_fdct32x32_rd_c,
|
||||||
&idct32x32_10, 1, VPX_BITS_10),
|
&idct32x32_10, 1, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_c,
|
make_tuple(&vpx_highbd_fdct32x32_c,
|
||||||
&idct32x32_12, 0, VPX_BITS_12),
|
&idct32x32_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_rd_c,
|
make_tuple(&vpx_highbd_fdct32x32_rd_c,
|
||||||
&idct32x32_12, 1, VPX_BITS_12),
|
&idct32x32_12, 1, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans32x32Test,
|
C, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Trans32x32Test,
|
NEON, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vp9_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_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans32x32Test,
|
SSE2, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_sse2,
|
make_tuple(&vpx_fdct32x32_sse2,
|
||||||
&vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_sse2,
|
make_tuple(&vpx_fdct32x32_rd_sse2,
|
||||||
&vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans32x32Test,
|
SSE2, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
|
make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
|
||||||
VPX_BITS_10),
|
VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
|
make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
|
make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
|
||||||
VPX_BITS_12),
|
VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct32x32_sse2, &vp9_idct32x32_1024_add_c, 0,
|
make_tuple(&vpx_fdct32x32_sse2, &vpx_idct32x32_1024_add_c, 0,
|
||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_sse2, &vp9_idct32x32_1024_add_c, 1,
|
make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
AVX2, Trans32x32Test,
|
AVX2, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_avx2,
|
make_tuple(&vpx_fdct32x32_avx2,
|
||||||
&vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_avx2,
|
make_tuple(&vpx_fdct32x32_rd_avx2,
|
||||||
&vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||||
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
|
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, Trans32x32Test,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_fdct32x32_msa,
|
||||||
|
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||||
|
make_tuple(&vpx_fdct32x32_rd_msa,
|
||||||
|
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -7,10 +7,11 @@
|
|||||||
* 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 "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "test/ivf_video_source.h"
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
|
#include "test/ivf_video_source.h"
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
|
|
||||||
@@ -25,6 +26,9 @@ TEST(DecodeAPI, InvalidParams) {
|
|||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
&vpx_codec_vp9_dx_algo,
|
&vpx_codec_vp9_dx_algo,
|
||||||
|
#endif
|
||||||
|
#if CONFIG_VP10_DECODER
|
||||||
|
&vpx_codec_vp10_dx_algo,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
uint8_t buf[1] = {0};
|
uint8_t buf[1] = {0};
|
||||||
@@ -129,8 +133,13 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
|
|||||||
vpx_codec_ctx_t dec;
|
vpx_codec_ctx_t dec;
|
||||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||||
const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
|
const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
|
||||||
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
|
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
|
||||||
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
|
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
|
||||||
|
#else
|
||||||
|
EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
|
||||||
|
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
|
||||||
|
#endif
|
||||||
vpx_codec_iter_t iter = NULL;
|
vpx_codec_iter_t iter = NULL;
|
||||||
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,6 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) {
|
|||||||
printf("}\n");
|
printf("}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
VP9NewEncodeDecodePerfTest, ::testing::Values(::libvpx_test::kTwoPassGood));
|
VP9NewEncodeDecodePerfTest, ::testing::Values(::libvpx_test::kTwoPassGood));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -7,9 +7,11 @@
|
|||||||
* 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 "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "test/codec_factory.h"
|
#include "test/codec_factory.h"
|
||||||
#include "test/decode_test_driver.h"
|
#include "test/decode_test_driver.h"
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/video_source.h"
|
#include "test/video_source.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#include "vpx_scale/yv12config.h"
|
#include "vpx_scale/yv12config.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vp9/common/vp9_reconinter.h"
|
#include "vp10/common/reconinter.h"
|
||||||
#include "vp9/encoder/vp9_context_tree.h"
|
#include "vp10/encoder/context_tree.h"
|
||||||
#include "vp9/encoder/vp9_denoiser.h"
|
#include "vp10/encoder/denoiser.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -52,10 +52,10 @@ TEST_P(VP9DenoiserTest, BitexactCheck) {
|
|||||||
// mc_avg_block is the denoised reference block,
|
// mc_avg_block is the denoised reference block,
|
||||||
// avg_block_c is the denoised result from C code,
|
// avg_block_c is the denoised result from C code,
|
||||||
// avg_block_sse2 is the denoised result from SSE2 code.
|
// avg_block_sse2 is the denoised result from SSE2 code.
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, sig_block, kNumPixels);
|
DECLARE_ALIGNED(16, uint8_t, sig_block[kNumPixels]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, mc_avg_block, kNumPixels);
|
DECLARE_ALIGNED(16, uint8_t, mc_avg_block[kNumPixels]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_c, kNumPixels);
|
DECLARE_ALIGNED(16, uint8_t, avg_block_c[kNumPixels]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_sse2, kNumPixels);
|
DECLARE_ALIGNED(16, uint8_t, avg_block_sse2[kNumPixels]);
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Generate random motion magnitude, 20% of which exceed the threshold.
|
// Generate random motion magnitude, 20% of which exceed the threshold.
|
||||||
@@ -197,6 +197,6 @@ TEST_P(VP9EncodePerfTest, PerfTest) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
VP9EncodePerfTest, ::testing::Values(::libvpx_test::kRealTime));
|
VP9EncodePerfTest, ::testing::Values(::libvpx_test::kRealTime));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -10,13 +10,14 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "test/codec_factory.h"
|
#include "test/codec_factory.h"
|
||||||
#include "test/encode_test_driver.h"
|
|
||||||
#include "test/decode_test_driver.h"
|
#include "test/decode_test_driver.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/video_source.h"
|
#include "test/video_source.h"
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
|
|
||||||
namespace libvpx_test {
|
namespace libvpx_test {
|
||||||
void Encoder::InitEncoder(VideoSource *video) {
|
void Encoder::InitEncoder(VideoSource *video) {
|
||||||
@@ -29,8 +30,6 @@ void Encoder::InitEncoder(VideoSource *video) {
|
|||||||
cfg_.g_timebase = video->timebase();
|
cfg_.g_timebase = video->timebase();
|
||||||
cfg_.rc_twopass_stats_in = stats_->buf();
|
cfg_.rc_twopass_stats_in = stats_->buf();
|
||||||
|
|
||||||
// Default to 1 thread.
|
|
||||||
cfg_.g_threads = 1;
|
|
||||||
res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
|
res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
|
||||||
init_flags_);
|
init_flags_);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
@@ -43,6 +42,15 @@ void Encoder::InitEncoder(VideoSource *video) {
|
|||||||
log2_tile_columns);
|
log2_tile_columns);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
|
||||||
|
// Default to 1 tile column for VP10.
|
||||||
|
const int log2_tile_columns = 0;
|
||||||
|
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
|
||||||
|
log2_tile_columns);
|
||||||
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if CONFIG_VP8_ENCODER
|
#if CONFIG_VP8_ENCODER
|
||||||
@@ -187,6 +195,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
|
|||||||
|
|
||||||
video->Begin();
|
video->Begin();
|
||||||
encoder->InitEncoder(video);
|
encoder->InitEncoder(video);
|
||||||
|
ASSERT_FALSE(::testing::Test::HasFatalFailure());
|
||||||
|
|
||||||
unsigned long dec_init_flags = 0; // NOLINT
|
unsigned long dec_init_flags = 0; // NOLINT
|
||||||
// Use fragment decoder if encoder outputs partitions.
|
// Use fragment decoder if encoder outputs partitions.
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
#include "./vpx_config.h"
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
namespace libvpx_test {
|
namespace libvpx_test {
|
||||||
|
|
||||||
@@ -123,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();
|
||||||
@@ -133,7 +139,11 @@ class Encoder {
|
|||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
void Control(int ctrl_id, struct vpx_svc_parameters *arg) {
|
||||||
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
|
}
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
void Control(int ctrl_id, vpx_active_map_t *arg) {
|
void Control(int ctrl_id, vpx_active_map_t *arg) {
|
||||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
@@ -183,7 +193,10 @@ class EncoderTest {
|
|||||||
protected:
|
protected:
|
||||||
explicit EncoderTest(const CodecFactory *codec)
|
explicit EncoderTest(const CodecFactory *codec)
|
||||||
: codec_(codec), abort_(false), init_flags_(0), frame_flags_(0),
|
: codec_(codec), abort_(false), init_flags_(0), frame_flags_(0),
|
||||||
last_pts_(0) {}
|
last_pts_(0) {
|
||||||
|
// Default to 1 thread.
|
||||||
|
cfg_.g_threads = 1;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~EncoderTest() {}
|
virtual ~EncoderTest() {}
|
||||||
|
|
||||||
|
|||||||
149
test/encoder_parms_get_to_decoder.cc
Normal file
149
test/encoder_parms_get_to_decoder.cc
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "test/codec_factory.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "test/y4m_video_source.h"
|
||||||
|
#include "vp10/vp10_dx_iface.c"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const int kCpuUsed = 2;
|
||||||
|
|
||||||
|
struct EncodePerfTestVideo {
|
||||||
|
const char *name;
|
||||||
|
uint32_t width;
|
||||||
|
uint32_t height;
|
||||||
|
uint32_t bitrate;
|
||||||
|
int frames;
|
||||||
|
};
|
||||||
|
|
||||||
|
const EncodePerfTestVideo kVP9EncodePerfTestVectors[] = {
|
||||||
|
{"niklas_1280_720_30.y4m", 1280, 720, 600, 10},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct EncodeParameters {
|
||||||
|
int32_t tile_rows;
|
||||||
|
int32_t tile_cols;
|
||||||
|
int32_t lossless;
|
||||||
|
int32_t error_resilient;
|
||||||
|
int32_t frame_parallel;
|
||||||
|
vpx_color_range_t color_range;
|
||||||
|
vpx_color_space_t cs;
|
||||||
|
int render_size[2];
|
||||||
|
// TODO(JBB): quantizers / bitrate
|
||||||
|
};
|
||||||
|
|
||||||
|
const EncodeParameters kVP9EncodeParameterSet[] = {
|
||||||
|
{0, 0, 0, 1, 0, VPX_CR_STUDIO_RANGE, VPX_CS_BT_601},
|
||||||
|
{0, 0, 0, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_709},
|
||||||
|
{0, 0, 1, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_2020},
|
||||||
|
{0, 2, 0, 0, 1, VPX_CR_STUDIO_RANGE, VPX_CS_UNKNOWN, { 640, 480 }},
|
||||||
|
// TODO(JBB): Test profiles (requires more work).
|
||||||
|
};
|
||||||
|
|
||||||
|
class VpxEncoderParmsGetToDecoder
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<EncodeParameters,
|
||||||
|
EncodePerfTestVideo> {
|
||||||
|
protected:
|
||||||
|
VpxEncoderParmsGetToDecoder()
|
||||||
|
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
|
||||||
|
|
||||||
|
virtual ~VpxEncoderParmsGetToDecoder() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(::libvpx_test::kTwoPassGood);
|
||||||
|
cfg_.g_lag_in_frames = 25;
|
||||||
|
cfg_.g_error_resilient = encode_parms.error_resilient;
|
||||||
|
dec_cfg_.threads = 4;
|
||||||
|
test_video_ = GET_PARAM(2);
|
||||||
|
cfg_.rc_target_bitrate = test_video_.bitrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 1) {
|
||||||
|
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_FRAME_PARALLEL_DECODING,
|
||||||
|
encode_parms.frame_parallel);
|
||||||
|
encoder->Control(VP9E_SET_TILE_ROWS, encode_parms.tile_rows);
|
||||||
|
encoder->Control(VP9E_SET_TILE_COLUMNS, encode_parms.tile_cols);
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, kCpuUsed);
|
||||||
|
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||||
|
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,
|
||||||
|
const libvpx_test::VideoSource &video,
|
||||||
|
libvpx_test::Decoder *decoder) {
|
||||||
|
vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder();
|
||||||
|
vpx_codec_alg_priv_t *const priv =
|
||||||
|
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
|
||||||
|
FrameWorkerData *const worker_data =
|
||||||
|
reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1);
|
||||||
|
VP10_COMMON *const common = &worker_data->pbi->common;
|
||||||
|
|
||||||
|
if (encode_parms.lossless) {
|
||||||
|
EXPECT_EQ(0, common->base_qindex);
|
||||||
|
EXPECT_EQ(0, common->y_dc_delta_q);
|
||||||
|
EXPECT_EQ(0, common->uv_dc_delta_q);
|
||||||
|
EXPECT_EQ(0, common->uv_ac_delta_q);
|
||||||
|
EXPECT_EQ(ONLY_4X4, common->tx_mode);
|
||||||
|
}
|
||||||
|
EXPECT_EQ(encode_parms.error_resilient, common->error_resilient_mode);
|
||||||
|
if (encode_parms.error_resilient) {
|
||||||
|
EXPECT_EQ(0, common->use_prev_frame_mvs);
|
||||||
|
}
|
||||||
|
EXPECT_EQ(encode_parms.color_range, common->color_range);
|
||||||
|
EXPECT_EQ(encode_parms.cs, common->color_space);
|
||||||
|
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();
|
||||||
|
return VPX_CODEC_OK == res_dec;
|
||||||
|
}
|
||||||
|
|
||||||
|
EncodePerfTestVideo test_video_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
EncodeParameters encode_parms;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
|
||||||
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
|
||||||
|
libvpx_test::VideoSource *const video =
|
||||||
|
new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
|
||||||
|
ASSERT_TRUE(video != NULL);
|
||||||
|
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||||
|
delete video;
|
||||||
|
}
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
|
||||||
|
::testing::ValuesIn(kVP9EncodeParameterSet),
|
||||||
|
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||||
|
} // namespace
|
||||||
@@ -8,12 +8,13 @@
|
|||||||
* 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 "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "test/codec_factory.h"
|
#include "test/codec_factory.h"
|
||||||
#include "test/encode_test_driver.h"
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/util.h"
|
||||||
#include "test/y4m_video_source.h"
|
#include "test/y4m_video_source.h"
|
||||||
#include "test/yuv_video_source.h"
|
#include "test/yuv_video_source.h"
|
||||||
#include "test/util.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ const TestVideoParam kTestVectors[] = {
|
|||||||
{"park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422, VPX_BITS_8, 1},
|
{"park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422, VPX_BITS_8, 1},
|
||||||
{"park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
|
{"park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
|
||||||
{"park_joy_90p_8_440.yuv", 8, VPX_IMG_FMT_I440, VPX_BITS_8, 1},
|
{"park_joy_90p_8_440.yuv", 8, VPX_IMG_FMT_I440, VPX_BITS_8, 1},
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
{"park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016, VPX_BITS_10, 2},
|
{"park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016, VPX_BITS_10, 2},
|
||||||
{"park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216, VPX_BITS_10, 3},
|
{"park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216, VPX_BITS_10, 3},
|
||||||
{"park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416, VPX_BITS_10, 3},
|
{"park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416, VPX_BITS_10, 3},
|
||||||
@@ -56,7 +57,7 @@ const TestVideoParam kTestVectors[] = {
|
|||||||
{"park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216, VPX_BITS_12, 3},
|
{"park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216, VPX_BITS_12, 3},
|
||||||
{"park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416, VPX_BITS_12, 3},
|
{"park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416, VPX_BITS_12, 3},
|
||||||
{"park_joy_90p_12_440.yuv", 12, VPX_IMG_FMT_I44016, VPX_BITS_12, 3},
|
{"park_joy_90p_12_440.yuv", 12, VPX_IMG_FMT_I44016, VPX_BITS_12, 3},
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
};
|
};
|
||||||
|
|
||||||
// Encoding modes tested
|
// Encoding modes tested
|
||||||
@@ -180,10 +181,23 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
|
|||||||
delete(video);
|
delete(video);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
#if CONFIG_VPX_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(
|
||||||
EndToEndTestLarge,
|
EndToEndTestLarge,
|
||||||
::testing::ValuesIn(kEncodingModeVectors),
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -14,19 +14,20 @@
|
|||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
#include "./vpx_config.h"
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vp9_rtcd.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int kNumIterations = 1000;
|
const int kNumIterations = 1000;
|
||||||
|
|
||||||
typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff,
|
typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff,
|
||||||
@@ -57,8 +58,8 @@ class ErrorBlockTest
|
|||||||
|
|
||||||
TEST_P(ErrorBlockTest, OperationCheck) {
|
TEST_P(ErrorBlockTest, OperationCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, 4096);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[4096]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096);
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]);
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
intptr_t block_size;
|
intptr_t block_size;
|
||||||
@@ -66,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_);
|
||||||
@@ -84,14 +95,14 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(ErrorBlockTest, ExtremeValues) {
|
TEST_P(ErrorBlockTest, ExtremeValues) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, 4096);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[4096]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096);
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]);
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
intptr_t block_size;
|
intptr_t block_size;
|
||||||
@@ -99,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,
|
||||||
@@ -129,22 +153,59 @@ 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_vp10_highbd_block_error_8bit_c(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp10_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
|
int64_t wrap_vp10_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp10_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(
|
||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp10_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_10),
|
&vp10_highbd_block_error_c, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp10_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_12),
|
&vp10_highbd_block_error_c, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp10_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_8)));
|
&vp10_highbd_block_error_c, VPX_BITS_8),
|
||||||
|
make_tuple(&wrap_vp10_highbd_block_error_8bit_sse2,
|
||||||
|
&wrap_vp10_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
||||||
|
#if HAVE_AVX
|
||||||
|
int64_t wrap_vp10_highbd_block_error_8bit_avx(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp10_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
AVX, ErrorBlockTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&wrap_vp10_highbd_block_error_8bit_avx,
|
||||||
|
&wrap_vp10_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_AVX
|
||||||
|
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -20,10 +20,11 @@ const int kMaxErrorFrames = 12;
|
|||||||
const int kMaxDroppableFrames = 12;
|
const int kMaxDroppableFrames = 12;
|
||||||
|
|
||||||
class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
||||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, bool> {
|
||||||
protected:
|
protected:
|
||||||
ErrorResilienceTestLarge()
|
ErrorResilienceTestLarge()
|
||||||
: EncoderTest(GET_PARAM(0)),
|
: EncoderTest(GET_PARAM(0)),
|
||||||
|
svc_support_(GET_PARAM(2)),
|
||||||
psnr_(0.0),
|
psnr_(0.0),
|
||||||
nframes_(0),
|
nframes_(0),
|
||||||
mismatch_psnr_(0.0),
|
mismatch_psnr_(0.0),
|
||||||
@@ -193,6 +194,8 @@ class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
|||||||
pattern_switch_ = frame_switch;
|
pattern_switch_ = frame_switch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool svc_support_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double psnr_;
|
double psnr_;
|
||||||
unsigned int nframes_;
|
unsigned int nframes_;
|
||||||
@@ -302,6 +305,10 @@ TEST_P(ErrorResilienceTestLarge, DropFramesWithoutRecovery) {
|
|||||||
// two layer temporal pattern. The base layer does not predict from the top
|
// two layer temporal pattern. The base layer does not predict from the top
|
||||||
// layer, so successful decoding is expected.
|
// layer, so successful decoding is expected.
|
||||||
TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
|
TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
|
||||||
|
// This test doesn't run if SVC is not supported.
|
||||||
|
if (!svc_support_)
|
||||||
|
return;
|
||||||
|
|
||||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
const vpx_rational timebase = { 33333333, 1000000000 };
|
||||||
cfg_.g_timebase = timebase;
|
cfg_.g_timebase = timebase;
|
||||||
cfg_.rc_target_bitrate = 500;
|
cfg_.rc_target_bitrate = 500;
|
||||||
@@ -347,6 +354,10 @@ TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
|
|||||||
// for a two layer temporal pattern, where at some point in the
|
// for a two layer temporal pattern, where at some point in the
|
||||||
// sequence, the LAST ref is not used anymore.
|
// sequence, the LAST ref is not used anymore.
|
||||||
TEST_P(ErrorResilienceTestLarge, 2LayersNoRefLast) {
|
TEST_P(ErrorResilienceTestLarge, 2LayersNoRefLast) {
|
||||||
|
// This test doesn't run if SVC is not supported.
|
||||||
|
if (!svc_support_)
|
||||||
|
return;
|
||||||
|
|
||||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
const vpx_rational timebase = { 33333333, 1000000000 };
|
||||||
cfg_.g_timebase = timebase;
|
cfg_.g_timebase = timebase;
|
||||||
cfg_.rc_target_bitrate = 500;
|
cfg_.rc_target_bitrate = 500;
|
||||||
@@ -579,8 +590,7 @@ TEST_P(ErrorResilienceTestLargeCodecControls, CodecControl3TemporalLayers) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
|
// SVC-related tests don't run for VP10 since SVC is not supported.
|
||||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
|
VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
||||||
ONE_PASS_TEST_MODES);
|
::testing::Values(false));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
#include "test/y4m_video_source.h"
|
#include "test/y4m_video_source.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
class VP9EncoderThreadTest
|
class VPxEncoderThreadTest
|
||||||
: public ::libvpx_test::EncoderTest,
|
: public ::libvpx_test::EncoderTest,
|
||||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
protected:
|
protected:
|
||||||
VP9EncoderThreadTest()
|
VPxEncoderThreadTest()
|
||||||
: EncoderTest(GET_PARAM(0)),
|
: EncoderTest(GET_PARAM(0)),
|
||||||
encoder_initialized_(false),
|
encoder_initialized_(false),
|
||||||
tiles_(2),
|
tiles_(2),
|
||||||
@@ -36,7 +36,7 @@ class VP9EncoderThreadTest
|
|||||||
|
|
||||||
md5_.clear();
|
md5_.clear();
|
||||||
}
|
}
|
||||||
virtual ~VP9EncoderThreadTest() {
|
virtual ~VPxEncoderThreadTest() {
|
||||||
delete decoder_;
|
delete decoder_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ class VP9EncoderThreadTest
|
|||||||
std::vector<std::string> md5_;
|
std::vector<std::string> md5_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
|
TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
|
||||||
std::vector<std::string> single_thr_md5, multi_thr_md5;
|
std::vector<std::string> single_thr_md5, multi_thr_md5;
|
||||||
|
|
||||||
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 20);
|
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 20);
|
||||||
@@ -129,9 +129,8 @@ TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
|
|||||||
ASSERT_EQ(single_thr_md5, multi_thr_md5);
|
ASSERT_EQ(single_thr_md5, multi_thr_md5);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
VP9EncoderThreadTest,
|
VPxEncoderThreadTest,
|
||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||||
::libvpx_test::kRealTime),
|
::testing::Range(1, 3));
|
||||||
::testing::Range(1, 9));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -1,488 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2014 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>
|
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/decode_test_driver.h"
|
|
||||||
#include "test/ivf_video_source.h"
|
|
||||||
#include "test/md5_helper.h"
|
|
||||||
#include "test/test_vectors.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
#include "test/webm_video_source.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const int kVideoNameParam = 1;
|
|
||||||
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
|
||||||
|
|
||||||
struct ExternalFrameBuffer {
|
|
||||||
uint8_t *data;
|
|
||||||
size_t size;
|
|
||||||
int in_use;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Class to manipulate a list of external frame buffers.
|
|
||||||
class ExternalFrameBufferList {
|
|
||||||
public:
|
|
||||||
ExternalFrameBufferList()
|
|
||||||
: num_buffers_(0),
|
|
||||||
ext_fb_list_(NULL) {}
|
|
||||||
|
|
||||||
virtual ~ExternalFrameBufferList() {
|
|
||||||
for (int i = 0; i < num_buffers_; ++i) {
|
|
||||||
delete [] ext_fb_list_[i].data;
|
|
||||||
}
|
|
||||||
delete [] ext_fb_list_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Creates the list to hold the external buffers. Returns true on success.
|
|
||||||
bool CreateBufferList(int num_buffers) {
|
|
||||||
if (num_buffers < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
num_buffers_ = num_buffers;
|
|
||||||
ext_fb_list_ = new ExternalFrameBuffer[num_buffers_];
|
|
||||||
EXPECT_TRUE(ext_fb_list_ != NULL);
|
|
||||||
memset(ext_fb_list_, 0, sizeof(ext_fb_list_[0]) * num_buffers_);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Searches the frame buffer list for a free frame buffer. Makes sure
|
|
||||||
// that the frame buffer is at least |min_size| in bytes. Marks that the
|
|
||||||
// frame buffer is in use by libvpx. Finally sets |fb| to point to the
|
|
||||||
// external frame buffer. Returns < 0 on an error.
|
|
||||||
int GetFreeFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) {
|
|
||||||
EXPECT_TRUE(fb != NULL);
|
|
||||||
const int idx = FindFreeBufferIndex();
|
|
||||||
if (idx == num_buffers_)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (ext_fb_list_[idx].size < min_size) {
|
|
||||||
delete [] ext_fb_list_[idx].data;
|
|
||||||
ext_fb_list_[idx].data = new uint8_t[min_size];
|
|
||||||
memset(ext_fb_list_[idx].data, 0, min_size);
|
|
||||||
ext_fb_list_[idx].size = min_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetFrameBuffer(idx, fb);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test function that will not allocate any data for the frame buffer.
|
|
||||||
// Returns < 0 on an error.
|
|
||||||
int GetZeroFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) {
|
|
||||||
EXPECT_TRUE(fb != NULL);
|
|
||||||
const int idx = FindFreeBufferIndex();
|
|
||||||
if (idx == num_buffers_)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (ext_fb_list_[idx].size < min_size) {
|
|
||||||
delete [] ext_fb_list_[idx].data;
|
|
||||||
ext_fb_list_[idx].data = NULL;
|
|
||||||
ext_fb_list_[idx].size = min_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetFrameBuffer(idx, fb);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Marks the external frame buffer that |fb| is pointing to as free.
|
|
||||||
// Returns < 0 on an error.
|
|
||||||
int ReturnFrameBuffer(vpx_codec_frame_buffer_t *fb) {
|
|
||||||
if (fb == NULL) {
|
|
||||||
EXPECT_TRUE(fb != NULL);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
ExternalFrameBuffer *const ext_fb =
|
|
||||||
reinterpret_cast<ExternalFrameBuffer*>(fb->priv);
|
|
||||||
if (ext_fb == NULL) {
|
|
||||||
EXPECT_TRUE(ext_fb != NULL);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
EXPECT_EQ(1, ext_fb->in_use);
|
|
||||||
ext_fb->in_use = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks that the ximage data is contained within the external frame buffer
|
|
||||||
// private data passed back in the ximage.
|
|
||||||
void CheckXImageFrameBuffer(const vpx_image_t *img) {
|
|
||||||
if (img->fb_priv != NULL) {
|
|
||||||
const struct ExternalFrameBuffer *const ext_fb =
|
|
||||||
reinterpret_cast<ExternalFrameBuffer*>(img->fb_priv);
|
|
||||||
|
|
||||||
ASSERT_TRUE(img->planes[0] >= ext_fb->data &&
|
|
||||||
img->planes[0] < (ext_fb->data + ext_fb->size));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Returns the index of the first free frame buffer. Returns |num_buffers_|
|
|
||||||
// if there are no free frame buffers.
|
|
||||||
int FindFreeBufferIndex() {
|
|
||||||
int i;
|
|
||||||
// Find a free frame buffer.
|
|
||||||
for (i = 0; i < num_buffers_; ++i) {
|
|
||||||
if (!ext_fb_list_[i].in_use)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sets |fb| to an external frame buffer. idx is the index into the frame
|
|
||||||
// buffer list.
|
|
||||||
void SetFrameBuffer(int idx, vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ASSERT_TRUE(fb != NULL);
|
|
||||||
fb->data = ext_fb_list_[idx].data;
|
|
||||||
fb->size = ext_fb_list_[idx].size;
|
|
||||||
ASSERT_EQ(0, ext_fb_list_[idx].in_use);
|
|
||||||
ext_fb_list_[idx].in_use = 1;
|
|
||||||
fb->priv = &ext_fb_list_[idx];
|
|
||||||
}
|
|
||||||
|
|
||||||
int num_buffers_;
|
|
||||||
ExternalFrameBuffer *ext_fb_list_;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Callback used by libvpx to request the application to return a frame
|
|
||||||
// buffer of at least |min_size| in bytes.
|
|
||||||
int get_vp9_frame_buffer(void *user_priv, size_t min_size,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferList *const fb_list =
|
|
||||||
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
|
|
||||||
return fb_list->GetFreeFrameBuffer(min_size, fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback used by libvpx to tell the application that |fb| is not needed
|
|
||||||
// anymore.
|
|
||||||
int release_vp9_frame_buffer(void *user_priv,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferList *const fb_list =
|
|
||||||
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
|
|
||||||
return fb_list->ReturnFrameBuffer(fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback will not allocate data for frame buffer.
|
|
||||||
int get_vp9_zero_frame_buffer(void *user_priv, size_t min_size,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferList *const fb_list =
|
|
||||||
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
|
|
||||||
return fb_list->GetZeroFrameBuffer(min_size, fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback will allocate one less byte than |min_size|.
|
|
||||||
int get_vp9_one_less_byte_frame_buffer(void *user_priv, size_t min_size,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferList *const fb_list =
|
|
||||||
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
|
|
||||||
return fb_list->GetFreeFrameBuffer(min_size - 1, fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback will not release the external frame buffer.
|
|
||||||
int do_not_release_vp9_frame_buffer(void *user_priv,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
(void)user_priv;
|
|
||||||
(void)fb;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Class for testing passing in external frame buffers to libvpx.
|
|
||||||
class ExternalFrameBufferMD5Test
|
|
||||||
: public ::libvpx_test::DecoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<const char*> {
|
|
||||||
protected:
|
|
||||||
ExternalFrameBufferMD5Test()
|
|
||||||
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
|
|
||||||
md5_file_(NULL),
|
|
||||||
num_buffers_(0) {}
|
|
||||||
|
|
||||||
virtual ~ExternalFrameBufferMD5Test() {
|
|
||||||
if (md5_file_ != NULL)
|
|
||||||
fclose(md5_file_);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PreDecodeFrameHook(
|
|
||||||
const libvpx_test::CompressedVideoSource &video,
|
|
||||||
libvpx_test::Decoder *decoder) {
|
|
||||||
if (num_buffers_ > 0 && video.frame_number() == 0) {
|
|
||||||
// Have libvpx use frame buffers we create.
|
|
||||||
ASSERT_TRUE(fb_list_.CreateBufferList(num_buffers_));
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
decoder->SetFrameBufferFunctions(
|
|
||||||
GetVP9FrameBuffer, ReleaseVP9FrameBuffer, this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenMD5File(const std::string &md5_file_name_) {
|
|
||||||
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
|
|
||||||
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: "
|
|
||||||
<< md5_file_name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
|
||||||
const unsigned int frame_number) {
|
|
||||||
ASSERT_TRUE(md5_file_ != NULL);
|
|
||||||
char expected_md5[33];
|
|
||||||
char junk[128];
|
|
||||||
|
|
||||||
// Read correct md5 checksums.
|
|
||||||
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
|
|
||||||
ASSERT_NE(EOF, res) << "Read md5 data failed";
|
|
||||||
expected_md5[32] = '\0';
|
|
||||||
|
|
||||||
::libvpx_test::MD5 md5_res;
|
|
||||||
md5_res.Add(&img);
|
|
||||||
const char *const actual_md5 = md5_res.Get();
|
|
||||||
|
|
||||||
// Check md5 match.
|
|
||||||
ASSERT_STREQ(expected_md5, actual_md5)
|
|
||||||
<< "Md5 checksums don't match: frame number = " << frame_number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback to get a free external frame buffer. Return value < 0 is an
|
|
||||||
// error.
|
|
||||||
static int GetVP9FrameBuffer(void *user_priv, size_t min_size,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferMD5Test *const md5Test =
|
|
||||||
reinterpret_cast<ExternalFrameBufferMD5Test*>(user_priv);
|
|
||||||
return md5Test->fb_list_.GetFreeFrameBuffer(min_size, fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Callback to release an external frame buffer. Return value < 0 is an
|
|
||||||
// error.
|
|
||||||
static int ReleaseVP9FrameBuffer(void *user_priv,
|
|
||||||
vpx_codec_frame_buffer_t *fb) {
|
|
||||||
ExternalFrameBufferMD5Test *const md5Test =
|
|
||||||
reinterpret_cast<ExternalFrameBufferMD5Test*>(user_priv);
|
|
||||||
return md5Test->fb_list_.ReturnFrameBuffer(fb);
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_num_buffers(int num_buffers) { num_buffers_ = num_buffers; }
|
|
||||||
int num_buffers() const { return num_buffers_; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
FILE *md5_file_;
|
|
||||||
int num_buffers_;
|
|
||||||
ExternalFrameBufferList fb_list_;
|
|
||||||
};
|
|
||||||
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
// Class for testing passing in external frame buffers to libvpx.
|
|
||||||
class ExternalFrameBufferTest : public ::testing::Test {
|
|
||||||
protected:
|
|
||||||
ExternalFrameBufferTest()
|
|
||||||
: video_(NULL),
|
|
||||||
decoder_(NULL),
|
|
||||||
num_buffers_(0) {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
|
||||||
ASSERT_TRUE(video_ != NULL);
|
|
||||||
video_->Init();
|
|
||||||
video_->Begin();
|
|
||||||
|
|
||||||
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
|
||||||
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
|
|
||||||
ASSERT_TRUE(decoder_ != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void TearDown() {
|
|
||||||
delete decoder_;
|
|
||||||
delete video_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Passes the external frame buffer information to libvpx.
|
|
||||||
vpx_codec_err_t SetFrameBufferFunctions(
|
|
||||||
int num_buffers,
|
|
||||||
vpx_get_frame_buffer_cb_fn_t cb_get,
|
|
||||||
vpx_release_frame_buffer_cb_fn_t cb_release) {
|
|
||||||
if (num_buffers > 0) {
|
|
||||||
num_buffers_ = num_buffers;
|
|
||||||
EXPECT_TRUE(fb_list_.CreateBufferList(num_buffers_));
|
|
||||||
}
|
|
||||||
|
|
||||||
return decoder_->SetFrameBufferFunctions(cb_get, cb_release, &fb_list_);
|
|
||||||
}
|
|
||||||
|
|
||||||
vpx_codec_err_t DecodeOneFrame() {
|
|
||||||
const vpx_codec_err_t res =
|
|
||||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
|
||||||
CheckDecodedFrames();
|
|
||||||
if (res == VPX_CODEC_OK)
|
|
||||||
video_->Next();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
vpx_codec_err_t DecodeRemainingFrames() {
|
|
||||||
for (; video_->cxdata() != NULL; video_->Next()) {
|
|
||||||
const vpx_codec_err_t res =
|
|
||||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
|
||||||
if (res != VPX_CODEC_OK)
|
|
||||||
return res;
|
|
||||||
CheckDecodedFrames();
|
|
||||||
}
|
|
||||||
return VPX_CODEC_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
void CheckDecodedFrames() {
|
|
||||||
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
|
|
||||||
const vpx_image_t *img = NULL;
|
|
||||||
|
|
||||||
// Get decompressed data
|
|
||||||
while ((img = dec_iter.Next()) != NULL) {
|
|
||||||
fb_list_.CheckXImageFrameBuffer(img);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
libvpx_test::WebMVideoSource *video_;
|
|
||||||
libvpx_test::VP9Decoder *decoder_;
|
|
||||||
int num_buffers_;
|
|
||||||
ExternalFrameBufferList fb_list_;
|
|
||||||
};
|
|
||||||
#endif // CONFIG_WEBM_IO
|
|
||||||
|
|
||||||
// This test runs through the set of test vectors, and decodes them.
|
|
||||||
// Libvpx will call into the application to allocate a frame buffer when
|
|
||||||
// needed. The md5 checksums are computed for each frame in the video file.
|
|
||||||
// If md5 checksums match the correct md5 data, then the test is passed.
|
|
||||||
// Otherwise, the test failed.
|
|
||||||
TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
|
|
||||||
const std::string filename = GET_PARAM(kVideoNameParam);
|
|
||||||
libvpx_test::CompressedVideoSource *video = NULL;
|
|
||||||
|
|
||||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
|
||||||
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
|
|
||||||
const int jitter_buffers = 4;
|
|
||||||
const int num_buffers =
|
|
||||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
|
||||||
set_num_buffers(num_buffers);
|
|
||||||
|
|
||||||
#if CONFIG_VP8_DECODER
|
|
||||||
// Tell compiler we are not using kVP8TestVectors.
|
|
||||||
(void)libvpx_test::kVP8TestVectors;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Open compressed video file.
|
|
||||||
if (filename.substr(filename.length() - 3, 3) == "ivf") {
|
|
||||||
video = new libvpx_test::IVFVideoSource(filename);
|
|
||||||
} else {
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
video = new libvpx_test::WebMVideoSource(filename);
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "WebM IO is disabled, skipping test vector %s\n",
|
|
||||||
filename.c_str());
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
ASSERT_TRUE(video != NULL);
|
|
||||||
video->Init();
|
|
||||||
|
|
||||||
// Construct md5 file name.
|
|
||||||
const std::string md5_filename = filename + ".md5";
|
|
||||||
OpenMD5File(md5_filename);
|
|
||||||
|
|
||||||
// Decode frame, and check the md5 matching.
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
|
||||||
delete video;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
TEST_F(ExternalFrameBufferTest, MinFrameBuffers) {
|
|
||||||
// Minimum number of external frame buffers for VP9 is
|
|
||||||
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS.
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(
|
|
||||||
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, EightJitterBuffers) {
|
|
||||||
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
|
|
||||||
// #VPX_MAXIMUM_WORK_BUFFERS + eight jitter buffers.
|
|
||||||
const int jitter_buffers = 8;
|
|
||||||
const int num_buffers =
|
|
||||||
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(
|
|
||||||
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, NotEnoughBuffers) {
|
|
||||||
// Minimum number of external frame buffers for VP9 is
|
|
||||||
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS. Most files will
|
|
||||||
// only use 5 frame buffers at one time.
|
|
||||||
const int num_buffers = 2;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(
|
|
||||||
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
|
|
||||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeRemainingFrames());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, NoRelease) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(num_buffers, get_vp9_frame_buffer,
|
|
||||||
do_not_release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
|
|
||||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeRemainingFrames());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, NullRealloc) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(num_buffers, get_vp9_zero_frame_buffer,
|
|
||||||
release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, ReallocOneLessByte) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK,
|
|
||||||
SetFrameBufferFunctions(
|
|
||||||
num_buffers, get_vp9_one_less_byte_frame_buffer,
|
|
||||||
release_vp9_frame_buffer));
|
|
||||||
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, NullGetFunction) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
|
|
||||||
SetFrameBufferFunctions(num_buffers, NULL,
|
|
||||||
release_vp9_frame_buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, NullReleaseFunction) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
|
|
||||||
SetFrameBufferFunctions(num_buffers, get_vp9_frame_buffer, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ExternalFrameBufferTest, SetAfterDecode) {
|
|
||||||
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
|
|
||||||
ASSERT_EQ(VPX_CODEC_ERROR,
|
|
||||||
SetFrameBufferFunctions(
|
|
||||||
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
|
|
||||||
}
|
|
||||||
#endif // CONFIG_WEBM_IO
|
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(ExternalFrameBufferMD5Test,
|
|
||||||
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
|
|
||||||
libvpx_test::kVP9TestVectors +
|
|
||||||
libvpx_test::kNumVP9TestVectors));
|
|
||||||
} // namespace
|
|
||||||
@@ -13,15 +13,17 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.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/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_ports/mem.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -39,53 +41,53 @@ 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) {
|
||||||
vp9_fdct4x4_c(in, out, stride);
|
vpx_fdct4x4_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
||||||
vp9_fht4x4_c(in, out, stride, tx_type);
|
vp10_fht4x4_c(in, out, stride, 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);
|
vp10_fwht4x4_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct4x4_16_add_c(in, out, stride, 10);
|
vpx_highbd_idct4x4_16_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct4x4_16_add_c(in, out, stride, 12);
|
vpx_highbd_idct4x4_16_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
||||||
vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10);
|
vp10_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
||||||
vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12);
|
vp10_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
|
void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_iwht4x4_16_add_c(in, out, stride, 10);
|
vpx_highbd_iwht4x4_16_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
|
void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_iwht4x4_16_add_c(in, out, stride, 12);
|
vpx_highbd_iwht4x4_16_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
void idct4x4_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct4x4_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct4x4_16_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
|
vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
class Trans4x4TestBase {
|
class Trans4x4TestBase {
|
||||||
public:
|
public:
|
||||||
@@ -102,13 +104,13 @@ class Trans4x4TestBase {
|
|||||||
int64_t total_error = 0;
|
int64_t total_error = 0;
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initialize a test block with input range [-255, 255].
|
// Initialize a test block with input range [-255, 255].
|
||||||
@@ -117,7 +119,7 @@ class Trans4x4TestBase {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
test_input_block[j] = src[j] - dst[j];
|
test_input_block[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -130,7 +132,7 @@ class Trans4x4TestBase {
|
|||||||
test_temp_block, pitch_));
|
test_temp_block, pitch_));
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block,
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block,
|
||||||
CONVERT_TO_BYTEPTR(dst16), pitch_));
|
CONVERT_TO_BYTEPTR(dst16), pitch_));
|
||||||
@@ -138,10 +140,11 @@ class Trans4x4TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
|
ASSERT_EQ(VPX_BITS_8, bit_depth_);
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const uint32_t diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
@@ -163,9 +166,9 @@ class Trans4x4TestBase {
|
|||||||
void RunCoeffCheck() {
|
void RunCoeffCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 5000;
|
const int count_test_block = 5000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
@@ -184,15 +187,13 @@ class Trans4x4TestBase {
|
|||||||
void RunMemCheck() {
|
void RunMemCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 5000;
|
const int count_test_block = 5000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
|
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
// Initialize a test block with input range [-mask_, mask_].
|
// Initialize a test block with input range [-mask_, mask_].
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
|
||||||
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
|
||||||
}
|
}
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@@ -219,13 +220,13 @@ class Trans4x4TestBase {
|
|||||||
void RunInvAccuracyCheck(int limit) {
|
void RunInvAccuracyCheck(int limit) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -235,7 +236,7 @@ class Trans4x4TestBase {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
in[j] = src[j] - dst[j];
|
in[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -248,7 +249,7 @@ class Trans4x4TestBase {
|
|||||||
|
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
||||||
pitch_));
|
pitch_));
|
||||||
@@ -256,7 +257,7 @@ class Trans4x4TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -414,126 +415,141 @@ TEST_P(Trans4x4WHT, InvAccuracyCheck) {
|
|||||||
}
|
}
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4DCT,
|
C, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
|
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4DCT,
|
C, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4HT,
|
C, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4HT,
|
C, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4WHT,
|
C, Trans4x4WHT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans4x4WHT,
|
C, Trans4x4WHT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Trans4x4DCT,
|
NEON, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct4x4_c,
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
&vp9_idct4x4_16_add_neon, 0, VPX_BITS_8)));
|
&vpx_idct4x4_16_add_neon, 0, VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Trans4x4HT,
|
NEON, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon, 3, VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VP9_HIGHBITDEPTH && \
|
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VPX_HIGHBITDEPTH && \
|
||||||
!CONFIG_EMULATE_HARDWARE
|
!CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MMX, Trans4x4WHT,
|
MMX, Trans4x4WHT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fwht4x4_mmx, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vp10_fwht4x4_mmx, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && \
|
||||||
|
!CONFIG_EMULATE_HARDWARE
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, Trans4x4WHT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans4x4DCT,
|
SSE2, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct4x4_sse2,
|
make_tuple(&vpx_fdct4x4_sse2,
|
||||||
&vp9_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
|
&vpx_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans4x4HT,
|
SSE2, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht4x4_sse2,
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
&vp10_iht4x4_16_add_sse2, 3, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans4x4DCT,
|
SSE2, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fdct4x4_sse2, &vp9_idct4x4_16_add_c, 0,
|
make_tuple(&vpx_fdct4x4_sse2, &vpx_idct4x4_16_add_c, 0,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans4x4HT,
|
SSE2, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 1, VPX_BITS_10),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 2, VPX_BITS_10),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 3, VPX_BITS_10),
|
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 0, VPX_BITS_12),
|
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 1, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 2, VPX_BITS_12),
|
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 3, VPX_BITS_12),
|
INSTANTIATE_TEST_CASE_P(
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
|
MSA, Trans4x4DCT,
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
|
make_tuple(&vpx_fdct4x4_msa, &vpx_idct4x4_16_add_msa, 0, VPX_BITS_8)));
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
|
INSTANTIATE_TEST_CASE_P(
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
MSA, Trans4x4HT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 0, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 1, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 2, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 3, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -13,18 +13,40 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.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/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vp9_rtcd.h"
|
#include "vp10/common/scan.h"
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_ports/mem.h"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
const int kNumCoeffs = 64;
|
const int kNumCoeffs = 64;
|
||||||
const double kPi = 3.141592653589793238462643383279502884;
|
const double kPi = 3.141592653589793238462643383279502884;
|
||||||
|
|
||||||
|
const int kSignBiasMaxDiff255 = 1500;
|
||||||
|
const int kSignBiasMaxDiff15 = 10000;
|
||||||
|
|
||||||
|
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
|
||||||
|
typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
|
||||||
|
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
|
||||||
|
int tx_type);
|
||||||
|
typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
|
||||||
|
int tx_type);
|
||||||
|
|
||||||
|
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<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], int stride) {
|
||||||
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
for (int k = 0; k < 8; k++) {
|
for (int k = 0; k < 8; k++) {
|
||||||
@@ -59,75 +81,58 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const int kSignBiasMaxDiff255 = 1500;
|
|
||||||
const int kSignBiasMaxDiff15 = 10000;
|
|
||||||
|
|
||||||
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
|
|
||||||
typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
|
|
||||||
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
|
|
||||||
int tx_type);
|
|
||||||
typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
|
|
||||||
int tx_type);
|
|
||||||
|
|
||||||
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<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param;
|
|
||||||
|
|
||||||
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) {
|
||||||
vp9_fdct8x8_c(in, out, stride);
|
vpx_fdct8x8_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
||||||
vp9_fht8x8_c(in, out, stride, tx_type);
|
vp10_fht8x8_c(in, out, stride, tx_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_64_add_c(in, out, stride, 10);
|
vpx_highbd_idct8x8_64_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_64_add_c(in, out, stride, 12);
|
vpx_highbd_idct8x8_64_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
||||||
vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10);
|
vp10_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
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);
|
vp10_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
vp9_highbd_idct8x8_10_add_c(in, out, stride, 10);
|
vpx_highbd_idct8x8_10_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#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) {
|
||||||
vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 12);
|
vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
|
vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
class FwdTrans8x8TestBase {
|
class FwdTrans8x8TestBase {
|
||||||
public:
|
public:
|
||||||
@@ -139,8 +144,8 @@ class FwdTrans8x8TestBase {
|
|||||||
|
|
||||||
void RunSignBiasCheck() {
|
void RunSignBiasCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_output_block, 64);
|
DECLARE_ALIGNED(16, tran_low_t, test_output_block[64]);
|
||||||
int count_sign_block[64][2];
|
int count_sign_block[64][2];
|
||||||
const int count_test_block = 100000;
|
const int count_test_block = 100000;
|
||||||
|
|
||||||
@@ -210,13 +215,13 @@ class FwdTrans8x8TestBase {
|
|||||||
int max_error = 0;
|
int max_error = 0;
|
||||||
int total_error = 0;
|
int total_error = 0;
|
||||||
const int count_test_block = 100000;
|
const int count_test_block = 100000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, 64);
|
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64);
|
DECLARE_ALIGNED(16, uint8_t, dst[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64);
|
DECLARE_ALIGNED(16, uint8_t, src[64]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, 64);
|
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, 64);
|
DECLARE_ALIGNED(16, uint16_t, src16[64]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -226,7 +231,7 @@ class FwdTrans8x8TestBase {
|
|||||||
src[j] = rnd.Rand8();
|
src[j] = rnd.Rand8();
|
||||||
dst[j] = rnd.Rand8();
|
dst[j] = rnd.Rand8();
|
||||||
test_input_block[j] = src[j] - dst[j];
|
test_input_block[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand16() & mask_;
|
src16[j] = rnd.Rand16() & mask_;
|
||||||
dst16[j] = rnd.Rand16() & mask_;
|
dst16[j] = rnd.Rand16() & mask_;
|
||||||
@@ -251,7 +256,7 @@ class FwdTrans8x8TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, dst, pitch_));
|
RunInvTxfm(test_temp_block, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
||||||
@@ -259,7 +264,7 @@ class FwdTrans8x8TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < 64; ++j) {
|
for (int j = 0; j < 64; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -287,14 +292,14 @@ class FwdTrans8x8TestBase {
|
|||||||
int total_error = 0;
|
int total_error = 0;
|
||||||
int total_coeff_error = 0;
|
int total_coeff_error = 0;
|
||||||
const int count_test_block = 100000;
|
const int count_test_block = 100000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 64);
|
DECLARE_ALIGNED(16, int16_t, test_input_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, 64);
|
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_temp_block, 64);
|
DECLARE_ALIGNED(16, tran_low_t, ref_temp_block[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 64);
|
DECLARE_ALIGNED(16, uint8_t, dst[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 64);
|
DECLARE_ALIGNED(16, uint8_t, src[64]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, 64);
|
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, 64);
|
DECLARE_ALIGNED(16, uint16_t, src16[64]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -312,7 +317,7 @@ class FwdTrans8x8TestBase {
|
|||||||
dst[j] = rnd.Rand8() % 2 ? 255 : 0;
|
dst[j] = rnd.Rand8() % 2 ? 255 : 0;
|
||||||
}
|
}
|
||||||
test_input_block[j] = src[j] - dst[j];
|
test_input_block[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
src16[j] = mask_;
|
src16[j] = mask_;
|
||||||
@@ -336,7 +341,7 @@ class FwdTrans8x8TestBase {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, dst, pitch_));
|
RunInvTxfm(test_temp_block, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
|
||||||
@@ -344,7 +349,7 @@ class FwdTrans8x8TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < 64; ++j) {
|
for (int j = 0; j < 64; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -376,13 +381,13 @@ class FwdTrans8x8TestBase {
|
|||||||
void RunInvAccuracyCheck() {
|
void RunInvAccuracyCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -394,7 +399,7 @@ class FwdTrans8x8TestBase {
|
|||||||
src[j] = rnd.Rand8() % 2 ? 255 : 0;
|
src[j] = rnd.Rand8() % 2 ? 255 : 0;
|
||||||
dst[j] = src[j] > 0 ? 0 : 255;
|
dst[j] = src[j] > 0 ? 0 : 255;
|
||||||
in[j] = src[j] - dst[j];
|
in[j] = src[j] - dst[j];
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
src16[j] = rnd.Rand8() % 2 ? mask_ : 0;
|
src16[j] = rnd.Rand8() % 2 ? mask_ : 0;
|
||||||
dst16[j] = src16[j] > 0 ? 0 : mask_;
|
dst16[j] = src16[j] > 0 ? 0 : mask_;
|
||||||
@@ -409,7 +414,7 @@ class FwdTrans8x8TestBase {
|
|||||||
|
|
||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
||||||
pitch_));
|
pitch_));
|
||||||
@@ -417,7 +422,7 @@ class FwdTrans8x8TestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
@@ -434,9 +439,9 @@ class FwdTrans8x8TestBase {
|
|||||||
void RunFwdAccuracyCheck() {
|
void RunFwdAccuracyCheck() {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_r, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff_r[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
double out_r[kNumCoeffs];
|
double out_r[kNumCoeffs];
|
||||||
@@ -464,14 +469,14 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
|
|||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
const int eob = 12;
|
const int eob = 12;
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, ref, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref16, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
|
||||||
#endif
|
#endif
|
||||||
const int16_t *scan = vp9_default_scan_orders[TX_8X8].scan;
|
const int16_t *scan = vp10_default_scan_orders[TX_8X8].scan;
|
||||||
|
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
@@ -484,7 +489,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
dst[j] = 0;
|
dst[j] = 0;
|
||||||
ref[j] = 0;
|
ref[j] = 0;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
dst16[j] = 0;
|
dst16[j] = 0;
|
||||||
ref16[j] = 0;
|
ref16[j] = 0;
|
||||||
@@ -494,7 +499,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
|
|||||||
if (bit_depth_ == VPX_BITS_8) {
|
if (bit_depth_ == VPX_BITS_8) {
|
||||||
ref_txfm(coeff, ref, pitch_);
|
ref_txfm(coeff, ref, pitch_);
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
} else {
|
} else {
|
||||||
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
|
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
|
||||||
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
|
||||||
@@ -503,7 +508,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const uint32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
||||||
#else
|
#else
|
||||||
@@ -649,108 +654,101 @@ TEST_P(InvTrans8x8DCT, CompareReference) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, FwdTrans8x8DCT,
|
C, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
|
make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
|
make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
|
make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, FwdTrans8x8DCT,
|
C, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, FwdTrans8x8HT,
|
C, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12),
|
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
||||||
#else
|
#else
|
||||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
|
|
||||||
// returned from Rand16().
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, FwdTrans8x8HT,
|
C, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
|
|
||||||
// returned from Rand16().
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, FwdTrans8x8DCT,
|
NEON, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_neon, &vp9_idct8x8_64_add_neon, 0,
|
make_tuple(&vpx_fdct8x8_neon, &vpx_idct8x8_64_add_neon, 0,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, FwdTrans8x8HT,
|
NEON, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 3, VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
// TODO(jingning): re-enable after these handle the expanded range [0, 65535]
|
|
||||||
// returned from Rand16().
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, FwdTrans8x8DCT,
|
SSE2, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0,
|
make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_sse2, 0,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, FwdTrans8x8HT,
|
SSE2, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht8x8_sse2,
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
&vp10_iht8x8_64_add_sse2, 3, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, FwdTrans8x8DCT,
|
SSE2, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
|
make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_c,
|
make_tuple(&vpx_highbd_fdct8x8_c,
|
||||||
&idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
|
&idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_sse2,
|
make_tuple(&vpx_highbd_fdct8x8_sse2,
|
||||||
&idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
|
&idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_c,
|
make_tuple(&vpx_highbd_fdct8x8_c,
|
||||||
&idct8x8_64_add_12_sse2, 12, VPX_BITS_12),
|
&idct8x8_64_add_12_sse2, 12, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_fdct8x8_sse2,
|
make_tuple(&vpx_highbd_fdct8x8_sse2,
|
||||||
&idct8x8_64_add_12_sse2, 12, VPX_BITS_12)));
|
&idct8x8_64_add_12_sse2, 12, VPX_BITS_12)));
|
||||||
|
|
||||||
// TODO(jingning): re-enable after these handle the expanded range [0, 65535]
|
|
||||||
// returned from Rand16().
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, FwdTrans8x8HT,
|
SSE2, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
||||||
|
|
||||||
// Optimizations take effect at a threshold of 6201, so we use a value close to
|
// Optimizations take effect at a threshold of 6201, so we use a value close to
|
||||||
// that to test both branches.
|
// that to test both branches.
|
||||||
@@ -765,16 +763,28 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&idct8x8_10_add_12_sse2, 6225, VPX_BITS_12),
|
&idct8x8_10_add_12_sse2, 6225, VPX_BITS_12),
|
||||||
make_tuple(&idct8x8_12,
|
make_tuple(&idct8x8_12,
|
||||||
&idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
|
&idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
|
||||||
!CONFIG_EMULATE_HARDWARE
|
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
|
|
||||||
// returned from Rand16().
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3, FwdTrans8x8DCT,
|
SSSE3, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0,
|
make_tuple(&vpx_fdct8x8_ssse3, &vpx_idct8x8_64_add_ssse3, 0,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, FwdTrans8x8DCT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_fdct8x8_msa, &vpx_idct8x8_64_add_msa, 0, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, FwdTrans8x8HT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 0, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 1, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 2, VPX_BITS_8),
|
||||||
|
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 3, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class VP9FrameSizeTestsLarge
|
|||||||
: public ::libvpx_test::EncoderTest,
|
: public ::libvpx_test::EncoderTest,
|
||||||
public ::testing::Test {
|
public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
VP9FrameSizeTestsLarge() : EncoderTest(&::libvpx_test::kVP9),
|
VP9FrameSizeTestsLarge() : EncoderTest(&::libvpx_test::kVP10),
|
||||||
expected_res_(VPX_CODEC_OK) {}
|
expected_res_(VPX_CODEC_OK) {}
|
||||||
virtual ~VP9FrameSizeTestsLarge() {}
|
virtual ~VP9FrameSizeTestsLarge() {}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ TEST_F(VP9FrameSizeTestsLarge, ValidSizes) {
|
|||||||
// size or almost 1 gig of memory.
|
// size or almost 1 gig of memory.
|
||||||
// In total the allocations will exceed 2GiB which may cause a failure with
|
// In total the allocations will exceed 2GiB which may cause a failure with
|
||||||
// mingw + wine, use a smaller size in that case.
|
// mingw + wine, use a smaller size in that case.
|
||||||
#if defined(_WIN32) && !defined(_WIN64)
|
#if defined(_WIN32) && !defined(_WIN64) || defined(__OS2__)
|
||||||
video.SetSize(4096, 3072);
|
video.SetSize(4096, 3072);
|
||||||
#else
|
#else
|
||||||
video.SetSize(4096, 4096);
|
video.SetSize(4096, 4096);
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vp9_rtcd.h"
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
@@ -68,43 +67,6 @@ void reference_dct_2d(int16_t input[64], double output[64]) {
|
|||||||
output[i] *= 2;
|
output[i] *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reference_idct_1d(double input[8], double output[8]) {
|
|
||||||
const double kPi = 3.141592653589793238462643383279502884;
|
|
||||||
const double kSqrt2 = 1.414213562373095048801688724209698;
|
|
||||||
for (int k = 0; k < 8; k++) {
|
|
||||||
output[k] = 0.0;
|
|
||||||
for (int n = 0; n < 8; n++) {
|
|
||||||
output[k] += input[n]*cos(kPi*(2*k+1)*n/16.0);
|
|
||||||
if (n == 0)
|
|
||||||
output[k] = output[k]/kSqrt2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reference_idct_2d(double input[64], int16_t output[64]) {
|
|
||||||
double out[64], out2[64];
|
|
||||||
// First transform rows
|
|
||||||
for (int i = 0; i < 8; ++i) {
|
|
||||||
double temp_in[8], temp_out[8];
|
|
||||||
for (int j = 0; j < 8; ++j)
|
|
||||||
temp_in[j] = input[j + i*8];
|
|
||||||
reference_idct_1d(temp_in, temp_out);
|
|
||||||
for (int j = 0; j < 8; ++j)
|
|
||||||
out[j + i*8] = temp_out[j];
|
|
||||||
}
|
|
||||||
// Then transform columns
|
|
||||||
for (int i = 0; i < 8; ++i) {
|
|
||||||
double temp_in[8], temp_out[8];
|
|
||||||
for (int j = 0; j < 8; ++j)
|
|
||||||
temp_in[j] = out[j*8 + i];
|
|
||||||
reference_idct_1d(temp_in, temp_out);
|
|
||||||
for (int j = 0; j < 8; ++j)
|
|
||||||
out2[j*8 + i] = temp_out[j];
|
|
||||||
}
|
|
||||||
for (int i = 0; i < 64; ++i)
|
|
||||||
output[i] = round(out2[i]/32);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(VP9Idct8x8Test, AccuracyCheck) {
|
TEST(VP9Idct8x8Test, AccuracyCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = 10000;
|
const int count_test_block = 10000;
|
||||||
@@ -125,7 +87,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
|
|||||||
reference_dct_2d(input, output_r);
|
reference_dct_2d(input, output_r);
|
||||||
for (int j = 0; j < 64; ++j)
|
for (int j = 0; j < 64; ++j)
|
||||||
coeff[j] = round(output_r[j]);
|
coeff[j] = round(output_r[j]);
|
||||||
vp9_idct8x8_64_add_c(coeff, dst, 8);
|
vpx_idct8x8_64_add_c(coeff, dst, 8);
|
||||||
for (int j = 0; j < 64; ++j) {
|
for (int j = 0; j < 64; ++j) {
|
||||||
const int diff = dst[j] - src[j];
|
const int diff = dst[j] - src[j];
|
||||||
const int error = diff * diff;
|
const int error = diff * diff;
|
||||||
|
|||||||
@@ -10,10 +10,11 @@
|
|||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "./vp8_rtcd.h"
|
#include "./vp8_rtcd.h"
|
||||||
#include "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
typedef void (*IdctFunc)(int16_t *input, unsigned char *pred_ptr,
|
typedef void (*IdctFunc)(int16_t *input, unsigned char *pred_ptr,
|
||||||
@@ -113,4 +114,8 @@ INSTANTIATE_TEST_CASE_P(C, IDCTTest, ::testing::Values(vp8_short_idct4x4llm_c));
|
|||||||
INSTANTIATE_TEST_CASE_P(MMX, IDCTTest,
|
INSTANTIATE_TEST_CASE_P(MMX, IDCTTest,
|
||||||
::testing::Values(vp8_short_idct4x4llm_mmx));
|
::testing::Values(vp8_short_idct4x4llm_mmx));
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, IDCTTest,
|
||||||
|
::testing::Values(vp8_short_idct4x4llm_msa));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* 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
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@@ -8,389 +8,224 @@
|
|||||||
* 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 <string>
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include "test/acm_random.h"
|
|
||||||
#include "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#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"
|
||||||
#include "./vp8_rtcd.h"
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "vp8/common/blockd.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/pred_common.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
class IntraPredBase {
|
const int count_test_block = 100000;
|
||||||
|
|
||||||
|
// Base class for VP9 intra prediction tests.
|
||||||
|
class VP9IntraPredBase {
|
||||||
public:
|
public:
|
||||||
virtual ~IntraPredBase() { libvpx_test::ClearSystemState(); }
|
virtual ~VP9IntraPredBase() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetupMacroblock(MACROBLOCKD *mbptr,
|
virtual void Predict(PREDICTION_MODE mode) = 0;
|
||||||
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() {
|
void CheckPrediction(int test_case_number, int *error_count) const {
|
||||||
// Fill edges with random data
|
// For each pixel ensure that the calculated value is the same as reference.
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
for (int y = 0; y < block_size_; y++) {
|
||||||
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++) {
|
for (int x = 0; x < block_size_; x++) {
|
||||||
const int expected = ClipByte(data_ptr_[p][x - stride_]
|
*error_count += ref_dst_[x + y * stride_] != dst_[x + y * stride_];
|
||||||
+ data_ptr_[p][stride_ * y - 1]
|
if (*error_count == 1) {
|
||||||
- data_ptr_[p][-1 - stride_]);
|
ASSERT_EQ(ref_dst_[x + y * stride_], dst_[x + y * stride_])
|
||||||
ASSERT_EQ(expected, data_ptr_[p][y * stride_ + x]);
|
<< " Failed on Test Case Number "<< test_case_number;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actual test
|
void RunTest(uint16_t* left_col, uint16_t* above_data,
|
||||||
void RunTest() {
|
uint16_t* dst, uint16_t* ref_dst) {
|
||||||
{
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
SCOPED_TRACE("DC_PRED");
|
left_col_ = left_col;
|
||||||
FillRandom();
|
dst_ = dst;
|
||||||
|
ref_dst_ = ref_dst;
|
||||||
|
above_row_ = above_data + 16;
|
||||||
|
int error_count = 0;
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// Fill edges with random data, try first with saturated values.
|
||||||
|
for (int x = -1; x <= block_size_*2; x++) {
|
||||||
|
if (i == 0) {
|
||||||
|
above_row_[x] = mask_;
|
||||||
|
} else {
|
||||||
|
above_row_[x] = rnd.Rand16() & mask_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int y = 0; y < block_size_; y++) {
|
||||||
|
if (i == 0) {
|
||||||
|
left_col_[y] = mask_;
|
||||||
|
} else {
|
||||||
|
left_col_[y] = rnd.Rand16() & mask_;
|
||||||
|
}
|
||||||
|
}
|
||||||
Predict(DC_PRED);
|
Predict(DC_PRED);
|
||||||
CheckDCPrediction();
|
CheckPrediction(i, &error_count);
|
||||||
}
|
|
||||||
{
|
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
ASSERT_EQ(0, error_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 block_size_;
|
||||||
int num_planes_;
|
uint16_t *above_row_;
|
||||||
|
uint16_t *left_col_;
|
||||||
|
uint16_t *dst_;
|
||||||
|
uint16_t *ref_dst_;
|
||||||
|
ptrdiff_t stride_;
|
||||||
|
int mask_;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*IntraPredYFunc)(MACROBLOCKD *x,
|
typedef void (*intra_pred_fn_t)(
|
||||||
uint8_t *yabove_row,
|
uint16_t *dst, ptrdiff_t stride, const uint16_t *above,
|
||||||
uint8_t *yleft,
|
const uint16_t *left, int bps);
|
||||||
int left_stride,
|
typedef std::tr1::tuple<intra_pred_fn_t,
|
||||||
uint8_t *ypred_ptr,
|
intra_pred_fn_t, int, int> intra_pred_params_t;
|
||||||
int y_stride);
|
class VP9IntraPredTest
|
||||||
|
: public VP9IntraPredBase,
|
||||||
class IntraPredYTest
|
public ::testing::TestWithParam<intra_pred_params_t> {
|
||||||
: 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() {
|
virtual void SetUp() {
|
||||||
pred_fn_ = GetParam();
|
pred_fn_ = GET_PARAM(0);
|
||||||
SetupMacroblock(mb_, mi_, data_array_, kBlockSize, kStride, 1);
|
ref_fn_ = GET_PARAM(1);
|
||||||
|
block_size_ = GET_PARAM(2);
|
||||||
|
bit_depth_ = GET_PARAM(3);
|
||||||
|
stride_ = block_size_ * 3;
|
||||||
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) {
|
virtual void Predict(PREDICTION_MODE mode) {
|
||||||
mbptr_->mode_info_context->mbmi.mode = mode;
|
const uint16_t *const_above_row = above_row_;
|
||||||
ASM_REGISTER_STATE_CHECK(pred_fn_(mbptr_,
|
const uint16_t *const_left_col = left_col_;
|
||||||
data_ptr_[0] - kStride,
|
ref_fn_(ref_dst_, stride_, const_above_row, const_left_col, bit_depth_);
|
||||||
data_ptr_[0] - 1, kStride,
|
ASM_REGISTER_STATE_CHECK(pred_fn_(dst_, stride_, const_above_row,
|
||||||
data_ptr_[0], kStride));
|
const_left_col, bit_depth_));
|
||||||
}
|
}
|
||||||
|
intra_pred_fn_t pred_fn_;
|
||||||
IntraPredYFunc pred_fn_;
|
intra_pred_fn_t ref_fn_;
|
||||||
static uint8_t* data_array_;
|
int bit_depth_;
|
||||||
static MACROBLOCKD * mb_;
|
|
||||||
static MODE_INFO *mi_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MACROBLOCKD* IntraPredYTest::mb_ = NULL;
|
TEST_P(VP9IntraPredTest, IntraPredTests) {
|
||||||
MODE_INFO* IntraPredYTest::mi_ = NULL;
|
// max block size is 32
|
||||||
uint8_t* IntraPredYTest::data_array_ = NULL;
|
DECLARE_ALIGNED(16, uint16_t, left_col[2*32]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, above_data[2*32+32]);
|
||||||
TEST_P(IntraPredYTest, IntraPredTests) {
|
DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
|
||||||
RunTest();
|
DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
|
||||||
|
RunTest(left_col, above_data, dst, ref_dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, IntraPredYTest,
|
using std::tr1::make_tuple;
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_c));
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, IntraPredYTest,
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
vp8_build_intra_predictors_mby_s_sse2));
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
#endif
|
&vpx_highbd_dc_predictor_32x32_c, 32, 8),
|
||||||
#if HAVE_SSSE3
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredYTest,
|
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
|
||||||
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
|
||||||
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
|
&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_sse2,
|
||||||
|
&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_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
||||||
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
vp8_build_intra_predictors_mby_s_ssse3));
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
#endif
|
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||||
#if HAVE_NEON
|
10),
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, IntraPredYTest,
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||||
|
10),
|
||||||
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
|
10),
|
||||||
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
|
&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_sse2,
|
||||||
|
&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_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
||||||
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
|
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
vp8_build_intra_predictors_mby_s_neon));
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
#endif
|
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||||
|
12),
|
||||||
typedef void (*IntraPredUvFunc)(MACROBLOCKD *x,
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
uint8_t *uabove_row,
|
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||||
uint8_t *vabove_row,
|
12),
|
||||||
uint8_t *uleft,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
uint8_t *vleft,
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
int left_stride,
|
12),
|
||||||
uint8_t *upred_ptr,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
uint8_t *vpred_ptr,
|
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
||||||
int pred_stride);
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
|
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
||||||
class IntraPredUVTest
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
: public IntraPredBase,
|
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||||
public ::testing::TestWithParam<IntraPredUvFunc> {
|
12),
|
||||||
public:
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
static void SetUpTestCase() {
|
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
||||||
mb_ = reinterpret_cast<MACROBLOCKD*>(
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
vpx_memalign(32, sizeof(MACROBLOCKD)));
|
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
||||||
mi_ = reinterpret_cast<MODE_INFO*>(
|
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||||
vpx_memalign(32, sizeof(MODE_INFO)));
|
&vpx_highbd_v_predictor_16x16_c, 16,
|
||||||
data_array_ = reinterpret_cast<uint8_t*>(
|
12),
|
||||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
}
|
&vpx_highbd_v_predictor_32x32_c, 32,
|
||||||
|
12),
|
||||||
static void TearDownTestCase() {
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
vpx_free(data_array_);
|
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
||||||
vpx_free(mi_);
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
vpx_free(mb_);
|
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
||||||
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
|
|
||||||
|
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
#endif // HAVE_SSE2
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,167 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2014 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 <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/decode_test_driver.h"
|
|
||||||
#include "test/ivf_video_source.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
#include "test/webm_video_source.h"
|
|
||||||
#endif
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
struct DecodeParam {
|
|
||||||
int threads;
|
|
||||||
const char *filename;
|
|
||||||
};
|
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &os, const DecodeParam &dp) {
|
|
||||||
return os << "threads: " << dp.threads << " file: " << dp.filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
class InvalidFileTest
|
|
||||||
: public ::libvpx_test::DecoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<DecodeParam> {
|
|
||||||
protected:
|
|
||||||
InvalidFileTest() : DecoderTest(GET_PARAM(0)), res_file_(NULL) {}
|
|
||||||
|
|
||||||
virtual ~InvalidFileTest() {
|
|
||||||
if (res_file_ != NULL)
|
|
||||||
fclose(res_file_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenResFile(const std::string &res_file_name_) {
|
|
||||||
res_file_ = libvpx_test::OpenTestDataFile(res_file_name_);
|
|
||||||
ASSERT_TRUE(res_file_ != NULL) << "Result file open failed. Filename: "
|
|
||||||
<< res_file_name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool HandleDecodeResult(
|
|
||||||
const vpx_codec_err_t res_dec,
|
|
||||||
const libvpx_test::CompressedVideoSource &video,
|
|
||||||
libvpx_test::Decoder *decoder) {
|
|
||||||
EXPECT_TRUE(res_file_ != NULL);
|
|
||||||
int expected_res_dec;
|
|
||||||
|
|
||||||
// Read integer result.
|
|
||||||
const int res = fscanf(res_file_, "%d", &expected_res_dec);
|
|
||||||
EXPECT_NE(res, EOF) << "Read result data failed";
|
|
||||||
|
|
||||||
// Check results match.
|
|
||||||
EXPECT_EQ(expected_res_dec, res_dec)
|
|
||||||
<< "Results don't match: frame number = " << video.frame_number()
|
|
||||||
<< ". (" << decoder->DecodeError() << ")";
|
|
||||||
|
|
||||||
return !HasFailure();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RunTest() {
|
|
||||||
const DecodeParam input = GET_PARAM(1);
|
|
||||||
libvpx_test::CompressedVideoSource *video = NULL;
|
|
||||||
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
|
||||||
cfg.threads = input.threads;
|
|
||||||
const std::string filename = input.filename;
|
|
||||||
|
|
||||||
// Open compressed video file.
|
|
||||||
if (filename.substr(filename.length() - 3, 3) == "ivf") {
|
|
||||||
video = new libvpx_test::IVFVideoSource(filename);
|
|
||||||
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
video = new libvpx_test::WebMVideoSource(filename);
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "WebM IO is disabled, skipping test vector %s\n",
|
|
||||||
filename.c_str());
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
video->Init();
|
|
||||||
|
|
||||||
// Construct result file name. The file holds a list of expected integer
|
|
||||||
// results, one for each decoded frame. Any result that doesn't match
|
|
||||||
// the files list will cause a test failure.
|
|
||||||
const std::string res_filename = filename + ".res";
|
|
||||||
OpenResFile(res_filename);
|
|
||||||
|
|
||||||
// Decode frame, and check the md5 matching.
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video, cfg));
|
|
||||||
delete video;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
FILE *res_file_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_P(InvalidFileTest, ReturnCode) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
const DecodeParam kVP9InvalidFileTests[] = {
|
|
||||||
{1, "invalid-vp90-02-v2.webm"},
|
|
||||||
{1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"},
|
|
||||||
{1, "invalid-vp90-03-v3.webm"},
|
|
||||||
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"},
|
|
||||||
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
|
|
||||||
{1, "invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf"},
|
|
||||||
{1, "invalid-vp90-2-05-resize.ivf.s59293_r01-05_b6-.ivf"},
|
|
||||||
{1, "invalid-vp90-2-09-subpixel-00.ivf.s20492_r01-05_b6-.v2.ivf"},
|
|
||||||
{1, "invalid-vp91-2-mixedrefcsp-444to420.ivf"},
|
|
||||||
{1, "invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf"},
|
|
||||||
{1, "invalid-vp90-2-03-size-224x196.webm.ivf.s44156_r01-05_b6-.ivf"},
|
|
||||||
{1, "invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf"},
|
|
||||||
};
|
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileTest,
|
|
||||||
::testing::ValuesIn(kVP9InvalidFileTests));
|
|
||||||
|
|
||||||
// This class will include test vectors that are expected to fail
|
|
||||||
// peek. However they are still expected to have no fatal failures.
|
|
||||||
class InvalidFileInvalidPeekTest : public InvalidFileTest {
|
|
||||||
protected:
|
|
||||||
InvalidFileInvalidPeekTest() : InvalidFileTest() {}
|
|
||||||
virtual void HandlePeekResult(libvpx_test::Decoder *const /*decoder*/,
|
|
||||||
libvpx_test::CompressedVideoSource* /*video*/,
|
|
||||||
const vpx_codec_err_t /*res_peek*/) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_P(InvalidFileInvalidPeekTest, ReturnCode) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
|
||||||
{1, "invalid-vp90-01-v2.webm"},
|
|
||||||
};
|
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
|
||||||
::testing::ValuesIn(kVP9InvalidFileInvalidPeekTests));
|
|
||||||
|
|
||||||
const DecodeParam kMultiThreadedVP9InvalidFileTests[] = {
|
|
||||||
{4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"},
|
|
||||||
{4, "invalid-"
|
|
||||||
"vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf"},
|
|
||||||
{4, "invalid-vp90-2-08-tile_1x8_frame_parallel.webm.ivf.s288_r01-05_b6-.ivf"},
|
|
||||||
{2, "invalid-vp90-2-09-aq2.webm.ivf.s3984_r01-05_b6-.v2.ivf"},
|
|
||||||
{4, "invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf"},
|
|
||||||
};
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
|
||||||
VP9MultiThreaded, InvalidFileTest,
|
|
||||||
::testing::Combine(
|
|
||||||
::testing::Values(
|
|
||||||
static_cast<const libvpx_test::CodecFactory*>(&libvpx_test::kVP9)),
|
|
||||||
::testing::ValuesIn(kMultiThreadedVP9InvalidFileTests)));
|
|
||||||
} // namespace
|
|
||||||
@@ -1,145 +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 <climits>
|
|
||||||
#include <vector>
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "test/codec_factory.h"
|
|
||||||
#include "test/encode_test_driver.h"
|
|
||||||
#include "test/i420_video_source.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
class KeyframeTest : public ::libvpx_test::EncoderTest,
|
|
||||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
|
||||||
protected:
|
|
||||||
KeyframeTest() : EncoderTest(GET_PARAM(0)) {}
|
|
||||||
virtual ~KeyframeTest() {}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
InitializeConfig();
|
|
||||||
SetMode(GET_PARAM(1));
|
|
||||||
kf_count_ = 0;
|
|
||||||
kf_count_max_ = INT_MAX;
|
|
||||||
kf_do_force_kf_ = false;
|
|
||||||
set_cpu_used_ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
|
||||||
::libvpx_test::Encoder *encoder) {
|
|
||||||
if (kf_do_force_kf_)
|
|
||||||
frame_flags_ = (video->frame() % 3) ? 0 : VPX_EFLAG_FORCE_KF;
|
|
||||||
if (set_cpu_used_ && video->frame() == 1)
|
|
||||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
|
||||||
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
|
|
||||||
kf_pts_list_.push_back(pkt->data.frame.pts);
|
|
||||||
kf_count_++;
|
|
||||||
abort_ |= kf_count_ > kf_count_max_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool kf_do_force_kf_;
|
|
||||||
int kf_count_;
|
|
||||||
int kf_count_max_;
|
|
||||||
std::vector<vpx_codec_pts_t> kf_pts_list_;
|
|
||||||
int set_cpu_used_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_P(KeyframeTest, TestRandomVideoSource) {
|
|
||||||
// Validate that encoding the RandomVideoSource produces multiple keyframes.
|
|
||||||
// This validates the results of the TestDisableKeyframes test.
|
|
||||||
kf_count_max_ = 2; // early exit successful tests.
|
|
||||||
|
|
||||||
::libvpx_test::RandomVideoSource video;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
// In realtime mode - auto placed keyframes are exceedingly rare, don't
|
|
||||||
// bother with this check if(GetParam() > 0)
|
|
||||||
if (GET_PARAM(1) > 0)
|
|
||||||
EXPECT_GT(kf_count_, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(KeyframeTest, TestDisableKeyframes) {
|
|
||||||
cfg_.kf_mode = VPX_KF_DISABLED;
|
|
||||||
kf_count_max_ = 1; // early exit failed tests.
|
|
||||||
|
|
||||||
::libvpx_test::RandomVideoSource video;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
EXPECT_EQ(1, kf_count_);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(KeyframeTest, TestForceKeyframe) {
|
|
||||||
cfg_.kf_mode = VPX_KF_DISABLED;
|
|
||||||
kf_do_force_kf_ = true;
|
|
||||||
|
|
||||||
::libvpx_test::DummyVideoSource video;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
// verify that every third frame is a keyframe.
|
|
||||||
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
|
|
||||||
iter != kf_pts_list_.end(); ++iter) {
|
|
||||||
ASSERT_EQ(0, *iter % 3) << "Unexpected keyframe at frame " << *iter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(KeyframeTest, TestKeyframeMaxDistance) {
|
|
||||||
cfg_.kf_max_dist = 25;
|
|
||||||
|
|
||||||
::libvpx_test::DummyVideoSource video;
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
// verify that keyframe interval matches kf_max_dist
|
|
||||||
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
|
|
||||||
iter != kf_pts_list_.end(); ++iter) {
|
|
||||||
ASSERT_EQ(0, *iter % 25) << "Unexpected keyframe at frame " << *iter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(KeyframeTest, TestAutoKeyframe) {
|
|
||||||
cfg_.kf_mode = VPX_KF_AUTO;
|
|
||||||
kf_do_force_kf_ = false;
|
|
||||||
|
|
||||||
// Force a deterministic speed step in Real Time mode, as the faster modes
|
|
||||||
// may not produce a keyframe like we expect. This is necessary when running
|
|
||||||
// on very slow environments (like Valgrind). The step -11 was determined
|
|
||||||
// experimentally as the fastest mode that still throws the keyframe.
|
|
||||||
if (deadline_ == VPX_DL_REALTIME)
|
|
||||||
set_cpu_used_ = -11;
|
|
||||||
|
|
||||||
// This clip has a cut scene every 30 frames -> Frame 0, 30, 60, 90, 120.
|
|
||||||
// I check only the first 40 frames to make sure there's a keyframe at frame
|
|
||||||
// 0 and 30.
|
|
||||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
|
||||||
30, 1, 0, 40);
|
|
||||||
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
|
||||||
|
|
||||||
// In realtime mode - auto placed keyframes are exceedingly rare, don't
|
|
||||||
// bother with this check
|
|
||||||
if (GET_PARAM(1) > 0)
|
|
||||||
EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes ";
|
|
||||||
|
|
||||||
// Verify that keyframes match the file keyframes in the file.
|
|
||||||
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
|
|
||||||
iter != kf_pts_list_.end(); ++iter) {
|
|
||||||
if (deadline_ == VPX_DL_REALTIME && *iter > 0)
|
|
||||||
EXPECT_EQ(0, (*iter - 1) % 30) << "Unexpected keyframe at frame "
|
|
||||||
<< *iter;
|
|
||||||
else
|
|
||||||
EXPECT_EQ(0, *iter % 30) << "Unexpected keyframe at frame " << *iter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(KeyframeTest, ALL_TEST_MODES);
|
|
||||||
} // namespace
|
|
||||||
@@ -7,8 +7,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.
|
||||||
*/
|
*/
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
#include "test/codec_factory.h"
|
#include "test/codec_factory.h"
|
||||||
#include "test/encode_test_driver.h"
|
#include "test/encode_test_driver.h"
|
||||||
#include "test/i420_video_source.h"
|
#include "test/i420_video_source.h"
|
||||||
@@ -121,8 +123,7 @@ TEST_P(LosslessTest, TestLossLessEncodingCtrl) {
|
|||||||
EXPECT_GE(psnr_lossless, kMaxPsnr);
|
EXPECT_GE(psnr_lossless, kMaxPsnr);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(LosslessTest,
|
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime,
|
::testing::Values(::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kOnePassGood,
|
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -13,15 +13,15 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vpx_config.h"
|
#include "vp10/common/loopfilter.h"
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
|
||||||
#include "vp9/common/vp9_loopfilter.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
@@ -34,7 +34,7 @@ const int kNumCoeffs = 1024;
|
|||||||
|
|
||||||
const int number_of_iterations = 10000;
|
const int number_of_iterations = 10000;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_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 count, int bd);
|
||||||
@@ -50,93 +50,107 @@ 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_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
typedef std::tr1::tuple<loop_op_t, loop_op_t, int> loop8_param_t;
|
typedef std::tr1::tuple<loop_op_t, loop_op_t, int, 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 HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_sse2(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 count, int bd) {
|
||||||
vp9_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, 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,
|
void wrapper_vertical_16_c(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 count, int bd) {
|
||||||
vp9_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, 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,
|
void wrapper_vertical_16_dual_sse2(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 count, int bd) {
|
||||||
vp9_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, 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,
|
void wrapper_vertical_16_dual_c(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 count, int bd) {
|
||||||
vp9_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
|
vpx_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_sse2(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
|
vpx_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_c(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_c(s, p, blimit, limit, thresh);
|
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,
|
void wrapper_vertical_16_dual_sse2(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh);
|
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,
|
void wrapper_vertical_16_dual_c(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
#if HAVE_NEON_ASM
|
#if HAVE_NEON_ASM
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
// No neon high bitdepth functions.
|
// No neon high bitdepth functions.
|
||||||
#else
|
#else
|
||||||
void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_neon(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
|
vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_c(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_c(s, p, blimit, limit, thresh);
|
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,
|
void wrapper_vertical_16_dual_neon(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
|
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,
|
void wrapper_vertical_16_dual_c(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) {
|
int count) {
|
||||||
vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
|
|
||||||
|
#if HAVE_MSA && (!CONFIG_VPX_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_VPX_HIGHBITDEPTH)
|
||||||
|
|
||||||
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
||||||
public:
|
public:
|
||||||
virtual ~Loop8Test6Param() {}
|
virtual ~Loop8Test6Param() {}
|
||||||
@@ -144,6 +158,7 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,6 +166,7 @@ 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_;
|
||||||
@@ -178,14 +194,14 @@ class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
|
|||||||
TEST_P(Loop8Test6Param, OperationCheck) {
|
TEST_P(Loop8Test6Param, OperationCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = number_of_iterations;
|
const int count_test_block = number_of_iterations;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
int32_t bd = bit_depth_;
|
int32_t bd = bit_depth_;
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
|
||||||
#else
|
#else
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -206,7 +222,6 @@ TEST_P(Loop8Test6Param, OperationCheck) {
|
|||||||
tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
|
tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
|
||||||
};
|
};
|
||||||
int32_t p = kNumCoeffs/32;
|
int32_t p = kNumCoeffs/32;
|
||||||
int count = 1;
|
|
||||||
|
|
||||||
uint16_t tmp_s[kNumCoeffs];
|
uint16_t tmp_s[kNumCoeffs];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
@@ -237,15 +252,15 @@ TEST_P(Loop8Test6Param, OperationCheck) {
|
|||||||
}
|
}
|
||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_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, count_, 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, count_, 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, count_);
|
||||||
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, count_));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_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];
|
||||||
@@ -264,14 +279,14 @@ TEST_P(Loop8Test6Param, OperationCheck) {
|
|||||||
TEST_P(Loop8Test6Param, ValueCheck) {
|
TEST_P(Loop8Test6Param, ValueCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = number_of_iterations;
|
const int count_test_block = number_of_iterations;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int32_t bd = bit_depth_;
|
const int32_t bd = bit_depth_;
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
|
||||||
#else
|
#else
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
|
|
||||||
@@ -279,7 +294,7 @@ TEST_P(Loop8Test6Param, ValueCheck) {
|
|||||||
// function of sharpness_lvl and the loopfilter lvl as:
|
// function of sharpness_lvl and the loopfilter lvl as:
|
||||||
// block_inside_limit = lvl >> ((sharpness_lvl > 0) + (sharpness_lvl > 4));
|
// block_inside_limit = lvl >> ((sharpness_lvl > 0) + (sharpness_lvl > 4));
|
||||||
// ...
|
// ...
|
||||||
// vpx_memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
// memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
||||||
// SIMD_WIDTH);
|
// SIMD_WIDTH);
|
||||||
// This means that the largest value for mblim will occur when sharpness_lvl
|
// This means that the largest value for mblim will occur when sharpness_lvl
|
||||||
// is equal to 0, and lvl is equal to its greatest value (MAX_LOOP_FILTER).
|
// is equal to 0, and lvl is equal to its greatest value (MAX_LOOP_FILTER).
|
||||||
@@ -305,20 +320,19 @@ TEST_P(Loop8Test6Param, ValueCheck) {
|
|||||||
tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
|
tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
|
||||||
};
|
};
|
||||||
int32_t p = kNumCoeffs / 32;
|
int32_t p = kNumCoeffs / 32;
|
||||||
int count = 1;
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
s[j] = rnd.Rand16() & mask_;
|
s[j] = rnd.Rand16() & mask_;
|
||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_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, count_, 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, count_, 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, count_);
|
||||||
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, count_));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_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];
|
||||||
}
|
}
|
||||||
@@ -336,14 +350,14 @@ TEST_P(Loop8Test6Param, ValueCheck) {
|
|||||||
TEST_P(Loop8Test9Param, OperationCheck) {
|
TEST_P(Loop8Test9Param, OperationCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = number_of_iterations;
|
const int count_test_block = number_of_iterations;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int32_t bd = bit_depth_;
|
const int32_t bd = bit_depth_;
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
|
||||||
#else
|
#else
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -409,7 +423,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
|
|||||||
}
|
}
|
||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
||||||
blimit1, limit1, thresh1, bd);
|
blimit1, limit1, thresh1, bd);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
@@ -421,7 +435,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
|
|||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
||||||
blimit1, limit1, thresh1));
|
blimit1, limit1, thresh1));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_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];
|
||||||
}
|
}
|
||||||
@@ -439,13 +453,13 @@ TEST_P(Loop8Test9Param, OperationCheck) {
|
|||||||
TEST_P(Loop8Test9Param, ValueCheck) {
|
TEST_P(Loop8Test9Param, ValueCheck) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
const int count_test_block = number_of_iterations;
|
const int count_test_block = number_of_iterations;
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
|
||||||
#else
|
#else
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
|
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
int err_count_total = 0;
|
int err_count_total = 0;
|
||||||
int first_failure = -1;
|
int first_failure = -1;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -485,7 +499,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
|
|||||||
s[j] = rnd.Rand16() & mask_;
|
s[j] = rnd.Rand16() & mask_;
|
||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
const int32_t bd = bit_depth_;
|
const int32_t bd = bit_depth_;
|
||||||
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
||||||
blimit1, limit1, thresh1, bd);
|
blimit1, limit1, thresh1, bd);
|
||||||
@@ -498,7 +512,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
|
|||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
|
||||||
blimit1, limit1, thresh1));
|
blimit1, limit1, thresh1));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_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];
|
||||||
}
|
}
|
||||||
@@ -516,116 +530,127 @@ TEST_P(Loop8Test9Param, ValueCheck) {
|
|||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Loop8Test6Param,
|
SSE2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_c, 8),
|
&vpx_highbd_lpf_horizontal_4_c, 8, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_c, 8),
|
&vpx_highbd_lpf_vertical_4_c, 8, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_c, 8),
|
&vpx_highbd_lpf_horizontal_8_c, 8, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_16_c, 8),
|
&vpx_highbd_lpf_horizontal_16_c, 8, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 8),
|
&vpx_highbd_lpf_horizontal_16_c, 8, 2),
|
||||||
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
|
&vpx_highbd_lpf_vertical_8_c, 8, 1),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&wrapper_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 8),
|
&wrapper_vertical_16_c, 8, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_c, 10),
|
&vpx_highbd_lpf_horizontal_4_c, 10, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_c, 10),
|
&vpx_highbd_lpf_vertical_4_c, 10, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_c, 10),
|
&vpx_highbd_lpf_horizontal_8_c, 10, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_16_c, 10),
|
&vpx_highbd_lpf_horizontal_16_c, 10, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 10),
|
&vpx_highbd_lpf_horizontal_16_c, 10, 2),
|
||||||
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
|
&vpx_highbd_lpf_vertical_8_c, 10, 1),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&wrapper_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 10),
|
&wrapper_vertical_16_c, 10, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_c, 12),
|
&vpx_highbd_lpf_horizontal_4_c, 12, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_c, 12),
|
&vpx_highbd_lpf_vertical_4_c, 12, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_c, 12),
|
&vpx_highbd_lpf_horizontal_8_c, 12, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_16_c, 12),
|
&vpx_highbd_lpf_horizontal_16_c, 12, 1),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 12),
|
&vpx_highbd_lpf_horizontal_16_c, 12, 2),
|
||||||
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
|
&vpx_highbd_lpf_vertical_8_c, 12, 1),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&wrapper_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 12),
|
&wrapper_vertical_16_c, 12, 1),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 8),
|
&wrapper_vertical_16_dual_c, 8, 1),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 10),
|
&wrapper_vertical_16_dual_c, 10, 1),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 12)));
|
&wrapper_vertical_16_dual_c, 12, 1)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Loop8Test6Param,
|
SSE2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_lpf_horizontal_8_sse2, &vp9_lpf_horizontal_8_c, 8),
|
make_tuple(&vpx_lpf_horizontal_8_sse2, &vpx_lpf_horizontal_8_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8),
|
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8),
|
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8)));
|
make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1),
|
||||||
|
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||||
|
&wrapper_vertical_16_dual_c, 8, 1)));
|
||||||
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_AVX2 && (!CONFIG_VP9_HIGHBITDEPTH)
|
#if HAVE_AVX2 && (!CONFIG_VPX_HIGHBITDEPTH)
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
AVX2, Loop8Test6Param,
|
AVX2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_lpf_horizontal_16_avx2, &vp9_lpf_horizontal_16_c, 8)));
|
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8,
|
||||||
|
2)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Loop8Test9Param,
|
SSE2, Loop8Test9Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_dual_c, 8),
|
&vpx_highbd_lpf_horizontal_4_dual_c, 8),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_dual_c, 8),
|
&vpx_highbd_lpf_horizontal_8_dual_c, 8),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_dual_c, 8),
|
&vpx_highbd_lpf_vertical_4_dual_c, 8),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_dual_c, 8),
|
&vpx_highbd_lpf_vertical_8_dual_c, 8),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_dual_c, 10),
|
&vpx_highbd_lpf_horizontal_4_dual_c, 10),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_dual_c, 10),
|
&vpx_highbd_lpf_horizontal_8_dual_c, 10),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_dual_c, 10),
|
&vpx_highbd_lpf_vertical_4_dual_c, 10),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_dual_c, 10),
|
&vpx_highbd_lpf_vertical_8_dual_c, 10),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_4_dual_c, 12),
|
&vpx_highbd_lpf_horizontal_4_dual_c, 12),
|
||||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_horizontal_8_dual_c, 12),
|
&vpx_highbd_lpf_horizontal_8_dual_c, 12),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_4_dual_c, 12),
|
&vpx_highbd_lpf_vertical_4_dual_c, 12),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_dual_c, 12)));
|
&vpx_highbd_lpf_vertical_8_dual_c, 12)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Loop8Test9Param,
|
SSE2, Loop8Test9Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_lpf_horizontal_4_dual_sse2,
|
make_tuple(&vpx_lpf_horizontal_4_dual_sse2,
|
||||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_horizontal_8_dual_sse2,
|
make_tuple(&vpx_lpf_horizontal_8_dual_sse2,
|
||||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_4_dual_sse2,
|
make_tuple(&vpx_lpf_vertical_4_dual_sse2,
|
||||||
&vp9_lpf_vertical_4_dual_c, 8),
|
&vpx_lpf_vertical_4_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_8_dual_sse2,
|
make_tuple(&vpx_lpf_vertical_8_dual_sse2,
|
||||||
&vp9_lpf_vertical_8_dual_c, 8)));
|
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
// No neon high bitdepth functions.
|
// No neon high bitdepth functions.
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
@@ -634,35 +659,60 @@ 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(&vp9_lpf_horizontal_16_neon,
|
make_tuple(&vpx_lpf_horizontal_16_neon,
|
||||||
&vp9_lpf_horizontal_16_c, 8),
|
&vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_16_neon,
|
||||||
|
&vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&wrapper_vertical_16_neon,
|
make_tuple(&wrapper_vertical_16_neon,
|
||||||
&wrapper_vertical_16_c, 8),
|
&wrapper_vertical_16_c, 8, 1),
|
||||||
make_tuple(&wrapper_vertical_16_dual_neon,
|
make_tuple(&wrapper_vertical_16_dual_neon,
|
||||||
&wrapper_vertical_16_dual_c, 8),
|
&wrapper_vertical_16_dual_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_8_neon,
|
|
||||||
&vp9_lpf_horizontal_8_c, 8),
|
|
||||||
make_tuple(&vp9_lpf_vertical_8_neon,
|
|
||||||
&vp9_lpf_vertical_8_c, 8),
|
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
make_tuple(&vp9_lpf_horizontal_4_neon,
|
make_tuple(&vpx_lpf_horizontal_8_neon,
|
||||||
&vp9_lpf_horizontal_4_c, 8),
|
&vpx_lpf_horizontal_8_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_vertical_4_neon,
|
make_tuple(&vpx_lpf_vertical_8_neon,
|
||||||
&vp9_lpf_vertical_4_c, 8)));
|
&vpx_lpf_vertical_8_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_4_neon,
|
||||||
|
&vpx_lpf_horizontal_4_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_neon,
|
||||||
|
&vpx_lpf_vertical_4_c, 8, 1)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Loop8Test9Param,
|
NEON, Loop8Test9Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
#if HAVE_NEON_ASM
|
#if HAVE_NEON_ASM
|
||||||
make_tuple(&vp9_lpf_horizontal_8_dual_neon,
|
make_tuple(&vpx_lpf_horizontal_8_dual_neon,
|
||||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_8_dual_neon,
|
make_tuple(&vpx_lpf_vertical_8_dual_neon,
|
||||||
&vp9_lpf_vertical_8_dual_c, 8),
|
&vpx_lpf_vertical_8_dual_c, 8),
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
make_tuple(&vp9_lpf_horizontal_4_dual_neon,
|
make_tuple(&vpx_lpf_horizontal_4_dual_neon,
|
||||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_4_dual_neon,
|
make_tuple(&vpx_lpf_vertical_4_dual_neon,
|
||||||
&vp9_lpf_vertical_4_dual_c, 8)));
|
&vpx_lpf_vertical_4_dual_c, 8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, Loop8Test6Param,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1),
|
||||||
|
make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, Loop8Test9Param,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_lpf_horizontal_4_dual_msa,
|
||||||
|
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_8_dual_msa,
|
||||||
|
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_dual_msa,
|
||||||
|
&vpx_lpf_vertical_4_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_dual_msa,
|
||||||
|
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||||
|
#endif // HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ class MD5 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Add(const uint8_t *data, size_t size) {
|
||||||
|
MD5Update(&md5_, data, static_cast<uint32_t>(size));
|
||||||
|
}
|
||||||
|
|
||||||
const char *Get(void) {
|
const char *Get(void) {
|
||||||
static const char hex[16] = {
|
static const char hex[16] = {
|
||||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||||
|
|||||||
@@ -13,14 +13,15 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.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/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/blockd.h"
|
||||||
#include "./vp9_rtcd.h"
|
#include "vp10/common/scan.h"
|
||||||
#include "vp9/common/vp9_blockd.h"
|
|
||||||
#include "vp9/common/vp9_scan.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
@@ -74,16 +75,16 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
|
|||||||
FAIL() << "Wrong Size!";
|
FAIL() << "Wrong Size!";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
|
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
const int block_size = size * size;
|
const int block_size = size * size;
|
||||||
|
|
||||||
DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
|
||||||
|
|
||||||
int max_error = 0;
|
int max_error = 0;
|
||||||
for (int i = 0; i < count_test_block; ++i) {
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
@@ -114,7 +115,7 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
|
|||||||
// quantization with maximum allowed step sizes
|
// quantization with maximum allowed step sizes
|
||||||
test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336;
|
test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336;
|
||||||
for (int j = 1; j < last_nonzero_; ++j)
|
for (int j = 1; j < last_nonzero_; ++j)
|
||||||
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]]
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]]
|
||||||
= (output_ref_block[j] / 1828) * 1828;
|
= (output_ref_block[j] / 1828) * 1828;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,10 +154,10 @@ TEST_P(PartialIDctTest, ResultsMatch) {
|
|||||||
FAIL() << "Wrong Size!";
|
FAIL() << "Wrong Size!";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
const int count_test_block = 1000;
|
const int count_test_block = 1000;
|
||||||
const int max_coeff = 32766 / 4;
|
const int max_coeff = 32766 / 4;
|
||||||
const int block_size = size * size;
|
const int block_size = size * size;
|
||||||
@@ -176,7 +177,7 @@ TEST_P(PartialIDctTest, ResultsMatch) {
|
|||||||
max_energy_leftover = 0;
|
max_energy_leftover = 0;
|
||||||
coef = 0;
|
coef = 0;
|
||||||
}
|
}
|
||||||
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef;
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]] = coef;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(test_coef_block2, test_coef_block1,
|
memcpy(test_coef_block2, test_coef_block1,
|
||||||
@@ -201,117 +202,142 @@ using std::tr1::make_tuple;
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, PartialIDctTest,
|
C, PartialIDctTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct32x32_34_add_c,
|
&vpx_idct32x32_34_add_c,
|
||||||
TX_32X32, 34),
|
TX_32X32, 34),
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct32x32_1_add_c,
|
&vpx_idct32x32_1_add_c,
|
||||||
TX_32X32, 1),
|
TX_32X32, 1),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_10_add_c,
|
&vpx_idct16x16_10_add_c,
|
||||||
TX_16X16, 10),
|
TX_16X16, 10),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_1_add_c,
|
&vpx_idct16x16_1_add_c,
|
||||||
TX_16X16, 1),
|
TX_16X16, 1),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_12_add_c,
|
&vpx_idct8x8_12_add_c,
|
||||||
TX_8X8, 12),
|
TX_8X8, 12),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_1_add_c,
|
&vpx_idct8x8_1_add_c,
|
||||||
TX_8X8, 1),
|
TX_8X8, 1),
|
||||||
make_tuple(&vp9_fdct4x4_c,
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
&vp9_idct4x4_16_add_c,
|
&vpx_idct4x4_16_add_c,
|
||||||
&vp9_idct4x4_1_add_c,
|
&vpx_idct4x4_1_add_c,
|
||||||
TX_4X4, 1)));
|
TX_4X4, 1)));
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, PartialIDctTest,
|
NEON, PartialIDctTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct32x32_1_add_neon,
|
&vpx_idct32x32_1_add_neon,
|
||||||
TX_32X32, 1),
|
TX_32X32, 1),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_10_add_neon,
|
&vpx_idct16x16_10_add_neon,
|
||||||
TX_16X16, 10),
|
TX_16X16, 10),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_1_add_neon,
|
&vpx_idct16x16_1_add_neon,
|
||||||
TX_16X16, 1),
|
TX_16X16, 1),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_12_add_neon,
|
&vpx_idct8x8_12_add_neon,
|
||||||
TX_8X8, 12),
|
TX_8X8, 12),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_1_add_neon,
|
&vpx_idct8x8_1_add_neon,
|
||||||
TX_8X8, 1),
|
TX_8X8, 1),
|
||||||
make_tuple(&vp9_fdct4x4_c,
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
&vp9_idct4x4_16_add_c,
|
&vpx_idct4x4_16_add_c,
|
||||||
&vp9_idct4x4_1_add_neon,
|
&vpx_idct4x4_1_add_neon,
|
||||||
TX_4X4, 1)));
|
TX_4X4, 1)));
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, PartialIDctTest,
|
SSE2, PartialIDctTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct32x32_34_add_sse2,
|
&vpx_idct32x32_34_add_sse2,
|
||||||
TX_32X32, 34),
|
TX_32X32, 34),
|
||||||
make_tuple(&vp9_fdct32x32_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct32x32_1024_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct32x32_1_add_sse2,
|
&vpx_idct32x32_1_add_sse2,
|
||||||
TX_32X32, 1),
|
TX_32X32, 1),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_10_add_sse2,
|
&vpx_idct16x16_10_add_sse2,
|
||||||
TX_16X16, 10),
|
TX_16X16, 10),
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct16x16_256_add_c,
|
||||||
&vp9_idct16x16_1_add_sse2,
|
&vpx_idct16x16_1_add_sse2,
|
||||||
TX_16X16, 1),
|
TX_16X16, 1),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_12_add_sse2,
|
&vpx_idct8x8_12_add_sse2,
|
||||||
TX_8X8, 12),
|
TX_8X8, 12),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_1_add_sse2,
|
&vpx_idct8x8_1_add_sse2,
|
||||||
TX_8X8, 1),
|
TX_8X8, 1),
|
||||||
make_tuple(&vp9_fdct4x4_c,
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
&vp9_idct4x4_16_add_c,
|
&vpx_idct4x4_16_add_c,
|
||||||
&vp9_idct4x4_1_add_sse2,
|
&vpx_idct4x4_1_add_sse2,
|
||||||
TX_4X4, 1)));
|
TX_4X4, 1)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
|
||||||
!CONFIG_EMULATE_HARDWARE
|
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3_64, PartialIDctTest,
|
SSSE3_64, PartialIDctTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_12_add_ssse3,
|
&vpx_idct8x8_12_add_ssse3,
|
||||||
TX_8X8, 12)));
|
TX_8X8, 12)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3, PartialIDctTest,
|
MSA, PartialIDctTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_c,
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
&vp9_idct16x16_256_add_c,
|
&vpx_idct32x32_1024_add_c,
|
||||||
&vp9_idct16x16_10_add_ssse3,
|
&vpx_idct32x32_34_add_msa,
|
||||||
TX_16X16, 10)));
|
TX_32X32, 34),
|
||||||
#endif
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
|
&vpx_idct32x32_1024_add_c,
|
||||||
|
&vpx_idct32x32_1_add_msa,
|
||||||
|
TX_32X32, 1),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vpx_idct16x16_256_add_c,
|
||||||
|
&vpx_idct16x16_10_add_msa,
|
||||||
|
TX_16X16, 10),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vpx_idct16x16_256_add_c,
|
||||||
|
&vpx_idct16x16_1_add_msa,
|
||||||
|
TX_16X16, 1),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vpx_idct8x8_64_add_c,
|
||||||
|
&vpx_idct8x8_12_add_msa,
|
||||||
|
TX_8X8, 10),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vpx_idct8x8_64_add_c,
|
||||||
|
&vpx_idct8x8_1_add_msa,
|
||||||
|
TX_8X8, 1),
|
||||||
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
|
&vpx_idct4x4_16_add_c,
|
||||||
|
&vpx_idct4x4_1_add_msa,
|
||||||
|
TX_4X4, 1)));
|
||||||
|
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,113 +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 "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
typedef void (*PostProcFunc)(unsigned char *src_ptr,
|
|
||||||
unsigned char *dst_ptr,
|
|
||||||
int src_pixels_per_line,
|
|
||||||
int dst_pixels_per_line,
|
|
||||||
int cols,
|
|
||||||
unsigned char *flimit,
|
|
||||||
int size);
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
class VP8PostProcessingFilterTest
|
|
||||||
: public ::testing::TestWithParam<PostProcFunc> {
|
|
||||||
public:
|
|
||||||
virtual void TearDown() {
|
|
||||||
libvpx_test::ClearSystemState();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Test routine for the VP8 post-processing function
|
|
||||||
// vp8_post_proc_down_and_across_mb_row_c.
|
|
||||||
|
|
||||||
TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
|
|
||||||
// Size of the underlying data block that will be filtered.
|
|
||||||
const int block_width = 16;
|
|
||||||
const int block_height = 16;
|
|
||||||
|
|
||||||
// 5-tap filter needs 2 padding rows above and below the block in the input.
|
|
||||||
const int input_width = block_width;
|
|
||||||
const int input_height = block_height + 4;
|
|
||||||
const int input_stride = input_width;
|
|
||||||
const int input_size = input_width * input_height;
|
|
||||||
|
|
||||||
// Filter extends output block by 8 samples at left and right edges.
|
|
||||||
const int output_width = block_width + 16;
|
|
||||||
const int output_height = block_height;
|
|
||||||
const int output_stride = output_width;
|
|
||||||
const int output_size = output_width * output_height;
|
|
||||||
|
|
||||||
uint8_t *const src_image =
|
|
||||||
reinterpret_cast<uint8_t*>(vpx_calloc(input_size, 1));
|
|
||||||
uint8_t *const dst_image =
|
|
||||||
reinterpret_cast<uint8_t*>(vpx_calloc(output_size, 1));
|
|
||||||
|
|
||||||
// Pointers to top-left pixel of block in the input and output images.
|
|
||||||
uint8_t *const src_image_ptr = src_image + (input_stride << 1);
|
|
||||||
uint8_t *const dst_image_ptr = dst_image + 8;
|
|
||||||
uint8_t *const flimits =
|
|
||||||
reinterpret_cast<uint8_t *>(vpx_memalign(16, block_width));
|
|
||||||
(void)vpx_memset(flimits, 255, block_width);
|
|
||||||
|
|
||||||
// Initialize pixels in the input:
|
|
||||||
// block pixels to value 1,
|
|
||||||
// border pixels to value 10.
|
|
||||||
(void)vpx_memset(src_image, 10, input_size);
|
|
||||||
uint8_t *pixel_ptr = src_image_ptr;
|
|
||||||
for (int i = 0; i < block_height; ++i) {
|
|
||||||
for (int j = 0; j < block_width; ++j) {
|
|
||||||
pixel_ptr[j] = 1;
|
|
||||||
}
|
|
||||||
pixel_ptr += input_stride;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize pixels in the output to 99.
|
|
||||||
(void)vpx_memset(dst_image, 99, output_size);
|
|
||||||
|
|
||||||
ASM_REGISTER_STATE_CHECK(
|
|
||||||
GetParam()(src_image_ptr, dst_image_ptr, input_stride,
|
|
||||||
output_stride, block_width, flimits, 16));
|
|
||||||
|
|
||||||
static const uint8_t expected_data[block_height] = {
|
|
||||||
4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4
|
|
||||||
};
|
|
||||||
|
|
||||||
pixel_ptr = dst_image_ptr;
|
|
||||||
for (int i = 0; i < block_height; ++i) {
|
|
||||||
for (int j = 0; j < block_width; ++j) {
|
|
||||||
EXPECT_EQ(expected_data[i], pixel_ptr[j])
|
|
||||||
<< "VP8PostProcessingFilterTest failed with invalid filter output";
|
|
||||||
}
|
|
||||||
pixel_ptr += output_stride;
|
|
||||||
}
|
|
||||||
|
|
||||||
vpx_free(src_image);
|
|
||||||
vpx_free(dst_image);
|
|
||||||
vpx_free(flimits);
|
|
||||||
};
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, VP8PostProcessingFilterTest,
|
|
||||||
::testing::Values(vp8_post_proc_down_and_across_mb_row_c));
|
|
||||||
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest,
|
|
||||||
::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@@ -8,190 +8,344 @@
|
|||||||
* 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 <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/entropy.h"
|
||||||
#include "./vpx_config.h"
|
#include "vp10/common/scan.h"
|
||||||
#include "./vp8_rtcd.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vp8/common/blockd.h"
|
|
||||||
#include "vp8/common/onyx.h"
|
|
||||||
#include "vp8/encoder/block.h"
|
|
||||||
#include "vp8/encoder/onyx_int.h"
|
|
||||||
#include "vp8/encoder/quantize.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const int kNumBlocks = 25;
|
|
||||||
const int kNumBlockEntries = 16;
|
|
||||||
|
|
||||||
typedef void (*VP8Quantize)(BLOCK *b, BLOCKD *d);
|
|
||||||
|
|
||||||
typedef std::tr1::tuple<VP8Quantize, VP8Quantize> VP8QuantizeParam;
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
using std::tr1::make_tuple;
|
|
||||||
|
|
||||||
// Create and populate a VP8_COMP instance which has a complete set of
|
namespace {
|
||||||
// quantization inputs as well as a second MACROBLOCKD for output.
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
class QuantizeTestBase {
|
const int number_of_iterations = 100;
|
||||||
|
|
||||||
|
typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count,
|
||||||
|
int skip_block, const int16_t *zbin,
|
||||||
|
const int16_t *round, const int16_t *quant,
|
||||||
|
const int16_t *quant_shift,
|
||||||
|
tran_low_t *qcoeff, tran_low_t *dqcoeff,
|
||||||
|
const int16_t *dequant,
|
||||||
|
uint16_t *eob, const int16_t *scan,
|
||||||
|
const int16_t *iscan);
|
||||||
|
typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t>
|
||||||
|
QuantizeParam;
|
||||||
|
|
||||||
|
class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> {
|
||||||
public:
|
public:
|
||||||
virtual ~QuantizeTestBase() {
|
virtual ~VP9QuantizeTest() {}
|
||||||
vp8_remove_compressor(&vp8_comp_);
|
|
||||||
vp8_comp_ = NULL;
|
|
||||||
vpx_free(macroblockd_dst_);
|
|
||||||
macroblockd_dst_ = NULL;
|
|
||||||
libvpx_test::ClearSystemState();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void SetupCompressor() {
|
|
||||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
|
||||||
|
|
||||||
// The full configuration is necessary to generate the quantization tables.
|
|
||||||
VP8_CONFIG vp8_config;
|
|
||||||
vpx_memset(&vp8_config, 0, sizeof(vp8_config));
|
|
||||||
|
|
||||||
vp8_comp_ = vp8_create_compressor(&vp8_config);
|
|
||||||
|
|
||||||
// Set the tables based on a quantizer of 0.
|
|
||||||
vp8_set_quantizer(vp8_comp_, 0);
|
|
||||||
|
|
||||||
// Set up all the block/blockd pointers for the mb in vp8_comp_.
|
|
||||||
vp8cx_frame_init_quantizer(vp8_comp_);
|
|
||||||
|
|
||||||
// Copy macroblockd from the reference to get pre-set-up dequant values.
|
|
||||||
macroblockd_dst_ = reinterpret_cast<MACROBLOCKD *>(
|
|
||||||
vpx_memalign(32, sizeof(*macroblockd_dst_)));
|
|
||||||
vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd,
|
|
||||||
sizeof(*macroblockd_dst_));
|
|
||||||
// Fix block pointers - currently they point to the blocks in the reference
|
|
||||||
// structure.
|
|
||||||
vp8_setup_block_dptrs(macroblockd_dst_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateQuantizer(int q) {
|
|
||||||
vp8_set_quantizer(vp8_comp_, q);
|
|
||||||
|
|
||||||
vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd,
|
|
||||||
sizeof(*macroblockd_dst_));
|
|
||||||
vp8_setup_block_dptrs(macroblockd_dst_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FillCoeffConstant(int16_t c) {
|
|
||||||
for (int i = 0; i < kNumBlocks * kNumBlockEntries; ++i) {
|
|
||||||
vp8_comp_->mb.coeff[i] = c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FillCoeffRandom() {
|
|
||||||
for (int i = 0; i < kNumBlocks * kNumBlockEntries; ++i) {
|
|
||||||
vp8_comp_->mb.coeff[i] = rnd_.Rand8();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CheckOutput() {
|
|
||||||
EXPECT_EQ(0, memcmp(vp8_comp_->mb.e_mbd.qcoeff, macroblockd_dst_->qcoeff,
|
|
||||||
sizeof(*macroblockd_dst_->qcoeff) * kNumBlocks *
|
|
||||||
kNumBlockEntries))
|
|
||||||
<< "qcoeff mismatch";
|
|
||||||
EXPECT_EQ(0, memcmp(vp8_comp_->mb.e_mbd.dqcoeff, macroblockd_dst_->dqcoeff,
|
|
||||||
sizeof(*macroblockd_dst_->dqcoeff) * kNumBlocks *
|
|
||||||
kNumBlockEntries))
|
|
||||||
<< "dqcoeff mismatch";
|
|
||||||
EXPECT_EQ(0, memcmp(vp8_comp_->mb.e_mbd.eobs, macroblockd_dst_->eobs,
|
|
||||||
sizeof(*macroblockd_dst_->eobs) * kNumBlocks))
|
|
||||||
<< "eobs mismatch";
|
|
||||||
}
|
|
||||||
|
|
||||||
VP8_COMP *vp8_comp_;
|
|
||||||
MACROBLOCKD *macroblockd_dst_;
|
|
||||||
|
|
||||||
private:
|
|
||||||
ACMRandom rnd_;
|
|
||||||
};
|
|
||||||
|
|
||||||
class QuantizeTest : public QuantizeTestBase,
|
|
||||||
public ::testing::TestWithParam<VP8QuantizeParam> {
|
|
||||||
protected:
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
SetupCompressor();
|
quantize_op_ = GET_PARAM(0);
|
||||||
asm_quant_ = GET_PARAM(0);
|
ref_quantize_op_ = GET_PARAM(1);
|
||||||
c_quant_ = GET_PARAM(1);
|
bit_depth_ = GET_PARAM(2);
|
||||||
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunComparison() {
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
for (int i = 0; i < kNumBlocks; ++i) {
|
|
||||||
ASM_REGISTER_STATE_CHECK(
|
|
||||||
c_quant_(&vp8_comp_->mb.block[i], &vp8_comp_->mb.e_mbd.block[i]));
|
|
||||||
ASM_REGISTER_STATE_CHECK(
|
|
||||||
asm_quant_(&vp8_comp_->mb.block[i], ¯oblockd_dst_->block[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckOutput();
|
protected:
|
||||||
}
|
vpx_bit_depth_t bit_depth_;
|
||||||
|
int mask_;
|
||||||
private:
|
QuantizeFunc quantize_op_;
|
||||||
VP8Quantize asm_quant_;
|
QuantizeFunc ref_quantize_op_;
|
||||||
VP8Quantize c_quant_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_P(QuantizeTest, TestZeroInput) {
|
class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
|
||||||
FillCoeffConstant(0);
|
public:
|
||||||
RunComparison();
|
virtual ~VP9Quantize32Test() {}
|
||||||
}
|
virtual void SetUp() {
|
||||||
|
quantize_op_ = GET_PARAM(0);
|
||||||
TEST_P(QuantizeTest, TestLargeNegativeInput) {
|
ref_quantize_op_ = GET_PARAM(1);
|
||||||
FillCoeffConstant(0);
|
bit_depth_ = GET_PARAM(2);
|
||||||
// Generate a qcoeff which contains 512/-512 (0x0100/0xFE00) to catch issues
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
// like BUG=883 where the constant being compared was incorrectly initialized.
|
|
||||||
vp8_comp_->mb.coeff[0] = -8191;
|
|
||||||
RunComparison();
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(QuantizeTest, TestRandomInput) {
|
|
||||||
FillCoeffRandom();
|
|
||||||
RunComparison();
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(QuantizeTest, TestMultipleQ) {
|
|
||||||
for (int q = 0; q < QINDEX_RANGE; ++q) {
|
|
||||||
UpdateQuantizer(q);
|
|
||||||
FillCoeffRandom();
|
|
||||||
RunComparison();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
vpx_bit_depth_t bit_depth_;
|
||||||
|
int mask_;
|
||||||
|
QuantizeFunc quantize_op_;
|
||||||
|
QuantizeFunc ref_quantize_op_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(VP9QuantizeTest, OperationCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
|
||||||
|
int err_count_total = 0;
|
||||||
|
int first_failure = -1;
|
||||||
|
for (int i = 0; i < number_of_iterations; ++i) {
|
||||||
|
const int skip_block = i == 0;
|
||||||
|
const TX_SIZE sz = (TX_SIZE)(i % 3); // TX_4X4, TX_8X8 TX_16X16
|
||||||
|
const TX_TYPE tx_type = (TX_TYPE)((i >> 2) % 3);
|
||||||
|
const scan_order *scan_order = &vp10_scan_orders[sz][tx_type];
|
||||||
|
const int count = (4 << sz) * (4 << sz); // 16, 64, 256
|
||||||
|
int err_count = 0;
|
||||||
|
*eob_ptr = rnd.Rand16();
|
||||||
|
*ref_eob_ptr = *eob_ptr;
|
||||||
|
for (int j = 0; j < count; j++) {
|
||||||
|
coeff_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
}
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
zbin_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
round_ptr[j] = rnd.Rand16();
|
||||||
|
quant_ptr[j] = rnd.Rand16();
|
||||||
|
quant_shift_ptr[j] = rnd.Rand16();
|
||||||
|
dequant_ptr[j] = rnd.Rand16();
|
||||||
|
}
|
||||||
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
|
scan_order->scan, scan_order->iscan));
|
||||||
|
for (int j = 0; j < sz; ++j) {
|
||||||
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
|
(ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]);
|
||||||
|
}
|
||||||
|
err_count += (*ref_eob_ptr != *eob_ptr);
|
||||||
|
if (err_count && !err_count_total) {
|
||||||
|
first_failure = i;
|
||||||
|
}
|
||||||
|
err_count_total += err_count;
|
||||||
|
}
|
||||||
|
EXPECT_EQ(0, err_count_total)
|
||||||
|
<< "Error: Quantization Test, C output doesn't match SSE2 output. "
|
||||||
|
<< "First failed at test case " << first_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(VP9Quantize32Test, OperationCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
|
||||||
|
int err_count_total = 0;
|
||||||
|
int first_failure = -1;
|
||||||
|
for (int i = 0; i < number_of_iterations; ++i) {
|
||||||
|
const int skip_block = i == 0;
|
||||||
|
const TX_SIZE sz = TX_32X32;
|
||||||
|
const TX_TYPE tx_type = (TX_TYPE)(i % 4);
|
||||||
|
const scan_order *scan_order = &vp10_scan_orders[sz][tx_type];
|
||||||
|
const int count = (4 << sz) * (4 << sz); // 1024
|
||||||
|
int err_count = 0;
|
||||||
|
*eob_ptr = rnd.Rand16();
|
||||||
|
*ref_eob_ptr = *eob_ptr;
|
||||||
|
for (int j = 0; j < count; j++) {
|
||||||
|
coeff_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
}
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
zbin_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
round_ptr[j] = rnd.Rand16();
|
||||||
|
quant_ptr[j] = rnd.Rand16();
|
||||||
|
quant_shift_ptr[j] = rnd.Rand16();
|
||||||
|
dequant_ptr[j] = rnd.Rand16();
|
||||||
|
}
|
||||||
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
|
scan_order->scan, scan_order->iscan));
|
||||||
|
for (int j = 0; j < sz; ++j) {
|
||||||
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
|
(ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]);
|
||||||
|
}
|
||||||
|
err_count += (*ref_eob_ptr != *eob_ptr);
|
||||||
|
if (err_count && !err_count_total) {
|
||||||
|
first_failure = i;
|
||||||
|
}
|
||||||
|
err_count_total += err_count;
|
||||||
|
}
|
||||||
|
EXPECT_EQ(0, err_count_total)
|
||||||
|
<< "Error: Quantization Test, C output doesn't match SSE2 output. "
|
||||||
|
<< "First failed at test case " << first_failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(VP9QuantizeTest, EOBCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[256]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
|
||||||
|
int err_count_total = 0;
|
||||||
|
int first_failure = -1;
|
||||||
|
for (int i = 0; i < number_of_iterations; ++i) {
|
||||||
|
int skip_block = i == 0;
|
||||||
|
TX_SIZE sz = (TX_SIZE)(i % 3); // TX_4X4, TX_8X8 TX_16X16
|
||||||
|
TX_TYPE tx_type = (TX_TYPE)((i >> 2) % 3);
|
||||||
|
const scan_order *scan_order = &vp10_scan_orders[sz][tx_type];
|
||||||
|
int count = (4 << sz) * (4 << sz); // 16, 64, 256
|
||||||
|
int err_count = 0;
|
||||||
|
*eob_ptr = rnd.Rand16();
|
||||||
|
*ref_eob_ptr = *eob_ptr;
|
||||||
|
// Two random entries
|
||||||
|
for (int j = 0; j < count; j++) {
|
||||||
|
coeff_ptr[j] = 0;
|
||||||
|
}
|
||||||
|
coeff_ptr[rnd(count)] = rnd.Rand16()&mask_;
|
||||||
|
coeff_ptr[rnd(count)] = rnd.Rand16()&mask_;
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
zbin_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
round_ptr[j] = rnd.Rand16();
|
||||||
|
quant_ptr[j] = rnd.Rand16();
|
||||||
|
quant_shift_ptr[j] = rnd.Rand16();
|
||||||
|
dequant_ptr[j] = rnd.Rand16();
|
||||||
|
}
|
||||||
|
|
||||||
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
|
scan_order->scan, scan_order->iscan));
|
||||||
|
|
||||||
|
for (int j = 0; j < sz; ++j) {
|
||||||
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
|
(ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]);
|
||||||
|
}
|
||||||
|
err_count += (*ref_eob_ptr != *eob_ptr);
|
||||||
|
if (err_count && !err_count_total) {
|
||||||
|
first_failure = i;
|
||||||
|
}
|
||||||
|
err_count_total += err_count;
|
||||||
|
}
|
||||||
|
EXPECT_EQ(0, err_count_total)
|
||||||
|
<< "Error: Quantization Test, C output doesn't match SSE2 output. "
|
||||||
|
<< "First failed at test case " << first_failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(VP9Quantize32Test, EOBCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, round_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, quant_shift_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, qcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_qcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, ref_dqcoeff_ptr[1024]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, dequant_ptr[2]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, eob_ptr[1]);
|
||||||
|
DECLARE_ALIGNED(16, uint16_t, ref_eob_ptr[1]);
|
||||||
|
int err_count_total = 0;
|
||||||
|
int first_failure = -1;
|
||||||
|
for (int i = 0; i < number_of_iterations; ++i) {
|
||||||
|
int skip_block = i == 0;
|
||||||
|
TX_SIZE sz = TX_32X32;
|
||||||
|
TX_TYPE tx_type = (TX_TYPE)(i % 4);
|
||||||
|
const scan_order *scan_order = &vp10_scan_orders[sz][tx_type];
|
||||||
|
int count = (4 << sz) * (4 << sz); // 1024
|
||||||
|
int err_count = 0;
|
||||||
|
*eob_ptr = rnd.Rand16();
|
||||||
|
*ref_eob_ptr = *eob_ptr;
|
||||||
|
for (int j = 0; j < count; j++) {
|
||||||
|
coeff_ptr[j] = 0;
|
||||||
|
}
|
||||||
|
// Two random entries
|
||||||
|
coeff_ptr[rnd(count)] = rnd.Rand16()&mask_;
|
||||||
|
coeff_ptr[rnd(count)] = rnd.Rand16()&mask_;
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
zbin_ptr[j] = rnd.Rand16()&mask_;
|
||||||
|
round_ptr[j] = rnd.Rand16();
|
||||||
|
quant_ptr[j] = rnd.Rand16();
|
||||||
|
quant_shift_ptr[j] = rnd.Rand16();
|
||||||
|
dequant_ptr[j] = rnd.Rand16();
|
||||||
|
}
|
||||||
|
|
||||||
|
ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr,
|
||||||
|
quant_ptr, quant_shift_ptr, ref_qcoeff_ptr,
|
||||||
|
ref_dqcoeff_ptr, dequant_ptr,
|
||||||
|
ref_eob_ptr, scan_order->scan, scan_order->iscan);
|
||||||
|
ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block,
|
||||||
|
zbin_ptr, round_ptr, quant_ptr,
|
||||||
|
quant_shift_ptr, qcoeff_ptr,
|
||||||
|
dqcoeff_ptr, dequant_ptr, eob_ptr,
|
||||||
|
scan_order->scan, scan_order->iscan));
|
||||||
|
|
||||||
|
for (int j = 0; j < sz; ++j) {
|
||||||
|
err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) |
|
||||||
|
(ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]);
|
||||||
|
}
|
||||||
|
err_count += (*ref_eob_ptr != *eob_ptr);
|
||||||
|
if (err_count && !err_count_total) {
|
||||||
|
first_failure = i;
|
||||||
|
}
|
||||||
|
err_count_total += err_count;
|
||||||
|
}
|
||||||
|
EXPECT_EQ(0, err_count_total)
|
||||||
|
<< "Error: Quantization Test, C output doesn't match SSE2 output. "
|
||||||
|
<< "First failed at test case " << first_failure;
|
||||||
|
}
|
||||||
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, QuantizeTest,
|
SSE2, VP9QuantizeTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp8_fast_quantize_b_sse2, &vp8_fast_quantize_b_c),
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
make_tuple(&vp8_regular_quantize_b_sse2, &vp8_regular_quantize_b_c)));
|
&vpx_highbd_quantize_b_c, VPX_BITS_8),
|
||||||
#endif // HAVE_SSE2
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
|
&vpx_highbd_quantize_b_c, VPX_BITS_10),
|
||||||
#if HAVE_SSSE3
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, QuantizeTest,
|
&vpx_highbd_quantize_b_c, VPX_BITS_12)));
|
||||||
::testing::Values(make_tuple(&vp8_fast_quantize_b_ssse3,
|
|
||||||
&vp8_fast_quantize_b_c)));
|
|
||||||
#endif // HAVE_SSSE3
|
|
||||||
|
|
||||||
#if HAVE_SSE4_1
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE4_1, QuantizeTest,
|
SSE2, VP9Quantize32Test,
|
||||||
::testing::Values(make_tuple(&vp8_regular_quantize_b_sse4_1,
|
::testing::Values(
|
||||||
&vp8_regular_quantize_b_c)));
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
#endif // HAVE_SSE4_1
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_8),
|
||||||
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
#if HAVE_NEON
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_10),
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, QuantizeTest,
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
::testing::Values(make_tuple(&vp8_fast_quantize_b_neon,
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_12)));
|
||||||
&vp8_fast_quantize_b_c)));
|
#endif // HAVE_SSE2
|
||||||
#endif // HAVE_NEON
|
#endif // CONFIG_VPX_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
|
|
||||||
#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>
|
||||||
|
|
||||||
@@ -92,11 +94,11 @@ class RegisterStateCheck {
|
|||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|
||||||
#elif defined(CONFIG_SHARED) && defined(HAVE_NEON_ASM) && defined(CONFIG_VP9) \
|
#elif defined(CONFIG_SHARED) && defined(HAVE_NEON_ASM) && defined(CONFIG_VP9) \
|
||||||
&& !CONFIG_SHARED && HAVE_NEON_ASM && CONFIG_VP9
|
&& !CONFIG_SHARED && HAVE_NEON_ASM && CONFIG_VP10
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// Save the d8-d15 registers into store.
|
// Save the d8-d15 registers into store.
|
||||||
void vp9_push_neon(int64_t *store);
|
void vpx_push_neon(int64_t *store);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace libvpx_test {
|
namespace libvpx_test {
|
||||||
@@ -111,7 +113,7 @@ class RegisterStateCheck {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static bool StoreRegisters(int64_t store[8]) {
|
static bool StoreRegisters(int64_t store[8]) {
|
||||||
vp9_push_neon(store);
|
vpx_push_neon(store);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +121,7 @@ class RegisterStateCheck {
|
|||||||
bool Check() const {
|
bool Check() const {
|
||||||
if (!initialized_) return false;
|
if (!initialized_) return false;
|
||||||
int64_t post_store[8];
|
int64_t post_store[8];
|
||||||
vp9_push_neon(post_store);
|
vpx_push_neon(post_store);
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
EXPECT_EQ(pre_store_[i], post_store[i]) << "d"
|
EXPECT_EQ(pre_store_[i], post_store[i]) << "d"
|
||||||
<< i + 8 << " has been modified";
|
<< i + 8 << " has been modified";
|
||||||
|
|||||||
@@ -81,6 +81,15 @@ 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;
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
unsigned int ScaleForFrameNumber(unsigned int frame, unsigned int val) {
|
unsigned int ScaleForFrameNumber(unsigned int frame, unsigned int val) {
|
||||||
if (frame < 10)
|
if (frame < 10)
|
||||||
return val;
|
return val;
|
||||||
@@ -120,15 +129,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));
|
||||||
@@ -196,6 +196,19 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||||
libvpx_test::Encoder *encoder) {
|
libvpx_test::Encoder *encoder) {
|
||||||
|
if (change_config_) {
|
||||||
|
int new_q = 60;
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_ONETWO, VP8E_ONETWO};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
|
if (video->frame() == 1) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = new_q;
|
||||||
|
encoder->Config(&cfg_);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (video->frame() == kStepDownFrame) {
|
if (video->frame() == kStepDownFrame) {
|
||||||
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
@@ -205,6 +218,7 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
if (!frame0_psnr_)
|
if (!frame0_psnr_)
|
||||||
@@ -227,6 +241,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 +252,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 +277,164 @@ 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
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_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
|
||||||
|
ResizingVideoSource video;
|
||||||
|
DefaultConfig();
|
||||||
|
change_bitrate_ = false;
|
||||||
|
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);
|
||||||
|
const unsigned int expected_w = ScaleForFrameNumber(frame, kInitialWidth);
|
||||||
|
const unsigned int expected_h = ScaleForFrameNumber(frame, kInitialHeight);
|
||||||
|
|
||||||
|
EXPECT_EQ(expected_w, info->w)
|
||||||
|
<< "Frame " << frame << " had unexpected width";
|
||||||
|
EXPECT_EQ(expected_h, info->h)
|
||||||
|
<< "Frame " << frame << " had unexpected height";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify that we get 1 resize down event in this test.
|
||||||
|
ASSERT_EQ(1, resize_count) << "Resizing should occur.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify that we get 2 resize events in this test.
|
||||||
|
ASSERT_EQ(resize_count, 2) << "Resizing should occur twice.";
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
||||||
@@ -366,11 +540,13 @@ TEST_P(ResizeCspTest, TestResizeCspWorks) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
}
|
}
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(ResizeTest, ONE_PASS_TEST_MODES);
|
VP10_INSTANTIATE_TEST_CASE(ResizeTest,
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeTest,
|
|
||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
VP10_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
||||||
::testing::Values(::libvpx_test::kOnePassBest));
|
::testing::Values(::libvpx_test::kOnePassBest));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
VP10_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 9));
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
1271
test/sad_test.cc
1271
test/sad_test.cc
File diff suppressed because it is too large
Load Diff
184
test/set_roi.cc
184
test/set_roi.cc
@@ -1,184 +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 <math.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "test/acm_random.h"
|
|
||||||
#include "vp8/encoder/onyx_int.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
TEST(VP8RoiMapTest, ParameterCheck) {
|
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
|
||||||
int delta_q[MAX_MB_SEGMENTS] = { -2, -25, 0, 31 };
|
|
||||||
int delta_lf[MAX_MB_SEGMENTS] = { -2, -25, 0, 31 };
|
|
||||||
unsigned int threshold[MAX_MB_SEGMENTS] = { 0, 100, 200, 300 };
|
|
||||||
|
|
||||||
const int internalq_trans[] = {
|
|
||||||
0, 1, 2, 3, 4, 5, 7, 8,
|
|
||||||
9, 10, 12, 13, 15, 17, 18, 19,
|
|
||||||
20, 21, 23, 24, 25, 26, 27, 28,
|
|
||||||
29, 30, 31, 33, 35, 37, 39, 41,
|
|
||||||
43, 45, 47, 49, 51, 53, 55, 57,
|
|
||||||
59, 61, 64, 67, 70, 73, 76, 79,
|
|
||||||
82, 85, 88, 91, 94, 97, 100, 103,
|
|
||||||
106, 109, 112, 115, 118, 121, 124, 127,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Initialize elements of cpi with valid defaults.
|
|
||||||
VP8_COMP cpi;
|
|
||||||
cpi.mb.e_mbd.mb_segement_abs_delta = SEGMENT_DELTADATA;
|
|
||||||
cpi.cyclic_refresh_mode_enabled = 0;
|
|
||||||
cpi.mb.e_mbd.segmentation_enabled = 0;
|
|
||||||
cpi.mb.e_mbd.update_mb_segmentation_map = 0;
|
|
||||||
cpi.mb.e_mbd.update_mb_segmentation_data = 0;
|
|
||||||
cpi.common.mb_rows = 240 >> 4;
|
|
||||||
cpi.common.mb_cols = 320 >> 4;
|
|
||||||
const int mbs = (cpi.common.mb_rows * cpi.common.mb_cols);
|
|
||||||
vpx_memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
|
|
||||||
|
|
||||||
// Segment map
|
|
||||||
cpi.segmentation_map = reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
|
|
||||||
|
|
||||||
// Allocate memory for the source memory map.
|
|
||||||
unsigned char *roi_map =
|
|
||||||
reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
|
|
||||||
vpx_memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
|
|
||||||
vpx_memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
|
|
||||||
vpx_memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
|
|
||||||
|
|
||||||
// Do a test call with valid parameters.
|
|
||||||
int roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
|
||||||
cpi.common.mb_cols, delta_q, delta_lf,
|
|
||||||
threshold);
|
|
||||||
EXPECT_EQ(0, roi_retval)
|
|
||||||
<< "vp8_set_roimap roi failed with default test parameters";
|
|
||||||
|
|
||||||
// Check that the values in the cpi structure get set as expected.
|
|
||||||
if (roi_retval == 0) {
|
|
||||||
// Check that the segment map got set.
|
|
||||||
const int mapcompare = memcmp(roi_map, cpi.segmentation_map, mbs);
|
|
||||||
EXPECT_EQ(0, mapcompare) << "segment map error";
|
|
||||||
|
|
||||||
// Check the q deltas (note the need to translate into
|
|
||||||
// the interanl range of 0-127.
|
|
||||||
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
|
|
||||||
const int transq = internalq_trans[abs(delta_q[i])];
|
|
||||||
if (abs(cpi.segment_feature_data[MB_LVL_ALT_Q][i]) != transq) {
|
|
||||||
EXPECT_EQ(transq, cpi.segment_feature_data[MB_LVL_ALT_Q][i])
|
|
||||||
<< "segment delta_q error";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check the loop filter deltas
|
|
||||||
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
|
|
||||||
if (cpi.segment_feature_data[MB_LVL_ALT_LF][i] != delta_lf[i]) {
|
|
||||||
EXPECT_EQ(delta_lf[i], cpi.segment_feature_data[MB_LVL_ALT_LF][i])
|
|
||||||
<< "segment delta_lf error";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check the breakout thresholds
|
|
||||||
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
|
|
||||||
unsigned int breakout =
|
|
||||||
static_cast<unsigned int>(cpi.segment_encode_breakout[i]);
|
|
||||||
|
|
||||||
if (threshold[i] != breakout) {
|
|
||||||
EXPECT_EQ(threshold[i], breakout)
|
|
||||||
<< "breakout threshold error";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Segmentation, and segmentation update flages should be set.
|
|
||||||
EXPECT_EQ(1, cpi.mb.e_mbd.segmentation_enabled)
|
|
||||||
<< "segmentation_enabled error";
|
|
||||||
EXPECT_EQ(1, cpi.mb.e_mbd.update_mb_segmentation_map)
|
|
||||||
<< "update_mb_segmentation_map error";
|
|
||||||
EXPECT_EQ(1, cpi.mb.e_mbd.update_mb_segmentation_data)
|
|
||||||
<< "update_mb_segmentation_data error";
|
|
||||||
|
|
||||||
|
|
||||||
// Try a range of delta q and lf parameters (some legal, some not)
|
|
||||||
for (int i = 0; i < 1000; ++i) {
|
|
||||||
int rand_deltas[4];
|
|
||||||
int deltas_valid;
|
|
||||||
rand_deltas[0] = rnd(160) - 80;
|
|
||||||
rand_deltas[1] = rnd(160) - 80;
|
|
||||||
rand_deltas[2] = rnd(160) - 80;
|
|
||||||
rand_deltas[3] = rnd(160) - 80;
|
|
||||||
|
|
||||||
deltas_valid = ((abs(rand_deltas[0]) <= 63) &&
|
|
||||||
(abs(rand_deltas[1]) <= 63) &&
|
|
||||||
(abs(rand_deltas[2]) <= 63) &&
|
|
||||||
(abs(rand_deltas[3]) <= 63)) ? 0 : -1;
|
|
||||||
|
|
||||||
// Test with random delta q values.
|
|
||||||
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
|
||||||
cpi.common.mb_cols, rand_deltas,
|
|
||||||
delta_lf, threshold);
|
|
||||||
EXPECT_EQ(deltas_valid, roi_retval) << "dq range check error";
|
|
||||||
|
|
||||||
// One delta_q error shown at a time
|
|
||||||
if (deltas_valid != roi_retval)
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Test with random loop filter values.
|
|
||||||
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
|
||||||
cpi.common.mb_cols, delta_q,
|
|
||||||
rand_deltas, threshold);
|
|
||||||
EXPECT_EQ(deltas_valid, roi_retval) << "dlf range check error";
|
|
||||||
|
|
||||||
// One delta loop filter error shown at a time
|
|
||||||
if (deltas_valid != roi_retval)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test that we report and error if cyclic refresh is enabled.
|
|
||||||
cpi.cyclic_refresh_mode_enabled = 1;
|
|
||||||
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
|
||||||
cpi.common.mb_cols, delta_q,
|
|
||||||
delta_lf, threshold);
|
|
||||||
EXPECT_EQ(-1, roi_retval) << "cyclic refresh check error";
|
|
||||||
cpi.cyclic_refresh_mode_enabled = 0;
|
|
||||||
|
|
||||||
// Test invalid number of rows or colums.
|
|
||||||
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows + 1,
|
|
||||||
cpi.common.mb_cols, delta_q,
|
|
||||||
delta_lf, threshold);
|
|
||||||
EXPECT_EQ(-1, roi_retval) << "MB rows bounds check error";
|
|
||||||
|
|
||||||
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
|
||||||
cpi.common.mb_cols - 1, delta_q,
|
|
||||||
delta_lf, threshold);
|
|
||||||
EXPECT_EQ(-1, roi_retval) << "MB cols bounds check error";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Free allocated memory
|
|
||||||
if (cpi.segmentation_map)
|
|
||||||
vpx_free(cpi.segmentation_map);
|
|
||||||
if (roi_map)
|
|
||||||
vpx_free(roi_map);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@@ -1,241 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 "test/acm_random.h"
|
|
||||||
#include "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#include "test/util.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
typedef void (*SixtapPredictFunc)(uint8_t *src_ptr,
|
|
||||||
int src_pixels_per_line,
|
|
||||||
int xoffset,
|
|
||||||
int yoffset,
|
|
||||||
uint8_t *dst_ptr,
|
|
||||||
int dst_pitch);
|
|
||||||
|
|
||||||
typedef std::tr1::tuple<int, int, SixtapPredictFunc> SixtapPredictParam;
|
|
||||||
|
|
||||||
class SixtapPredictTest
|
|
||||||
: public ::testing::TestWithParam<SixtapPredictParam> {
|
|
||||||
public:
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));
|
|
||||||
dst_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
|
|
||||||
dst_c_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
vpx_free(src_);
|
|
||||||
src_ = NULL;
|
|
||||||
vpx_free(dst_);
|
|
||||||
dst_ = NULL;
|
|
||||||
vpx_free(dst_c_);
|
|
||||||
dst_c_ = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void TearDown() {
|
|
||||||
libvpx_test::ClearSystemState();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// Make test arrays big enough for 16x16 functions. Six-tap filters
|
|
||||||
// need 5 extra pixels outside of the macroblock.
|
|
||||||
static const int kSrcStride = 21;
|
|
||||||
static const int kDstStride = 16;
|
|
||||||
static const int kDataAlignment = 16;
|
|
||||||
static const int kSrcSize = kSrcStride * kSrcStride + 1;
|
|
||||||
static const int kDstSize = kDstStride * kDstStride;
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
width_ = GET_PARAM(0);
|
|
||||||
height_ = GET_PARAM(1);
|
|
||||||
sixtap_predict_ = GET_PARAM(2);
|
|
||||||
memset(src_, 0, kSrcSize);
|
|
||||||
memset(dst_, 0, kDstSize);
|
|
||||||
memset(dst_c_, 0, kDstSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
int width_;
|
|
||||||
int height_;
|
|
||||||
SixtapPredictFunc sixtap_predict_;
|
|
||||||
// The src stores the macroblock we will filter on, and makes it 1 byte larger
|
|
||||||
// in order to test unaligned access. The result is stored in dst and dst_c(c
|
|
||||||
// reference code result).
|
|
||||||
static uint8_t* src_;
|
|
||||||
static uint8_t* dst_;
|
|
||||||
static uint8_t* dst_c_;
|
|
||||||
};
|
|
||||||
|
|
||||||
uint8_t* SixtapPredictTest::src_ = NULL;
|
|
||||||
uint8_t* SixtapPredictTest::dst_ = NULL;
|
|
||||||
uint8_t* SixtapPredictTest::dst_c_ = NULL;
|
|
||||||
|
|
||||||
TEST_P(SixtapPredictTest, TestWithPresetData) {
|
|
||||||
// Test input
|
|
||||||
static const uint8_t test_data[kSrcSize] = {
|
|
||||||
216, 184, 4, 191, 82, 92, 41, 0, 1, 226, 236, 172, 20, 182, 42, 226, 177,
|
|
||||||
79, 94, 77, 179, 203, 206, 198, 22, 192, 19, 75, 17, 192, 44, 233, 120,
|
|
||||||
48, 168, 203, 141, 210, 203, 143, 180, 184, 59, 201, 110, 102, 171, 32,
|
|
||||||
182, 10, 109, 105, 213, 60, 47, 236, 253, 67, 55, 14, 3, 99, 247, 124,
|
|
||||||
148, 159, 71, 34, 114, 19, 177, 38, 203, 237, 239, 58, 83, 155, 91, 10,
|
|
||||||
166, 201, 115, 124, 5, 163, 104, 2, 231, 160, 16, 234, 4, 8, 103, 153,
|
|
||||||
167, 174, 187, 26, 193, 109, 64, 141, 90, 48, 200, 174, 204, 36, 184,
|
|
||||||
114, 237, 43, 238, 242, 207, 86, 245, 182, 247, 6, 161, 251, 14, 8, 148,
|
|
||||||
182, 182, 79, 208, 120, 188, 17, 6, 23, 65, 206, 197, 13, 242, 126, 128,
|
|
||||||
224, 170, 110, 211, 121, 197, 200, 47, 188, 207, 208, 184, 221, 216, 76,
|
|
||||||
148, 143, 156, 100, 8, 89, 117, 14, 112, 183, 221, 54, 197, 208, 180, 69,
|
|
||||||
176, 94, 180, 131, 215, 121, 76, 7, 54, 28, 216, 238, 249, 176, 58, 142,
|
|
||||||
64, 215, 242, 72, 49, 104, 87, 161, 32, 52, 216, 230, 4, 141, 44, 181,
|
|
||||||
235, 224, 57, 195, 89, 134, 203, 144, 162, 163, 126, 156, 84, 185, 42,
|
|
||||||
148, 145, 29, 221, 194, 134, 52, 100, 166, 105, 60, 140, 110, 201, 184,
|
|
||||||
35, 181, 153, 93, 121, 243, 227, 68, 131, 134, 232, 2, 35, 60, 187, 77,
|
|
||||||
209, 76, 106, 174, 15, 241, 227, 115, 151, 77, 175, 36, 187, 121, 221,
|
|
||||||
223, 47, 118, 61, 168, 105, 32, 237, 236, 167, 213, 238, 202, 17, 170,
|
|
||||||
24, 226, 247, 131, 145, 6, 116, 117, 121, 11, 194, 41, 48, 126, 162, 13,
|
|
||||||
93, 209, 131, 154, 122, 237, 187, 103, 217, 99, 60, 200, 45, 78, 115, 69,
|
|
||||||
49, 106, 200, 194, 112, 60, 56, 234, 72, 251, 19, 120, 121, 182, 134, 215,
|
|
||||||
135, 10, 114, 2, 247, 46, 105, 209, 145, 165, 153, 191, 243, 12, 5, 36,
|
|
||||||
119, 206, 231, 231, 11, 32, 209, 83, 27, 229, 204, 149, 155, 83, 109, 35,
|
|
||||||
93, 223, 37, 84, 14, 142, 37, 160, 52, 191, 96, 40, 204, 101, 77, 67, 52,
|
|
||||||
53, 43, 63, 85, 253, 147, 113, 226, 96, 6, 125, 179, 115, 161, 17, 83,
|
|
||||||
198, 101, 98, 85, 139, 3, 137, 75, 99, 178, 23, 201, 255, 91, 253, 52,
|
|
||||||
134, 60, 138, 131, 208, 251, 101, 48, 2, 227, 228, 118, 132, 245, 202,
|
|
||||||
75, 91, 44, 160, 231, 47, 41, 50, 147, 220, 74, 92, 219, 165, 89, 16
|
|
||||||
};
|
|
||||||
|
|
||||||
// Expected result
|
|
||||||
static const uint8_t expected_dst[kDstSize] = {
|
|
||||||
117, 102, 74, 135, 42, 98, 175, 206, 70, 73, 222, 197, 50, 24, 39, 49, 38,
|
|
||||||
105, 90, 47, 169, 40, 171, 215, 200, 73, 109, 141, 53, 85, 177, 164, 79,
|
|
||||||
208, 124, 89, 212, 18, 81, 145, 151, 164, 217, 153, 91, 154, 102, 102,
|
|
||||||
159, 75, 164, 152, 136, 51, 213, 219, 186, 116, 193, 224, 186, 36, 231,
|
|
||||||
208, 84, 211, 155, 167, 35, 59, 42, 76, 216, 149, 73, 201, 78, 149, 184,
|
|
||||||
100, 96, 196, 189, 198, 188, 235, 195, 117, 129, 120, 129, 49, 25, 133,
|
|
||||||
113, 69, 221, 114, 70, 143, 99, 157, 108, 189, 140, 78, 6, 55, 65, 240,
|
|
||||||
255, 245, 184, 72, 90, 100, 116, 131, 39, 60, 234, 167, 33, 160, 88, 185,
|
|
||||||
200, 157, 159, 176, 127, 151, 138, 102, 168, 106, 170, 86, 82, 219, 189,
|
|
||||||
76, 33, 115, 197, 106, 96, 198, 136, 97, 141, 237, 151, 98, 137, 191,
|
|
||||||
185, 2, 57, 95, 142, 91, 255, 185, 97, 137, 76, 162, 94, 173, 131, 193,
|
|
||||||
161, 81, 106, 72, 135, 222, 234, 137, 66, 137, 106, 243, 210, 147, 95,
|
|
||||||
15, 137, 110, 85, 66, 16, 96, 167, 147, 150, 173, 203, 140, 118, 196,
|
|
||||||
84, 147, 160, 19, 95, 101, 123, 74, 132, 202, 82, 166, 12, 131, 166,
|
|
||||||
189, 170, 159, 85, 79, 66, 57, 152, 132, 203, 194, 0, 1, 56, 146, 180,
|
|
||||||
224, 156, 28, 83, 181, 79, 76, 80, 46, 160, 175, 59, 106, 43, 87, 75,
|
|
||||||
136, 85, 189, 46, 71, 200, 90
|
|
||||||
};
|
|
||||||
|
|
||||||
uint8_t *src = const_cast<uint8_t*>(test_data);
|
|
||||||
|
|
||||||
ASM_REGISTER_STATE_CHECK(
|
|
||||||
sixtap_predict_(&src[kSrcStride * 2 + 2 + 1], kSrcStride,
|
|
||||||
2, 2, dst_, kDstStride));
|
|
||||||
|
|
||||||
for (int i = 0; i < height_; ++i)
|
|
||||||
for (int j = 0; j < width_; ++j)
|
|
||||||
ASSERT_EQ(expected_dst[i * kDstStride + j], dst_[i * kDstStride + j])
|
|
||||||
<< "i==" << (i * width_ + j);
|
|
||||||
}
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
TEST_P(SixtapPredictTest, TestWithRandomData) {
|
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
|
||||||
for (int i = 0; i < kSrcSize; ++i)
|
|
||||||
src_[i] = rnd.Rand8();
|
|
||||||
|
|
||||||
// Run tests for all possible offsets.
|
|
||||||
for (int xoffset = 0; xoffset < 8; ++xoffset) {
|
|
||||||
for (int yoffset = 0; yoffset < 8; ++yoffset) {
|
|
||||||
// Call c reference function.
|
|
||||||
// Move start point to next pixel to test if the function reads
|
|
||||||
// unaligned data correctly.
|
|
||||||
vp8_sixtap_predict16x16_c(&src_[kSrcStride * 2 + 2 + 1], kSrcStride,
|
|
||||||
xoffset, yoffset, dst_c_, kDstStride);
|
|
||||||
|
|
||||||
// Run test.
|
|
||||||
ASM_REGISTER_STATE_CHECK(
|
|
||||||
sixtap_predict_(&src_[kSrcStride * 2 + 2 + 1], kSrcStride,
|
|
||||||
xoffset, yoffset, dst_, kDstStride));
|
|
||||||
|
|
||||||
for (int i = 0; i < height_; ++i)
|
|
||||||
for (int j = 0; j < width_; ++j)
|
|
||||||
ASSERT_EQ(dst_c_[i * kDstStride + j], dst_[i * kDstStride + j])
|
|
||||||
<< "i==" << (i * width_ + j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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(
|
|
||||||
C, SixtapPredictTest, ::testing::Values(
|
|
||||||
make_tuple(16, 16, sixtap_16x16_c),
|
|
||||||
make_tuple(8, 8, sixtap_8x8_c),
|
|
||||||
make_tuple(8, 4, sixtap_8x4_c),
|
|
||||||
make_tuple(4, 4, sixtap_4x4_c)));
|
|
||||||
#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(
|
|
||||||
DISABLED_NEON, SixtapPredictTest, ::testing::Values(
|
|
||||||
make_tuple(16, 16, sixtap_16x16_neon),
|
|
||||||
make_tuple(8, 8, sixtap_8x8_neon),
|
|
||||||
make_tuple(8, 4, sixtap_8x4_neon)));
|
|
||||||
#endif
|
|
||||||
#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(
|
|
||||||
MMX, SixtapPredictTest, ::testing::Values(
|
|
||||||
make_tuple(16, 16, sixtap_16x16_mmx),
|
|
||||||
make_tuple(8, 8, sixtap_8x8_mmx),
|
|
||||||
make_tuple(8, 4, sixtap_8x4_mmx),
|
|
||||||
make_tuple(4, 4, sixtap_4x4_mmx)));
|
|
||||||
#endif
|
|
||||||
#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(
|
|
||||||
SSE2, SixtapPredictTest, ::testing::Values(
|
|
||||||
make_tuple(16, 16, sixtap_16x16_sse2),
|
|
||||||
make_tuple(8, 8, sixtap_8x8_sse2),
|
|
||||||
make_tuple(8, 4, sixtap_8x4_sse2)));
|
|
||||||
#endif
|
|
||||||
#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(
|
|
||||||
SSSE3, SixtapPredictTest, ::testing::Values(
|
|
||||||
make_tuple(16, 16, sixtap_16x16_ssse3),
|
|
||||||
make_tuple(8, 8, sixtap_8x8_ssse3),
|
|
||||||
make_tuple(8, 4, sixtap_8x4_ssse3),
|
|
||||||
make_tuple(4, 4, sixtap_4x4_ssse3)));
|
|
||||||
#endif
|
|
||||||
} // namespace
|
|
||||||
@@ -9,20 +9,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
#include "test/register_state_check.h"
|
#include "test/register_state_check.h"
|
||||||
#include "./vpx_config.h"
|
#include "vp10/common/blockd.h"
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vp8/common/blockd.h"
|
|
||||||
#include "vp8/encoder/block.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
typedef void (*SubtractBlockFunc)(BLOCK *be, BLOCKD *bd, int pitch);
|
typedef void (*SubtractFunc)(int rows, int cols,
|
||||||
|
int16_t *diff_ptr, ptrdiff_t diff_stride,
|
||||||
|
const uint8_t *src_ptr, ptrdiff_t src_stride,
|
||||||
|
const uint8_t *pred_ptr, ptrdiff_t pred_stride);
|
||||||
|
|
||||||
namespace {
|
namespace vp9 {
|
||||||
|
|
||||||
class SubtractBlockTest : public ::testing::TestWithParam<SubtractBlockFunc> {
|
class VP9SubtractBlockTest : public ::testing::TestWithParam<SubtractFunc> {
|
||||||
public:
|
public:
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
libvpx_test::ClearSystemState();
|
libvpx_test::ClearSystemState();
|
||||||
@@ -31,93 +35,75 @@ class SubtractBlockTest : public ::testing::TestWithParam<SubtractBlockFunc> {
|
|||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
TEST_P(SubtractBlockTest, SimpleSubtract) {
|
TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
BLOCK be;
|
|
||||||
BLOCKD bd;
|
|
||||||
// in libvpx, this stride is always 16
|
|
||||||
const int kDiffPredStride = 16;
|
|
||||||
const int kSrcStride[] = {32, 16, 8, 4, 0};
|
|
||||||
const int kBlockWidth = 4;
|
|
||||||
const int kBlockHeight = 4;
|
|
||||||
|
|
||||||
// Allocate... align to 16 for mmx/sse tests
|
// FIXME(rbultje) split in its own file
|
||||||
uint8_t *source = reinterpret_cast<uint8_t*>(
|
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
|
||||||
vpx_memalign(16, kBlockHeight * kSrcStride[0] * sizeof(*source)));
|
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
|
||||||
be.src_diff = reinterpret_cast<int16_t*>(
|
const int block_width = 4 * num_4x4_blocks_wide_lookup[bsize];
|
||||||
vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*be.src_diff)));
|
const int block_height = 4 * num_4x4_blocks_high_lookup[bsize];
|
||||||
bd.predictor = reinterpret_cast<unsigned char*>(
|
int16_t *diff = reinterpret_cast<int16_t *>(
|
||||||
vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*bd.predictor)));
|
vpx_memalign(16, sizeof(*diff) * block_width * block_height * 2));
|
||||||
|
uint8_t *pred = reinterpret_cast<uint8_t *>(
|
||||||
|
vpx_memalign(16, block_width * block_height * 2));
|
||||||
|
uint8_t *src = reinterpret_cast<uint8_t *>(
|
||||||
|
vpx_memalign(16, block_width * block_height * 2));
|
||||||
|
|
||||||
for (int i = 0; kSrcStride[i] > 0; ++i) {
|
for (int n = 0; n < 100; n++) {
|
||||||
// start at block0
|
for (int r = 0; r < block_height; ++r) {
|
||||||
be.src = 0;
|
for (int c = 0; c < block_width * 2; ++c) {
|
||||||
be.base_src = &source;
|
src[r * block_width * 2 + c] = rnd.Rand8();
|
||||||
be.src_stride = kSrcStride[i];
|
pred[r * block_width * 2 + c] = rnd.Rand8();
|
||||||
|
|
||||||
// set difference
|
|
||||||
int16_t *src_diff = be.src_diff;
|
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
|
||||||
src_diff[c] = static_cast<int16_t>(0xa5a5u);
|
|
||||||
}
|
}
|
||||||
src_diff += kDiffPredStride;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set destination
|
GetParam()(block_height, block_width, diff, block_width,
|
||||||
uint8_t *base_src = *be.base_src;
|
src, block_width, pred, block_width);
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
for (int r = 0; r < block_height; ++r) {
|
||||||
base_src[c] = rnd.Rand8();
|
for (int c = 0; c < block_width; ++c) {
|
||||||
|
EXPECT_EQ(diff[r * block_width + c],
|
||||||
|
(src[r * block_width + c] -
|
||||||
|
pred[r * block_width + c])) << "r = " << r
|
||||||
|
<< ", c = " << c
|
||||||
|
<< ", bs = " << bsize;
|
||||||
}
|
}
|
||||||
base_src += be.src_stride;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set predictor
|
GetParam()(block_height, block_width, diff, block_width * 2,
|
||||||
uint8_t *predictor = bd.predictor;
|
src, block_width * 2, pred, block_width * 2);
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
|
||||||
predictor[c] = rnd.Rand8();
|
|
||||||
}
|
|
||||||
predictor += kDiffPredStride;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASM_REGISTER_STATE_CHECK(GetParam()(&be, &bd, kDiffPredStride));
|
for (int r = 0; r < block_height; ++r) {
|
||||||
|
for (int c = 0; c < block_width; ++c) {
|
||||||
base_src = *be.base_src;
|
EXPECT_EQ(diff[r * block_width * 2 + c],
|
||||||
src_diff = be.src_diff;
|
(src[r * block_width * 2 + c] -
|
||||||
predictor = bd.predictor;
|
pred[r * block_width * 2 + c])) << "r = " << r
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
<< ", c = " << c
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
<< ", bs = " << bsize;
|
||||||
EXPECT_EQ(base_src[c], (src_diff[c] + predictor[c])) << "r = " << r
|
|
||||||
<< ", c = " << c;
|
|
||||||
}
|
|
||||||
src_diff += kDiffPredStride;
|
|
||||||
predictor += kDiffPredStride;
|
|
||||||
base_src += be.src_stride;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vpx_free(be.src_diff);
|
}
|
||||||
vpx_free(source);
|
vpx_free(diff);
|
||||||
vpx_free(bd.predictor);
|
vpx_free(pred);
|
||||||
|
vpx_free(src);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, SubtractBlockTest,
|
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
|
||||||
::testing::Values(vp8_subtract_b_c));
|
::testing::Values(vpx_subtract_block_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
|
||||||
|
::testing::Values(vpx_subtract_block_sse2));
|
||||||
|
#endif
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, SubtractBlockTest,
|
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
|
||||||
::testing::Values(vp8_subtract_b_neon));
|
::testing::Values(vpx_subtract_block_neon));
|
||||||
|
#endif
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, VP9SubtractBlockTest,
|
||||||
|
::testing::Values(vpx_subtract_block_msa));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_MMX
|
} // namespace vp9
|
||||||
INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest,
|
|
||||||
::testing::Values(vp8_subtract_b_mmx));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest,
|
|
||||||
::testing::Values(vp8_subtract_b_sse2));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // 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,6 +103,7 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
|
|||||||
EXPECT_EQ(sf_count_, 1);
|
EXPECT_EQ(sf_count_, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_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
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "test/decode_test_driver.h"
|
#include "test/decode_test_driver.h"
|
||||||
#include "test/i420_video_source.h"
|
#include "test/i420_video_source.h"
|
||||||
|
|
||||||
#include "vp9/decoder/vp9_decoder.h"
|
#include "vp10/decoder/decoder.h"
|
||||||
|
|
||||||
#include "vpx/svc_context.h"
|
#include "vpx/svc_context.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
@@ -63,6 +63,9 @@ class SvcTest : public ::testing::Test {
|
|||||||
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
|
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
|
||||||
VP9CodecFactory codec_factory;
|
VP9CodecFactory codec_factory;
|
||||||
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
|
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
|
||||||
|
|
||||||
|
tile_columns_ = 0;
|
||||||
|
tile_rows_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
@@ -75,6 +78,8 @@ class SvcTest : public ::testing::Test {
|
|||||||
vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
|
vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
|
||||||
EXPECT_EQ(VPX_CODEC_OK, res);
|
EXPECT_EQ(VPX_CODEC_OK, res);
|
||||||
vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test faster
|
vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test faster
|
||||||
|
vpx_codec_control(&codec_, VP9E_SET_TILE_COLUMNS, tile_columns_);
|
||||||
|
vpx_codec_control(&codec_, VP9E_SET_TILE_ROWS, tile_rows_);
|
||||||
codec_initialized_ = true;
|
codec_initialized_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,7 +113,8 @@ class SvcTest : public ::testing::Test {
|
|||||||
codec_enc_.g_pass = VPX_RC_FIRST_PASS;
|
codec_enc_.g_pass = VPX_RC_FIRST_PASS;
|
||||||
InitializeEncoder();
|
InitializeEncoder();
|
||||||
|
|
||||||
libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
|
libvpx_test::I420VideoSource video(test_file_name_,
|
||||||
|
codec_enc_.g_w, codec_enc_.g_h,
|
||||||
codec_enc_.g_timebase.den,
|
codec_enc_.g_timebase.den,
|
||||||
codec_enc_.g_timebase.num, 0, 30);
|
codec_enc_.g_timebase.num, 0, 30);
|
||||||
video.Begin();
|
video.Begin();
|
||||||
@@ -176,7 +182,8 @@ class SvcTest : public ::testing::Test {
|
|||||||
}
|
}
|
||||||
InitializeEncoder();
|
InitializeEncoder();
|
||||||
|
|
||||||
libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
|
libvpx_test::I420VideoSource video(test_file_name_,
|
||||||
|
codec_enc_.g_w, codec_enc_.g_h,
|
||||||
codec_enc_.g_timebase.den,
|
codec_enc_.g_timebase.den,
|
||||||
codec_enc_.g_timebase.num, 0, 30);
|
codec_enc_.g_timebase.num, 0, 30);
|
||||||
video.Begin();
|
video.Begin();
|
||||||
@@ -310,6 +317,8 @@ class SvcTest : public ::testing::Test {
|
|||||||
std::string test_file_name_;
|
std::string test_file_name_;
|
||||||
bool codec_initialized_;
|
bool codec_initialized_;
|
||||||
Decoder *decoder_;
|
Decoder *decoder_;
|
||||||
|
int tile_columns_;
|
||||||
|
int tile_rows_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(SvcTest, SvcInit) {
|
TEST_F(SvcTest, SvcInit) {
|
||||||
@@ -444,6 +453,7 @@ TEST_F(SvcTest, OnePassEncodeOneFrame) {
|
|||||||
|
|
||||||
TEST_F(SvcTest, OnePassEncodeThreeFrames) {
|
TEST_F(SvcTest, OnePassEncodeThreeFrames) {
|
||||||
codec_enc_.g_pass = VPX_RC_ONE_PASS;
|
codec_enc_.g_pass = VPX_RC_ONE_PASS;
|
||||||
|
codec_enc_.g_lag_in_frames = 0;
|
||||||
vpx_fixed_buf outputs[3];
|
vpx_fixed_buf outputs[3];
|
||||||
memset(&outputs[0], 0, sizeof(outputs));
|
memset(&outputs[0], 0, sizeof(outputs));
|
||||||
Pass2EncodeNFrames(NULL, 3, 2, &outputs[0]);
|
Pass2EncodeNFrames(NULL, 3, 2, &outputs[0]);
|
||||||
@@ -737,4 +747,51 @@ TEST_F(SvcTest,
|
|||||||
FreeBitstreamBuffers(&outputs[0], 10);
|
FreeBitstreamBuffers(&outputs[0], 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithTiles) {
|
||||||
|
// First pass encode
|
||||||
|
std::string stats_buf;
|
||||||
|
vpx_svc_set_options(&svc_, "scale-factors=1/1");
|
||||||
|
svc_.temporal_layers = 2;
|
||||||
|
Pass1EncodeNFrames(10, 1, &stats_buf);
|
||||||
|
|
||||||
|
// Second pass encode
|
||||||
|
codec_enc_.g_pass = VPX_RC_LAST_PASS;
|
||||||
|
svc_.temporal_layers = 2;
|
||||||
|
vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1");
|
||||||
|
codec_enc_.g_w = 704;
|
||||||
|
codec_enc_.g_h = 144;
|
||||||
|
tile_columns_ = 1;
|
||||||
|
tile_rows_ = 1;
|
||||||
|
vpx_fixed_buf outputs[10];
|
||||||
|
memset(&outputs[0], 0, sizeof(outputs));
|
||||||
|
Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]);
|
||||||
|
DecodeNFrames(&outputs[0], 10);
|
||||||
|
FreeBitstreamBuffers(&outputs[0], 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(SvcTest,
|
||||||
|
TwoPassEncode2TemporalLayersWithMultipleFrameContextsAndTiles) {
|
||||||
|
// First pass encode
|
||||||
|
std::string stats_buf;
|
||||||
|
vpx_svc_set_options(&svc_, "scale-factors=1/1");
|
||||||
|
svc_.temporal_layers = 2;
|
||||||
|
Pass1EncodeNFrames(10, 1, &stats_buf);
|
||||||
|
|
||||||
|
// Second pass encode
|
||||||
|
codec_enc_.g_pass = VPX_RC_LAST_PASS;
|
||||||
|
svc_.temporal_layers = 2;
|
||||||
|
codec_enc_.g_error_resilient = 0;
|
||||||
|
codec_enc_.g_w = 704;
|
||||||
|
codec_enc_.g_h = 144;
|
||||||
|
tile_columns_ = 1;
|
||||||
|
tile_rows_ = 1;
|
||||||
|
vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1 "
|
||||||
|
"multi-frame-contexts=1");
|
||||||
|
vpx_fixed_buf outputs[10];
|
||||||
|
memset(&outputs[0], 0, sizeof(outputs));
|
||||||
|
Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]);
|
||||||
|
DecodeNFrames(&outputs[0], 10);
|
||||||
|
FreeBitstreamBuffers(&outputs[0], 10);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -12,13 +12,15 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_420.y4m
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_422.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_422.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_440.yuv
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_12_440.yuv
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_420_a10-1.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_420.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_420.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_422.y4m
|
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) += niklas_1280_720_30.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_credits.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += niklas_1280_720_30.y4m
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += rush_hour_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
||||||
|
|
||||||
# Test vectors
|
# Test vectors
|
||||||
@@ -416,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
|
||||||
@@ -640,6 +654,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
|
||||||
@@ -666,7 +708,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-01.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-01.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-01.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm.md5
|
||||||
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
|
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-12bit-yuv420.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-12bit-yuv420.webm
|
||||||
@@ -683,11 +725,11 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv444.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv444.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv444.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
|
||||||
endif # CONFIG_VP9_HIGHBITDEPTH
|
endif # CONFIG_VPX_HIGHBITDEPTH
|
||||||
|
|
||||||
# Invalid files for testing libvpx error checking.
|
# Invalid files for testing libvpx error checking.
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v2.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v2.webm.res
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm.res
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm.res
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm.res
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm
|
||||||
@@ -767,3 +809,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
|
||||||
|
|||||||
1578
test/test-data.sha1
1578
test/test-data.sha1
File diff suppressed because it is too large
Load Diff
117
test/test.mk
117
test/test.mk
@@ -22,27 +22,19 @@ 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) += 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
|
##TODO(jimbankoski): Figure out why resize is failing.
|
||||||
|
##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_VP10_ENCODER) += active_map_refresh_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += active_map_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += borders_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += cpu_speed_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += frame_size_tests.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += byte_alignment_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += lossless_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += end_to_end_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += ethread_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_ENCODER) += active_map_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) += frame_size_tests.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_lossless_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_end_to_end_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc
|
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
||||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
||||||
@@ -73,13 +65,13 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += test_vector_test.cc
|
|||||||
|
|
||||||
# Currently we only support decoder perf tests for vp9. Also they read from WebM
|
# Currently we only support decoder perf tests for vp9. Also they read from WebM
|
||||||
# files, so WebM IO is required.
|
# files, so WebM IO is required.
|
||||||
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER)$(CONFIG_WEBM_IO), \
|
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP10_DECODER)$(CONFIG_WEBM_IO), \
|
||||||
yesyesyes)
|
yesyesyes)
|
||||||
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
|
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# encode perf tests are vp9 only
|
# encode perf tests are vp9 only
|
||||||
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_VP9_ENCODER), yesyes)
|
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_VP10_ENCODER), yesyes)
|
||||||
LIBVPX_TEST_SRCS-yes += encode_perf_test.cc
|
LIBVPX_TEST_SRCS-yes += encode_perf_test.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -91,75 +83,58 @@ endif
|
|||||||
##
|
##
|
||||||
ifeq ($(CONFIG_SHARED),)
|
ifeq ($(CONFIG_SHARED),)
|
||||||
|
|
||||||
## VP8
|
## VP10
|
||||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
ifeq ($(CONFIG_VP10),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_VP10_ENCODER)$(CONFIG_VP10_DECODER),yesyes)
|
||||||
LIBVPX_TEST_SRCS-yes += vp8_boolcoder_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += subtract_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) += quantize_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 += vpx_scale_test.cc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_TEMPORAL_DENOISING),yesyes)
|
|
||||||
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp8_denoiser_sse2_test.cc
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif # VP8
|
|
||||||
|
|
||||||
## VP9
|
|
||||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
|
|
||||||
|
|
||||||
# These tests require both the encoder and decoder to be built.
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
|
|
||||||
# IDCT test currently depends on FDCT function
|
# IDCT test currently depends on FDCT function
|
||||||
LIBVPX_TEST_SRCS-yes += idct8x8_test.cc
|
LIBVPX_TEST_SRCS-yes += idct8x8_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += partial_idct_test.cc
|
LIBVPX_TEST_SRCS-yes += partial_idct_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += superframe_test.cc
|
LIBVPX_TEST_SRCS-yes += superframe_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += tile_independence_test.cc
|
LIBVPX_TEST_SRCS-yes += tile_independence_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
|
LIBVPX_TEST_SRCS-yes += boolcoder_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
|
LIBVPX_TEST_SRCS-yes += 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-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
|
LIBVPX_TEST_SRCS-yes += intrapred_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += dct16x16_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += dct32x32_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += fdct4x4_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += fdct8x8_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += variance_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += quantize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += lpf_8_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += 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_quantize_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += vp9_intrapred_test.cc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
ifeq ($(CONFIG_VP10_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) += consistency_test.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
|
ifeq ($(CONFIG_VP10_ENCODER)$(CONFIG_VP10_TEMPORAL_DENOISING),yesyes)
|
||||||
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp9_denoiser_sse2_test.cc
|
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += denoiser_sse2_test.cc
|
||||||
endif
|
endif
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += arf_freq_test.cc
|
||||||
|
|
||||||
endif # VP9
|
LIBVPX_TEST_SRCS-yes += vp10_inv_txfm_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_dct_test.cc
|
||||||
|
|
||||||
|
endif # VP10
|
||||||
|
|
||||||
|
## Multi-codec / unconditional whitebox tests.
|
||||||
|
|
||||||
|
ifeq ($(findstring yes,$(CONFIG_VP10_ENCODER)$(CONFIG_VP10_ENCODER)),yes)
|
||||||
|
LIBVPX_TEST_SRCS-yes += avg_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
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
|
||||||
|
|
||||||
include $(SRC_PATH_BARE)/test/test-data.mk
|
include $(SRC_PATH_BARE)/test/test-data.mk
|
||||||
|
|||||||
96
test/test.mk.bk
Normal file
96
test/test.mk.bk
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
LIBVPX_TEST_SRCS-yes += acm_random.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += clear_system_state.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += codec_factory.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += md5_helper.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += register_state_check.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += test.mk
|
||||||
|
LIBVPX_TEST_SRCS-yes += test_libvpx.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += test_vectors.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += test_vectors.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += util.h
|
||||||
|
LIBVPX_TEST_SRCS-yes += video_source.h
|
||||||
|
|
||||||
|
##
|
||||||
|
## BLACK BOX TESTS
|
||||||
|
##
|
||||||
|
## Black box tests only use the public API.
|
||||||
|
##
|
||||||
|
LIBVPX_TEST_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += ../y4minput.h ../y4minput.c
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += error_resilience_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += i420_video_source.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_video_source.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += yuv_video_source.h
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += encode_test_driver.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += encode_test_driver.h
|
||||||
|
|
||||||
|
## IVF writing.
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += ../ivfenc.c ../ivfenc.h
|
||||||
|
|
||||||
|
## Y4m parsing.
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_test.cc ../y4menc.c ../y4menc.h
|
||||||
|
|
||||||
|
## WebM Parsing
|
||||||
|
ifeq ($(CONFIG_WEBM_IO), yes)
|
||||||
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser.cpp
|
||||||
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvreader.cpp
|
||||||
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser.hpp
|
||||||
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvreader.hpp
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += $(LIBWEBM_PARSER_SRCS)
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../tools_common.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += webm_video_source.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_skip_loopfilter_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += decode_api_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += test_vector_test.cc
|
||||||
|
|
||||||
|
# Currently we only support decoder perf tests for vp9. Also they read from WebM
|
||||||
|
# files, so WebM IO is required.
|
||||||
|
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP10_DECODER)$(CONFIG_WEBM_IO), \
|
||||||
|
yesyesyes)
|
||||||
|
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
|
# encode perf tests are vp9 only
|
||||||
|
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_VP10_ENCODER), yesyes)
|
||||||
|
LIBVPX_TEST_SRCS-yes += encode_perf_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
|
##
|
||||||
|
## WHITE BOX TESTS
|
||||||
|
##
|
||||||
|
## Whitebox tests invoke functions not exposed via the public API. Certain
|
||||||
|
## shared library builds don't make these functions accessible.
|
||||||
|
##
|
||||||
|
ifeq ($(CONFIG_SHARED),)
|
||||||
|
|
||||||
|
|
||||||
|
## VP10
|
||||||
|
ifeq ($(CONFIG_VP10),yes)
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-yes += vp10_inv_txfm_test.cc
|
||||||
|
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
|
||||||
|
|
||||||
|
include $(SRC_PATH_BARE)/test/test-data.mk
|
||||||
372
test/test_intra_pred_speed.cc
Normal file
372
test/test_intra_pred_speed.cc
Normal file
@@ -0,0 +1,372 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
// Test and time VPX intra-predictor functions
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/md5_helper.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_ports/mem.h"
|
||||||
|
#include "vpx_ports/vpx_timer.h"
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
typedef void (*VpxPredFunc)(uint8_t *dst, ptrdiff_t y_stride,
|
||||||
|
const uint8_t *above, const uint8_t *left);
|
||||||
|
|
||||||
|
const int kNumVp9IntraPredFuncs = 13;
|
||||||
|
const char *kVp9IntraPredNames[kNumVp9IntraPredFuncs] = {
|
||||||
|
"DC_PRED", "DC_LEFT_PRED", "DC_TOP_PRED", "DC_128_PRED", "V_PRED", "H_PRED",
|
||||||
|
"D45_PRED", "D135_PRED", "D117_PRED", "D153_PRED", "D207_PRED", "D63_PRED",
|
||||||
|
"TM_PRED"
|
||||||
|
};
|
||||||
|
|
||||||
|
void TestIntraPred(const char name[], VpxPredFunc const *pred_funcs,
|
||||||
|
const char *const pred_func_names[], int num_funcs,
|
||||||
|
const char *const signatures[], int block_size,
|
||||||
|
int num_pixels_per_test) {
|
||||||
|
libvpx_test::ACMRandom rnd(libvpx_test::ACMRandom::DeterministicSeed());
|
||||||
|
const int kBPS = 32;
|
||||||
|
const int kTotalPixels = 32 * kBPS;
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, src[kTotalPixels]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, ref_src[kTotalPixels]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, left[kBPS]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, above_mem[2 * kBPS + 16]);
|
||||||
|
uint8_t *const above = above_mem + 16;
|
||||||
|
for (int i = 0; i < kTotalPixels; ++i) ref_src[i] = rnd.Rand8();
|
||||||
|
for (int i = 0; i < kBPS; ++i) left[i] = rnd.Rand8();
|
||||||
|
for (int i = -1; i < kBPS; ++i) above[i] = rnd.Rand8();
|
||||||
|
const int kNumTests = static_cast<int>(2.e10 / num_pixels_per_test);
|
||||||
|
|
||||||
|
// some code assumes the top row has been extended:
|
||||||
|
// d45/d63 C-code, for instance, but not the assembly.
|
||||||
|
// TODO(jzern): this style of extension isn't strictly necessary.
|
||||||
|
ASSERT_LE(block_size, kBPS);
|
||||||
|
memset(above + block_size, above[block_size - 1], 2 * kBPS - block_size);
|
||||||
|
|
||||||
|
for (int k = 0; k < num_funcs; ++k) {
|
||||||
|
if (pred_funcs[k] == NULL) continue;
|
||||||
|
memcpy(src, ref_src, sizeof(src));
|
||||||
|
vpx_usec_timer timer;
|
||||||
|
vpx_usec_timer_start(&timer);
|
||||||
|
for (int num_tests = 0; num_tests < kNumTests; ++num_tests) {
|
||||||
|
pred_funcs[k](src, kBPS, above, left);
|
||||||
|
}
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
vpx_usec_timer_mark(&timer);
|
||||||
|
const int elapsed_time =
|
||||||
|
static_cast<int>(vpx_usec_timer_elapsed(&timer) / 1000);
|
||||||
|
libvpx_test::MD5 md5;
|
||||||
|
md5.Add(src, sizeof(src));
|
||||||
|
printf("Mode %s[%12s]: %5d ms MD5: %s\n", name, pred_func_names[k],
|
||||||
|
elapsed_time, md5.Get());
|
||||||
|
EXPECT_STREQ(signatures[k], md5.Get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestIntraPred4(VpxPredFunc const *pred_funcs) {
|
||||||
|
static const int kNumVp9IntraFuncs = 13;
|
||||||
|
static const char *const kSignatures[kNumVp9IntraFuncs] = {
|
||||||
|
"4334156168b34ab599d9b5b30f522fe9",
|
||||||
|
"bc4649d5ba47c7ff178d92e475960fb0",
|
||||||
|
"8d316e5933326dcac24e1064794b5d12",
|
||||||
|
"a27270fed024eafd762c95de85f4da51",
|
||||||
|
"c33dff000d4256c2b8f3bf9e9bab14d2",
|
||||||
|
"44d8cddc2ad8f79b8ed3306051722b4f",
|
||||||
|
"eb54839b2bad6699d8946f01ec041cd0",
|
||||||
|
"ecb0d56ae5f677ea45127ce9d5c058e4",
|
||||||
|
"0b7936841f6813da818275944895b574",
|
||||||
|
"9117972ef64f91a58ff73e1731c81db2",
|
||||||
|
"c56d5e8c729e46825f46dd5d3b5d508a",
|
||||||
|
"c0889e2039bcf7bcb5d2f33cdca69adc",
|
||||||
|
"309a618577b27c648f9c5ee45252bc8f",
|
||||||
|
};
|
||||||
|
TestIntraPred("Intra4", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
|
||||||
|
kSignatures, 4, 4 * 4 * kNumVp9IntraFuncs);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestIntraPred8(VpxPredFunc const *pred_funcs) {
|
||||||
|
static const int kNumVp9IntraFuncs = 13;
|
||||||
|
static const char *const kSignatures[kNumVp9IntraFuncs] = {
|
||||||
|
"7694ddeeefed887faf9d339d18850928",
|
||||||
|
"7d726b1213591b99f736be6dec65065b",
|
||||||
|
"19c5711281357a485591aaf9c96c0a67",
|
||||||
|
"ba6b66877a089e71cd938e3b8c40caac",
|
||||||
|
"802440c93317e0f8ba93fab02ef74265",
|
||||||
|
"9e09a47a15deb0b9d8372824f9805080",
|
||||||
|
"b7c2d8c662268c0c427da412d7b0311d",
|
||||||
|
"78339c1c60bb1d67d248ab8c4da08b7f",
|
||||||
|
"5c97d70f7d47de1882a6cd86c165c8a9",
|
||||||
|
"8182bf60688b42205acd95e59e967157",
|
||||||
|
"08323400005a297f16d7e57e7fe1eaac",
|
||||||
|
"95f7bfc262329a5849eda66d8f7c68ce",
|
||||||
|
"815b75c8e0d91cc1ae766dc5d3e445a3",
|
||||||
|
};
|
||||||
|
TestIntraPred("Intra8", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
|
||||||
|
kSignatures, 8, 8 * 8 * kNumVp9IntraFuncs);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestIntraPred16(VpxPredFunc const *pred_funcs) {
|
||||||
|
static const int kNumVp9IntraFuncs = 13;
|
||||||
|
static const char *const kSignatures[kNumVp9IntraFuncs] = {
|
||||||
|
"b40dbb555d5d16a043dc361e6694fe53",
|
||||||
|
"fb08118cee3b6405d64c1fd68be878c6",
|
||||||
|
"6c190f341475c837cc38c2e566b64875",
|
||||||
|
"db5c34ccbe2c7f595d9b08b0dc2c698c",
|
||||||
|
"a62cbfd153a1f0b9fed13e62b8408a7a",
|
||||||
|
"143df5b4c89335e281103f610f5052e4",
|
||||||
|
"d87feb124107cdf2cfb147655aa0bb3c",
|
||||||
|
"7841fae7d4d47b519322e6a03eeed9dc",
|
||||||
|
"f6ebed3f71cbcf8d6d0516ce87e11093",
|
||||||
|
"3cc480297dbfeed01a1c2d78dd03d0c5",
|
||||||
|
"b9f69fa6532b372c545397dcb78ef311",
|
||||||
|
"a8fe1c70432f09d0c20c67bdb6432c4d",
|
||||||
|
"b8a41aa968ec108af447af4217cba91b",
|
||||||
|
};
|
||||||
|
TestIntraPred("Intra16", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
|
||||||
|
kSignatures, 16, 16 * 16 * kNumVp9IntraFuncs);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestIntraPred32(VpxPredFunc const *pred_funcs) {
|
||||||
|
static const int kNumVp9IntraFuncs = 13;
|
||||||
|
static const char *const kSignatures[kNumVp9IntraFuncs] = {
|
||||||
|
"558541656d84f9ae7896db655826febe",
|
||||||
|
"b3587a1f9a01495fa38c8cd3c8e2a1bf",
|
||||||
|
"4c6501e64f25aacc55a2a16c7e8f0255",
|
||||||
|
"b3b01379ba08916ef6b1b35f7d9ad51c",
|
||||||
|
"0f1eb38b6cbddb3d496199ef9f329071",
|
||||||
|
"911c06efb9ed1c3b4c104b232b55812f",
|
||||||
|
"9225beb0ddfa7a1d24eaa1be430a6654",
|
||||||
|
"0a6d584a44f8db9aa7ade2e2fdb9fc9e",
|
||||||
|
"b01c9076525216925f3456f034fb6eee",
|
||||||
|
"d267e20ad9e5cd2915d1a47254d3d149",
|
||||||
|
"ed012a4a5da71f36c2393023184a0e59",
|
||||||
|
"f162b51ed618d28b936974cff4391da5",
|
||||||
|
"9e1370c6d42e08d357d9612c93a71cfc",
|
||||||
|
};
|
||||||
|
TestIntraPred("Intra32", pred_funcs, kVp9IntraPredNames, kNumVp9IntraFuncs,
|
||||||
|
kSignatures, 32, 32 * 32 * kNumVp9IntraFuncs);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
// Defines a test case for |arch| (e.g., C, SSE2, ...) passing the predictors
|
||||||
|
// to |test_func|. The test name is 'arch.test_func', e.g., C.TestIntraPred4.
|
||||||
|
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
|
||||||
|
d45, d135, d117, d153, d207, d63, tm) \
|
||||||
|
TEST(arch, test_func) { \
|
||||||
|
static const VpxPredFunc vpx_intra_pred[] = { \
|
||||||
|
dc, dc_left, dc_top, dc_128, v, h, d45, \
|
||||||
|
d135, d117, d153, d207, d63, tm}; \
|
||||||
|
test_func(vpx_intra_pred); \
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// 4x4
|
||||||
|
|
||||||
|
INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
|
||||||
|
vpx_dc_left_predictor_4x4_c, vpx_dc_top_predictor_4x4_c,
|
||||||
|
vpx_dc_128_predictor_4x4_c, vpx_v_predictor_4x4_c,
|
||||||
|
vpx_h_predictor_4x4_c, vpx_d45_predictor_4x4_c,
|
||||||
|
vpx_d135_predictor_4x4_c, vpx_d117_predictor_4x4_c,
|
||||||
|
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
|
||||||
|
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSE2, TestIntraPred4, vpx_dc_predictor_4x4_sse2,
|
||||||
|
vpx_dc_left_predictor_4x4_sse2, vpx_dc_top_predictor_4x4_sse2,
|
||||||
|
vpx_dc_128_predictor_4x4_sse2, vpx_v_predictor_4x4_sse2,
|
||||||
|
vpx_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
vpx_tm_predictor_4x4_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_d45_predictor_4x4_ssse3, NULL, NULL,
|
||||||
|
vpx_d153_predictor_4x4_ssse3, vpx_d207_predictor_4x4_ssse3,
|
||||||
|
vpx_d63_predictor_4x4_ssse3, NULL)
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_DSPR2
|
||||||
|
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL,
|
||||||
|
NULL, NULL, vpx_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL, vpx_tm_predictor_4x4_dspr2)
|
||||||
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INTRA_PRED_TEST(NEON, TestIntraPred4, vpx_dc_predictor_4x4_neon,
|
||||||
|
vpx_dc_left_predictor_4x4_neon, vpx_dc_top_predictor_4x4_neon,
|
||||||
|
vpx_dc_128_predictor_4x4_neon, vpx_v_predictor_4x4_neon,
|
||||||
|
vpx_h_predictor_4x4_neon, vpx_d45_predictor_4x4_neon,
|
||||||
|
vpx_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
|
||||||
|
vpx_tm_predictor_4x4_neon)
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INTRA_PRED_TEST(MSA, TestIntraPred4, vpx_dc_predictor_4x4_msa,
|
||||||
|
vpx_dc_left_predictor_4x4_msa, vpx_dc_top_predictor_4x4_msa,
|
||||||
|
vpx_dc_128_predictor_4x4_msa, vpx_v_predictor_4x4_msa,
|
||||||
|
vpx_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_tm_predictor_4x4_msa)
|
||||||
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// 8x8
|
||||||
|
|
||||||
|
INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
|
||||||
|
vpx_dc_left_predictor_8x8_c, vpx_dc_top_predictor_8x8_c,
|
||||||
|
vpx_dc_128_predictor_8x8_c, vpx_v_predictor_8x8_c,
|
||||||
|
vpx_h_predictor_8x8_c, vpx_d45_predictor_8x8_c,
|
||||||
|
vpx_d135_predictor_8x8_c, vpx_d117_predictor_8x8_c,
|
||||||
|
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
|
||||||
|
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSE2, TestIntraPred8, vpx_dc_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
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_d45_predictor_8x8_ssse3, NULL, NULL,
|
||||||
|
vpx_d153_predictor_8x8_ssse3, vpx_d207_predictor_8x8_ssse3,
|
||||||
|
vpx_d63_predictor_8x8_ssse3, NULL)
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_DSPR2
|
||||||
|
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL,
|
||||||
|
NULL, NULL, vpx_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL, vpx_tm_predictor_8x8_c)
|
||||||
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INTRA_PRED_TEST(NEON, TestIntraPred8, vpx_dc_predictor_8x8_neon,
|
||||||
|
vpx_dc_left_predictor_8x8_neon, vpx_dc_top_predictor_8x8_neon,
|
||||||
|
vpx_dc_128_predictor_8x8_neon, vpx_v_predictor_8x8_neon,
|
||||||
|
vpx_h_predictor_8x8_neon, vpx_d45_predictor_8x8_neon, NULL,
|
||||||
|
NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_neon)
|
||||||
|
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INTRA_PRED_TEST(MSA, TestIntraPred8, vpx_dc_predictor_8x8_msa,
|
||||||
|
vpx_dc_left_predictor_8x8_msa, vpx_dc_top_predictor_8x8_msa,
|
||||||
|
vpx_dc_128_predictor_8x8_msa, vpx_v_predictor_8x8_msa,
|
||||||
|
vpx_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_tm_predictor_8x8_msa)
|
||||||
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// 16x16
|
||||||
|
|
||||||
|
INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c,
|
||||||
|
vpx_dc_left_predictor_16x16_c, vpx_dc_top_predictor_16x16_c,
|
||||||
|
vpx_dc_128_predictor_16x16_c, vpx_v_predictor_16x16_c,
|
||||||
|
vpx_h_predictor_16x16_c, vpx_d45_predictor_16x16_c,
|
||||||
|
vpx_d135_predictor_16x16_c, vpx_d117_predictor_16x16_c,
|
||||||
|
vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c,
|
||||||
|
vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c)
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
|
||||||
|
vpx_dc_left_predictor_16x16_sse2,
|
||||||
|
vpx_dc_top_predictor_16x16_sse2,
|
||||||
|
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
|
||||||
|
vpx_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
vpx_tm_predictor_16x16_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_d45_predictor_16x16_ssse3,
|
||||||
|
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
|
||||||
|
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
|
||||||
|
NULL)
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_DSPR2
|
||||||
|
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL,
|
||||||
|
NULL, NULL, NULL, vpx_h_predictor_16x16_dspr2, NULL, NULL, NULL,
|
||||||
|
NULL, NULL, NULL, NULL)
|
||||||
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INTRA_PRED_TEST(NEON, TestIntraPred16, vpx_dc_predictor_16x16_neon,
|
||||||
|
vpx_dc_left_predictor_16x16_neon,
|
||||||
|
vpx_dc_top_predictor_16x16_neon,
|
||||||
|
vpx_dc_128_predictor_16x16_neon, vpx_v_predictor_16x16_neon,
|
||||||
|
vpx_h_predictor_16x16_neon, vpx_d45_predictor_16x16_neon, NULL,
|
||||||
|
NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_neon)
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INTRA_PRED_TEST(MSA, TestIntraPred16, vpx_dc_predictor_16x16_msa,
|
||||||
|
vpx_dc_left_predictor_16x16_msa, vpx_dc_top_predictor_16x16_msa,
|
||||||
|
vpx_dc_128_predictor_16x16_msa, vpx_v_predictor_16x16_msa,
|
||||||
|
vpx_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_tm_predictor_16x16_msa)
|
||||||
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// 32x32
|
||||||
|
|
||||||
|
INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
|
||||||
|
vpx_dc_left_predictor_32x32_c, vpx_dc_top_predictor_32x32_c,
|
||||||
|
vpx_dc_128_predictor_32x32_c, vpx_v_predictor_32x32_c,
|
||||||
|
vpx_h_predictor_32x32_c, vpx_d45_predictor_32x32_c,
|
||||||
|
vpx_d135_predictor_32x32_c, vpx_d117_predictor_32x32_c,
|
||||||
|
vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c,
|
||||||
|
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
|
||||||
|
|
||||||
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
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,
|
||||||
|
vpx_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_tm_predictor_32x32_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_d45_predictor_32x32_ssse3, NULL, NULL,
|
||||||
|
vpx_d153_predictor_32x32_ssse3, vpx_d207_predictor_32x32_ssse3,
|
||||||
|
vpx_d63_predictor_32x32_ssse3, NULL)
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon,
|
||||||
|
vpx_dc_left_predictor_32x32_neon,
|
||||||
|
vpx_dc_top_predictor_32x32_neon,
|
||||||
|
vpx_dc_128_predictor_32x32_neon, vpx_v_predictor_32x32_neon,
|
||||||
|
vpx_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
vpx_tm_predictor_32x32_neon)
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
|
||||||
|
vpx_dc_left_predictor_32x32_msa, vpx_dc_top_predictor_32x32_msa,
|
||||||
|
vpx_dc_128_predictor_32x32_msa, vpx_v_predictor_32x32_msa,
|
||||||
|
vpx_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
NULL, vpx_tm_predictor_32x32_msa)
|
||||||
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
|
#include "test/test_libvpx.cc"
|
||||||
@@ -8,6 +8,9 @@
|
|||||||
* 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 <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if ARCH_X86 || ARCH_X86_64
|
#if ARCH_X86 || ARCH_X86_64
|
||||||
#include "vpx_ports/x86.h"
|
#include "vpx_ports/x86.h"
|
||||||
@@ -15,13 +18,15 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#if CONFIG_VP8
|
#if CONFIG_VP8
|
||||||
extern void vp8_rtcd();
|
extern void vp8_rtcd();
|
||||||
#endif
|
#endif // CONFIG_VP8
|
||||||
#if CONFIG_VP9
|
#if CONFIG_VP9
|
||||||
extern void vp9_rtcd();
|
extern void vp9_rtcd();
|
||||||
#endif
|
#endif // CONFIG_VP9
|
||||||
|
extern void vpx_dsp_rtcd();
|
||||||
|
extern void vpx_scale_rtcd();
|
||||||
}
|
}
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
|
|
||||||
|
#if ARCH_X86 || ARCH_X86_64
|
||||||
static void append_negative_gtest_filter(const char *str) {
|
static void append_negative_gtest_filter(const char *str) {
|
||||||
std::string filter = ::testing::FLAGS_gtest_filter;
|
std::string filter = ::testing::FLAGS_gtest_filter;
|
||||||
// Negative patterns begin with one '-' followed by a ':' separated list.
|
// Negative patterns begin with one '-' followed by a ':' separated list.
|
||||||
@@ -29,6 +34,7 @@ static void append_negative_gtest_filter(const char *str) {
|
|||||||
filter += str;
|
filter += str;
|
||||||
::testing::FLAGS_gtest_filter = filter;
|
::testing::FLAGS_gtest_filter = filter;
|
||||||
}
|
}
|
||||||
|
#endif // ARCH_X86 || ARCH_X86_64
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
@@ -36,22 +42,22 @@ int main(int argc, char **argv) {
|
|||||||
#if ARCH_X86 || ARCH_X86_64
|
#if ARCH_X86 || ARCH_X86_64
|
||||||
const int simd_caps = x86_simd_caps();
|
const int simd_caps = x86_simd_caps();
|
||||||
if (!(simd_caps & HAS_MMX))
|
if (!(simd_caps & HAS_MMX))
|
||||||
append_negative_gtest_filter(":MMX/*");
|
append_negative_gtest_filter(":MMX.*:MMX/*");
|
||||||
if (!(simd_caps & HAS_SSE))
|
if (!(simd_caps & HAS_SSE))
|
||||||
append_negative_gtest_filter(":SSE/*");
|
append_negative_gtest_filter(":SSE.*:SSE/*");
|
||||||
if (!(simd_caps & HAS_SSE2))
|
if (!(simd_caps & HAS_SSE2))
|
||||||
append_negative_gtest_filter(":SSE2/*");
|
append_negative_gtest_filter(":SSE2.*:SSE2/*");
|
||||||
if (!(simd_caps & HAS_SSE3))
|
if (!(simd_caps & HAS_SSE3))
|
||||||
append_negative_gtest_filter(":SSE3/*");
|
append_negative_gtest_filter(":SSE3.*:SSE3/*");
|
||||||
if (!(simd_caps & HAS_SSSE3))
|
if (!(simd_caps & HAS_SSSE3))
|
||||||
append_negative_gtest_filter(":SSSE3/*");
|
append_negative_gtest_filter(":SSSE3.*:SSSE3/*");
|
||||||
if (!(simd_caps & HAS_SSE4_1))
|
if (!(simd_caps & HAS_SSE4_1))
|
||||||
append_negative_gtest_filter(":SSE4_1/*");
|
append_negative_gtest_filter(":SSE4_1.*:SSE4_1/*");
|
||||||
if (!(simd_caps & HAS_AVX))
|
if (!(simd_caps & HAS_AVX))
|
||||||
append_negative_gtest_filter(":AVX/*");
|
append_negative_gtest_filter(":AVX.*:AVX/*");
|
||||||
if (!(simd_caps & HAS_AVX2))
|
if (!(simd_caps & HAS_AVX2))
|
||||||
append_negative_gtest_filter(":AVX2/*");
|
append_negative_gtest_filter(":AVX2.*:AVX2/*");
|
||||||
#endif
|
#endif // ARCH_X86 || ARCH_X86_64
|
||||||
|
|
||||||
#if !CONFIG_SHARED
|
#if !CONFIG_SHARED
|
||||||
// Shared library builds don't support whitebox tests
|
// Shared library builds don't support whitebox tests
|
||||||
@@ -59,11 +65,13 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
#if CONFIG_VP8
|
#if CONFIG_VP8
|
||||||
vp8_rtcd();
|
vp8_rtcd();
|
||||||
#endif
|
#endif // CONFIG_VP8
|
||||||
#if CONFIG_VP9
|
#if CONFIG_VP9
|
||||||
vp9_rtcd();
|
vp9_rtcd();
|
||||||
#endif
|
#endif // CONFIG_VP9
|
||||||
#endif
|
vpx_dsp_rtcd();
|
||||||
|
vpx_scale_rtcd();
|
||||||
|
#endif // !CONFIG_SHARED
|
||||||
|
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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_;
|
||||||
};
|
};
|
||||||
@@ -97,6 +108,14 @@ TEST_P(TestVectorTest, MD5Match) {
|
|||||||
|
|
||||||
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;
|
||||||
@@ -135,6 +154,7 @@ TEST_P(TestVectorTest, MD5Match) {
|
|||||||
|
|
||||||
// Test VP8 decode in serial mode with single thread.
|
// Test VP8 decode in serial mode with single thread.
|
||||||
// NOTE: VP8 only support serial mode.
|
// NOTE: VP8 only support serial mode.
|
||||||
|
#if CONFIG_VP8_DECODER
|
||||||
VP8_INSTANTIATE_TEST_CASE(
|
VP8_INSTANTIATE_TEST_CASE(
|
||||||
TestVectorTest,
|
TestVectorTest,
|
||||||
::testing::Combine(
|
::testing::Combine(
|
||||||
@@ -143,9 +163,11 @@ VP8_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
|
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
|
||||||
libvpx_test::kVP8TestVectors +
|
libvpx_test::kVP8TestVectors +
|
||||||
libvpx_test::kNumVP8TestVectors)));
|
libvpx_test::kNumVP8TestVectors)));
|
||||||
|
#endif // CONFIG_VP8_DECODER
|
||||||
|
|
||||||
// Test VP9 decode in serial mode with single thread.
|
// Test VP9 decode in serial mode with single thread.
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
#if CONFIG_VP9_DECODER
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
TestVectorTest,
|
TestVectorTest,
|
||||||
::testing::Combine(
|
::testing::Combine(
|
||||||
::testing::Values(0), // Serial Mode.
|
::testing::Values(0), // Serial Mode.
|
||||||
@@ -154,8 +176,6 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
libvpx_test::kVP9TestVectors +
|
libvpx_test::kVP9TestVectors +
|
||||||
libvpx_test::kNumVP9TestVectors)));
|
libvpx_test::kNumVP9TestVectors)));
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_VP9_DECODER
|
|
||||||
// Test VP9 decode in frame parallel mode with different number of threads.
|
// Test VP9 decode in frame parallel mode with different number of threads.
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
VP9MultiThreadedFrameParallel, TestVectorTest,
|
VP9MultiThreadedFrameParallel, TestVectorTest,
|
||||||
|
|||||||
@@ -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",
|
||||||
@@ -165,7 +193,10 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp90-2-11-size-351x287.webm", "vp90-2-11-size-351x288.webm",
|
"vp90-2-11-size-351x287.webm", "vp90-2-11-size-351x288.webm",
|
||||||
"vp90-2-11-size-352x287.webm", "vp90-2-12-droppable_1.ivf",
|
"vp90-2-11-size-352x287.webm", "vp90-2-12-droppable_1.ivf",
|
||||||
"vp90-2-12-droppable_2.ivf", "vp90-2-12-droppable_3.ivf",
|
"vp90-2-12-droppable_2.ivf", "vp90-2-12-droppable_3.ivf",
|
||||||
|
#if !CONFIG_SIZE_LIMIT || \
|
||||||
|
(DECODE_WIDTH_LIMIT >= 20400 && DECODE_HEIGHT_LIMIT >= 120)
|
||||||
"vp90-2-13-largescaling.webm",
|
"vp90-2-13-largescaling.webm",
|
||||||
|
#endif
|
||||||
"vp90-2-14-resize-fp-tiles-1-16.webm",
|
"vp90-2-14-resize-fp-tiles-1-16.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm",
|
"vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-1-2.webm", "vp90-2-14-resize-fp-tiles-1-4.webm",
|
"vp90-2-14-resize-fp-tiles-1-2.webm", "vp90-2-14-resize-fp-tiles-1-4.webm",
|
||||||
@@ -179,21 +210,41 @@ 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",
|
||||||
"vp90-2-19-skip-01.webm", "vp90-2-19-skip-02.webm",
|
"vp90-2-19-skip-01.webm", "vp90-2-19-skip-02.webm",
|
||||||
"vp91-2-04-yuv444.webm",
|
"vp91-2-04-yuv444.webm",
|
||||||
"vp91-2-04-yuv422.webm", "vp91-2-04-yuv440.webm",
|
"vp91-2-04-yuv422.webm", "vp91-2-04-yuv440.webm",
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VPX_HIGHBITDEPTH
|
||||||
"vp92-2-20-10bit-yuv420.webm", "vp92-2-20-12bit-yuv420.webm",
|
"vp92-2-20-10bit-yuv420.webm", "vp92-2-20-12bit-yuv420.webm",
|
||||||
"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_VPX_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
|
||||||
|
|||||||
@@ -15,16 +15,6 @@
|
|||||||
|
|
||||||
namespace libvpx_test {
|
namespace libvpx_test {
|
||||||
|
|
||||||
#if CONFIG_VP8_DECODER
|
|
||||||
extern const int kNumVP8TestVectors;
|
|
||||||
extern const char *const kVP8TestVectors[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_VP9_DECODER
|
|
||||||
extern const int kNumVP9TestVectors;
|
|
||||||
extern const char *const kVP9TestVectors[];
|
|
||||||
#endif // CONFIG_VP9_DECODER
|
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|
||||||
#endif // TEST_TEST_VECTORS_H_
|
#endif // TEST_TEST_VECTORS_H_
|
||||||
|
|||||||
@@ -102,6 +102,6 @@ TEST_P(TileIndependenceTest, MD5Match) {
|
|||||||
ASSERT_STREQ(md5_fw_str, md5_inv_str);
|
ASSERT_STREQ(md5_fw_str, md5_inv_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -402,11 +402,15 @@ VP9_IVF_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf"
|
|||||||
|
|
||||||
VP9_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
|
VP9_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
|
||||||
VP9_FPM_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
|
VP9_FPM_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
|
||||||
|
VP9_LT_50_FRAMES_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm"
|
||||||
|
|
||||||
YUV_RAW_INPUT="${LIBVPX_TEST_DATA_PATH}/hantro_collage_w352h288.yuv"
|
YUV_RAW_INPUT="${LIBVPX_TEST_DATA_PATH}/hantro_collage_w352h288.yuv"
|
||||||
YUV_RAW_INPUT_WIDTH=352
|
YUV_RAW_INPUT_WIDTH=352
|
||||||
YUV_RAW_INPUT_HEIGHT=288
|
YUV_RAW_INPUT_HEIGHT=288
|
||||||
|
|
||||||
|
Y4M_NOSQ_PAR_INPUT="${LIBVPX_TEST_DATA_PATH}/park_joy_90p_8_420_a10-1.y4m"
|
||||||
|
Y4M_720P_INPUT="${LIBVPX_TEST_DATA_PATH}/niklas_1280_720_30.y4m"
|
||||||
|
|
||||||
# Setup a trap function to clean up after tests complete.
|
# Setup a trap function to clean up after tests complete.
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
@@ -428,6 +432,7 @@ vlog "$(basename "${0%.*}") test configuration:
|
|||||||
VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT}
|
VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT}
|
||||||
YUV_RAW_INPUT=${YUV_RAW_INPUT}
|
YUV_RAW_INPUT=${YUV_RAW_INPUT}
|
||||||
YUV_RAW_INPUT_WIDTH=${YUV_RAW_INPUT_WIDTH}
|
YUV_RAW_INPUT_WIDTH=${YUV_RAW_INPUT_WIDTH}
|
||||||
YUV_RAW_INPUT_HEIGHT=${YUV_RAW_INPUT_HEIGHT}"
|
YUV_RAW_INPUT_HEIGHT=${YUV_RAW_INPUT_HEIGHT}
|
||||||
|
Y4M_NOSQ_PAR_INPUT=${Y4M_NOSQ_PAR_INPUT}"
|
||||||
|
|
||||||
fi # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard.
|
fi # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user