Compare commits
1268 Commits
sandbox/ji
...
m49-2623
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16ec39cf96 | ||
|
|
b520882f0e | ||
|
|
2bd4f44409 | ||
|
|
ce6d3f1de4 | ||
|
|
e9e726f744 | ||
|
|
03a021a6fc | ||
|
|
ef77ce4407 | ||
|
|
0b769b2929 | ||
|
|
a8b7c6aad3 | ||
|
|
e5dfca02a9 | ||
|
|
53a11656cd | ||
|
|
d9439fdc36 | ||
|
|
b8c2a4eb0c | ||
|
|
dbe2d8c33c | ||
|
|
c84d3abeb8 | ||
|
|
26a6ce4c6d | ||
|
|
355bfa2193 | ||
|
|
a4c265f1b7 | ||
|
|
a9dd8a7308 | ||
|
|
b121a3e7b8 | ||
|
|
cedb1db594 | ||
|
|
a097963f80 | ||
|
|
52e7f4153b | ||
|
|
b597e3e188 | ||
|
|
8b2ddbc728 | ||
|
|
db11307502 | ||
|
|
c91dd55eda | ||
|
|
8366b414dd | ||
|
|
f075fdc474 | ||
|
|
7361ef732b | ||
|
|
8f8a3b6a78 | ||
|
|
c8a2c31ec1 | ||
|
|
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 | ||
|
|
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 | ||
|
|
9f14bbfd80 | ||
|
|
69c153c4e6 | ||
|
|
f4d746a3c1 | ||
|
|
28a8226350 | ||
|
|
944ad6cac9 | ||
|
|
86f4a3d8af | ||
|
|
3edd293dae | ||
|
|
e6add6499f | ||
|
|
89ca85dacd | ||
|
|
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
|
||||||
|
|||||||
8
.mailmap
8
.mailmap
@@ -1,14 +1,18 @@
|
|||||||
Adrian Grange <agrange@google.com>
|
Adrian Grange <agrange@google.com>
|
||||||
Alex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
Aℓex Converse <aconverse@google.com>
|
||||||
|
Aℓex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
||||||
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
||||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
||||||
Deb Mukherjee <debargha@google.com>
|
Deb Mukherjee <debargha@google.com>
|
||||||
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
||||||
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
||||||
Hangyu Kuang <hkuang@google.com>
|
Hangyu Kuang <hkuang@google.com>
|
||||||
|
Hui Su <huisu@google.com>
|
||||||
|
Jacky Chen <jackychen@google.com>
|
||||||
Jim Bankoski <jimbankoski@google.com>
|
Jim Bankoski <jimbankoski@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com>
|
Johann Koenig <johannkoenig@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
||||||
|
Johann Koenig <johannkoenig@google.com> <johann.koenig@gmail.com>
|
||||||
John Koleszar <jkoleszar@google.com>
|
John Koleszar <jkoleszar@google.com>
|
||||||
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
||||||
Marco Paniconi <marpan@google.com>
|
Marco Paniconi <marpan@google.com>
|
||||||
@@ -17,10 +21,12 @@ Pascal Massimino <pascal.massimino@gmail.com>
|
|||||||
Paul Wilkins <paulwilkins@google.com>
|
Paul Wilkins <paulwilkins@google.com>
|
||||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
||||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
||||||
|
Ronald S. Bultje <rsbultje@gmail.com> <rbultje@google.com>
|
||||||
Sami Pietilä <samipietila@google.com>
|
Sami Pietilä <samipietila@google.com>
|
||||||
Tamar Levy <tamar.levy@intel.com>
|
Tamar Levy <tamar.levy@intel.com>
|
||||||
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
||||||
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
||||||
Timothy B. Terriberry <tterribe@xiph.org> Tim Terriberry <tterriberry@mozilla.com>
|
Timothy B. Terriberry <tterribe@xiph.org> Tim Terriberry <tterriberry@mozilla.com>
|
||||||
Tom Finegan <tomfinegan@google.com>
|
Tom Finegan <tomfinegan@google.com>
|
||||||
|
Tom Finegan <tomfinegan@google.com> <tomfinegan@chromium.org>
|
||||||
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
||||||
|
|||||||
15
AUTHORS
15
AUTHORS
@@ -5,9 +5,9 @@ Aaron Watry <awatry@gmail.com>
|
|||||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
||||||
Adam Xu <adam@xuyaowu.com>
|
Adam Xu <adam@xuyaowu.com>
|
||||||
Adrian Grange <agrange@google.com>
|
Adrian Grange <agrange@google.com>
|
||||||
|
Aℓex Converse <aconverse@google.com>
|
||||||
Ahmad Sharif <asharif@google.com>
|
Ahmad Sharif <asharif@google.com>
|
||||||
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
||||||
Alex Converse <aconverse@google.com>
|
|
||||||
Alexis Ballier <aballier@gentoo.org>
|
Alexis Ballier <aballier@gentoo.org>
|
||||||
Alok Ahuja <waveletcoeff@gmail.com>
|
Alok Ahuja <waveletcoeff@gmail.com>
|
||||||
Alpha Lam <hclam@google.com>
|
Alpha Lam <hclam@google.com>
|
||||||
@@ -16,8 +16,10 @@ Ami Fischman <fischman@chromium.org>
|
|||||||
Andoni Morales Alastruey <ylatuya@gmail.com>
|
Andoni Morales Alastruey <ylatuya@gmail.com>
|
||||||
Andres Mejia <mcitadel@gmail.com>
|
Andres Mejia <mcitadel@gmail.com>
|
||||||
Andrew Russell <anrussell@google.com>
|
Andrew Russell <anrussell@google.com>
|
||||||
|
Angie Chiang <angiebird@google.com>
|
||||||
Aron Rosenberg <arosenberg@logitech.com>
|
Aron Rosenberg <arosenberg@logitech.com>
|
||||||
Attila Nagy <attilanagy@google.com>
|
Attila Nagy <attilanagy@google.com>
|
||||||
|
Brion Vibber <bvibber@wikimedia.org>
|
||||||
changjun.yang <changjun.yang@intel.com>
|
changjun.yang <changjun.yang@intel.com>
|
||||||
Charles 'Buck' Krasic <ckrasic@google.com>
|
Charles 'Buck' Krasic <ckrasic@google.com>
|
||||||
chm <chm@rock-chips.com>
|
chm <chm@rock-chips.com>
|
||||||
@@ -27,6 +29,7 @@ Deb Mukherjee <debargha@google.com>
|
|||||||
Dim Temp <dimtemp0@gmail.com>
|
Dim Temp <dimtemp0@gmail.com>
|
||||||
Dmitry Kovalev <dkovalev@google.com>
|
Dmitry Kovalev <dkovalev@google.com>
|
||||||
Dragan Mrdjan <dmrdjan@mips.com>
|
Dragan Mrdjan <dmrdjan@mips.com>
|
||||||
|
Ed Baker <edward.baker@intel.com>
|
||||||
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
||||||
Fabio Pedretti <fabio.ped@libero.it>
|
Fabio Pedretti <fabio.ped@libero.it>
|
||||||
@@ -34,6 +37,8 @@ Frank Galligan <fgalligan@google.com>
|
|||||||
Fredrik Söderquist <fs@opera.com>
|
Fredrik Söderquist <fs@opera.com>
|
||||||
Fritz Koenig <frkoenig@google.com>
|
Fritz Koenig <frkoenig@google.com>
|
||||||
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
|
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
|
||||||
|
Geza Lore <gezalore@gmail.com>
|
||||||
|
Ghislain MARY <ghislainmary2@gmail.com>
|
||||||
Giuseppe Scrivano <gscrivano@gnu.org>
|
Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
|
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
|
||||||
Guillaume Martres <gmartres@google.com>
|
Guillaume Martres <gmartres@google.com>
|
||||||
@@ -44,7 +49,7 @@ Henrik Lundin <hlundin@google.com>
|
|||||||
Hui Su <huisu@google.com>
|
Hui Su <huisu@google.com>
|
||||||
Ivan Maltz <ivanmaltz@google.com>
|
Ivan Maltz <ivanmaltz@google.com>
|
||||||
Jacek Caban <cjacek@gmail.com>
|
Jacek Caban <cjacek@gmail.com>
|
||||||
JackyChen <jackychen@google.com>
|
Jacky Chen <jackychen@google.com>
|
||||||
James Berry <jamesberry@google.com>
|
James Berry <jamesberry@google.com>
|
||||||
James Yu <james.yu@linaro.org>
|
James Yu <james.yu@linaro.org>
|
||||||
James Zern <jzern@google.com>
|
James Zern <jzern@google.com>
|
||||||
@@ -60,9 +65,11 @@ Jingning Han <jingning@google.com>
|
|||||||
Joey Parrish <joeyparrish@google.com>
|
Joey Parrish <joeyparrish@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com>
|
Johann Koenig <johannkoenig@google.com>
|
||||||
John Koleszar <jkoleszar@google.com>
|
John Koleszar <jkoleszar@google.com>
|
||||||
|
Johnny Klonaris <google@jawknee.com>
|
||||||
John Stark <jhnstrk@gmail.com>
|
John Stark <jhnstrk@gmail.com>
|
||||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
||||||
Joshua Litt <joshualitt@google.com>
|
Joshua Litt <joshualitt@google.com>
|
||||||
|
Julia Robson <juliamrobson@gmail.com>
|
||||||
Justin Clift <justin@salasaga.org>
|
Justin Clift <justin@salasaga.org>
|
||||||
Justin Lebar <justin.lebar@gmail.com>
|
Justin Lebar <justin.lebar@gmail.com>
|
||||||
KO Myung-Hun <komh@chollian.net>
|
KO Myung-Hun <komh@chollian.net>
|
||||||
@@ -82,6 +89,7 @@ Mike Hommey <mhommey@mozilla.com>
|
|||||||
Mikhal Shemer <mikhal@google.com>
|
Mikhal Shemer <mikhal@google.com>
|
||||||
Minghai Shang <minghai@google.com>
|
Minghai Shang <minghai@google.com>
|
||||||
Morton Jonuschat <yabawock@gmail.com>
|
Morton Jonuschat <yabawock@gmail.com>
|
||||||
|
Nico Weber <thakis@chromium.org>
|
||||||
Parag Salasakar <img.mips1@gmail.com>
|
Parag Salasakar <img.mips1@gmail.com>
|
||||||
Pascal Massimino <pascal.massimino@gmail.com>
|
Pascal Massimino <pascal.massimino@gmail.com>
|
||||||
Patrik Westin <patrik.westin@gmail.com>
|
Patrik Westin <patrik.westin@gmail.com>
|
||||||
@@ -96,7 +104,7 @@ Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
|||||||
Rafaël Carré <funman@videolan.org>
|
Rafaël Carré <funman@videolan.org>
|
||||||
Ralph Giles <giles@xiph.org>
|
Ralph Giles <giles@xiph.org>
|
||||||
Rob Bradford <rob@linux.intel.com>
|
Rob Bradford <rob@linux.intel.com>
|
||||||
Ronald S. Bultje <rbultje@google.com>
|
Ronald S. Bultje <rsbultje@gmail.com>
|
||||||
Rui Ueyama <ruiu@google.com>
|
Rui Ueyama <ruiu@google.com>
|
||||||
Sami Pietilä <samipietila@google.com>
|
Sami Pietilä <samipietila@google.com>
|
||||||
Scott Graham <scottmg@chromium.org>
|
Scott Graham <scottmg@chromium.org>
|
||||||
@@ -104,6 +112,7 @@ Scott LaVarnway <slavarnway@google.com>
|
|||||||
Sean McGovern <gseanmcg@gmail.com>
|
Sean McGovern <gseanmcg@gmail.com>
|
||||||
Sergey Ulanov <sergeyu@chromium.org>
|
Sergey Ulanov <sergeyu@chromium.org>
|
||||||
Shimon Doodkin <helpmepro1@gmail.com>
|
Shimon Doodkin <helpmepro1@gmail.com>
|
||||||
|
Shunyao Li <shunyaoli@google.com>
|
||||||
Stefan Holmer <holmer@google.com>
|
Stefan Holmer <holmer@google.com>
|
||||||
Suman Sunkara <sunkaras@google.com>
|
Suman Sunkara <sunkaras@google.com>
|
||||||
Taekhyun Kim <takim@nvidia.com>
|
Taekhyun Kim <takim@nvidia.com>
|
||||||
|
|||||||
20
CHANGELOG
20
CHANGELOG
@@ -1,7 +1,19 @@
|
|||||||
xxxx-yy-zz v1.4.0 "Changes for next release"
|
2015-11-09 v1.5.0 "Javan Whistling Duck"
|
||||||
vpxenc is changed to use VP9 by default.
|
This release improves upon the VP9 encoder and speeds up the encoding and
|
||||||
Encoder controls added for 1 pass SVC.
|
decoding processes.
|
||||||
Decoder control to toggle on/off loopfilter.
|
|
||||||
|
- Upgrading:
|
||||||
|
This release is ABI incompatible with 1.4.0. It drops deprecated VP8
|
||||||
|
controls and adds a variety of VP9 controls for testing.
|
||||||
|
|
||||||
|
The vpxenc utility now prefers VP9 by default.
|
||||||
|
|
||||||
|
- Enhancements:
|
||||||
|
Faster VP9 encoding and decoding
|
||||||
|
Smaller library size by combining functions used by VP8 and VP9
|
||||||
|
|
||||||
|
- Bug Fixes:
|
||||||
|
A variety of fuzzing issues
|
||||||
|
|
||||||
2015-04-03 v1.4.0 "Indian Runner Duck"
|
2015-04-03 v1.4.0 "Indian Runner Duck"
|
||||||
This release includes significant improvements to the VP9 codec.
|
This release includes significant improvements to the VP9 codec.
|
||||||
|
|||||||
4
README
4
README
@@ -59,6 +59,7 @@ 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
|
||||||
@@ -85,6 +86,8 @@ 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
|
||||||
@@ -101,6 +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
|
||||||
|
x86_64-win64-vs14
|
||||||
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,
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -164,17 +166,22 @@ 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
|
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)
|
||||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_dsp_rtcd.h
|
$$(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
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -140,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] $@")
|
||||||
@@ -285,7 +287,7 @@ define archive_template
|
|||||||
# for creating them.
|
# for creating them.
|
||||||
$(1):
|
$(1):
|
||||||
$(if $(quiet),@echo " [AR] $$@")
|
$(if $(quiet),@echo " [AR] $$@")
|
||||||
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$?
|
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define so_template
|
define so_template
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ Build options:
|
|||||||
--target=TARGET target platform tuple [generic-gnu]
|
--target=TARGET target platform tuple [generic-gnu]
|
||||||
--cpu=CPU optimize for a specific cpu rather than a family
|
--cpu=CPU optimize for a specific cpu rather than a family
|
||||||
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
|
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
|
||||||
|
--extra-cxxflags=ECXXFLAGS add ECXXFLAGS to CXXFLAGS [$CXXFLAGS]
|
||||||
${toggle_extra_warnings} emit harmless warnings (always non-fatal)
|
${toggle_extra_warnings} emit harmless warnings (always non-fatal)
|
||||||
${toggle_werror} treat warnings as errors, if possible
|
${toggle_werror} treat warnings as errors, if possible
|
||||||
(not available with all compilers)
|
(not available with all compilers)
|
||||||
@@ -200,6 +201,10 @@ disabled(){
|
|||||||
eval test "x\$$1" = "xno"
|
eval test "x\$$1" = "xno"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Iterates through positional parameters, checks to confirm the parameter has
|
||||||
|
# not been explicitly (force) disabled, and enables the setting controlled by
|
||||||
|
# the parameter when the setting is not disabled.
|
||||||
|
# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
|
||||||
soft_enable() {
|
soft_enable() {
|
||||||
for var in $*; do
|
for var in $*; do
|
||||||
if ! disabled $var; then
|
if ! disabled $var; then
|
||||||
@@ -209,6 +214,10 @@ soft_enable() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Iterates through positional parameters, checks to confirm the parameter has
|
||||||
|
# not been explicitly (force) enabled, and disables the setting controlled by
|
||||||
|
# the parameter when the setting is not enabled.
|
||||||
|
# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
|
||||||
soft_disable() {
|
soft_disable() {
|
||||||
for var in $*; do
|
for var in $*; do
|
||||||
if ! enabled $var; then
|
if ! enabled $var; then
|
||||||
@@ -337,6 +346,10 @@ check_add_cflags() {
|
|||||||
check_cflags "$@" && add_cflags_only "$@"
|
check_cflags "$@" && add_cflags_only "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_add_cxxflags() {
|
||||||
|
check_cxxflags "$@" && add_cxxflags_only "$@"
|
||||||
|
}
|
||||||
|
|
||||||
check_add_asflags() {
|
check_add_asflags() {
|
||||||
log add_asflags "$@"
|
log add_asflags "$@"
|
||||||
add_asflags "$@"
|
add_asflags "$@"
|
||||||
@@ -428,7 +441,7 @@ NM=${NM}
|
|||||||
|
|
||||||
CFLAGS = ${CFLAGS}
|
CFLAGS = ${CFLAGS}
|
||||||
CXXFLAGS = ${CXXFLAGS}
|
CXXFLAGS = ${CXXFLAGS}
|
||||||
ARFLAGS = -rus\$(if \$(quiet),c,v)
|
ARFLAGS = -crs\$(if \$(quiet),,v)
|
||||||
LDFLAGS = ${LDFLAGS}
|
LDFLAGS = ${LDFLAGS}
|
||||||
ASFLAGS = ${ASFLAGS}
|
ASFLAGS = ${ASFLAGS}
|
||||||
extralibs = ${extralibs}
|
extralibs = ${extralibs}
|
||||||
@@ -503,6 +516,9 @@ process_common_cmdline() {
|
|||||||
--extra-cflags=*)
|
--extra-cflags=*)
|
||||||
extra_cflags="${optval}"
|
extra_cflags="${optval}"
|
||||||
;;
|
;;
|
||||||
|
--extra-cxxflags=*)
|
||||||
|
extra_cxxflags="${optval}"
|
||||||
|
;;
|
||||||
--enable-?*|--disable-?*)
|
--enable-?*|--disable-?*)
|
||||||
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
||||||
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
|
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
|
||||||
@@ -617,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)}"
|
||||||
@@ -667,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
|
||||||
;;
|
;;
|
||||||
@@ -729,13 +754,14 @@ process_common_toolchain() {
|
|||||||
# platforms, so use the newest one available.
|
# platforms, so use the newest one available.
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
arm*-darwin*)
|
arm*-darwin*)
|
||||||
ios_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||||
if [ -d "${ios_sdk_dir}" ]; then
|
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||||
add_cflags "-isysroot ${ios_sdk_dir}"
|
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||||
add_ldflags "-isysroot ${ios_sdk_dir}"
|
add_cflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
|
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-darwin*)
|
x86*-darwin*)
|
||||||
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
||||||
if [ -d "${osx_sdk_dir}" ]; then
|
if [ -d "${osx_sdk_dir}" ]; then
|
||||||
add_cflags "-isysroot ${osx_sdk_dir}"
|
add_cflags "-isysroot ${osx_sdk_dir}"
|
||||||
@@ -773,6 +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}"
|
||||||
@@ -811,16 +841,35 @@ process_common_toolchain() {
|
|||||||
die "Disabling neon while keeping neon-asm is not supported"
|
die "Disabling neon while keeping neon-asm is not supported"
|
||||||
fi
|
fi
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
|
# Apple iOS SDKs no longer support armv6 as of the version 9
|
||||||
|
# release (coincides with release of Xcode 7). Only enable media
|
||||||
|
# when using earlier SDK releases.
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
# Neon is guaranteed on iOS 6+ devices, while old media extensions
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
# no longer assemble with iOS 9 SDK
|
soft_enable media
|
||||||
|
else
|
||||||
|
soft_disable media
|
||||||
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media "
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
soft_enable media
|
soft_enable media
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
armv6)
|
armv6)
|
||||||
soft_enable media
|
case ${toolchain} in
|
||||||
|
*-darwin*)
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
|
soft_enable media
|
||||||
|
else
|
||||||
|
die "Your iOS SDK does not support armv6."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
soft_enable media
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -938,8 +987,10 @@ EOF
|
|||||||
awk '{ print $1 }' | tail -1`
|
awk '{ print $1 }' | tail -1`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add_cflags "--sysroot=${alt_libc}"
|
if [ -d "${alt_libc}" ]; then
|
||||||
add_ldflags "--sysroot=${alt_libc}"
|
add_cflags "--sysroot=${alt_libc}"
|
||||||
|
add_ldflags "--sysroot=${alt_libc}"
|
||||||
|
fi
|
||||||
|
|
||||||
# linker flag that routes around a CPU bug in some
|
# linker flag that routes around a CPU bug in some
|
||||||
# Cortex-A8 implementations (NDK Dev Guide)
|
# Cortex-A8 implementations (NDK Dev Guide)
|
||||||
@@ -1003,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*)
|
||||||
@@ -1081,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
|
||||||
|
|
||||||
@@ -1149,32 +1208,43 @@ EOF
|
|||||||
soft_enable runtime_cpu_detect
|
soft_enable runtime_cpu_detect
|
||||||
# We can't use 'check_cflags' until the compiler is configured and CC is
|
# We can't use 'check_cflags' until the compiler is configured and CC is
|
||||||
# populated.
|
# populated.
|
||||||
check_gcc_machine_option mmx
|
for ext in ${ARCH_EXT_LIST_X86}; do
|
||||||
check_gcc_machine_option sse
|
# disable higher order extensions to simplify asm dependencies
|
||||||
check_gcc_machine_option sse2
|
if [ "$disable_exts" = "yes" ]; then
|
||||||
check_gcc_machine_option sse3
|
if ! disabled $ext; then
|
||||||
check_gcc_machine_option ssse3
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} "
|
||||||
check_gcc_machine_option sse4 sse4_1
|
disable_feature $ext
|
||||||
check_gcc_machine_option avx
|
|
||||||
check_gcc_machine_option avx2
|
|
||||||
|
|
||||||
case "${AS}" in
|
|
||||||
auto|"")
|
|
||||||
which nasm >/dev/null 2>&1 && AS=nasm
|
|
||||||
which yasm >/dev/null 2>&1 && AS=yasm
|
|
||||||
if [ "${AS}" = nasm ] ; then
|
|
||||||
# Apple ships version 0.98 of nasm through at least Xcode 6. Revisit
|
|
||||||
# this check if they start shipping a compatible version.
|
|
||||||
apple=`nasm -v | grep "Apple"`
|
|
||||||
[ -n "${apple}" ] \
|
|
||||||
&& echo "Unsupported version of nasm: ${apple}" \
|
|
||||||
&& AS=""
|
|
||||||
fi
|
fi
|
||||||
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
elif disabled $ext; then
|
||||||
&& die "Neither yasm nor nasm have been found"
|
disable_exts="yes"
|
||||||
;;
|
else
|
||||||
esac
|
# use the shortened version for the flag: sse4_1 -> sse4
|
||||||
log_echo " using $AS"
|
check_gcc_machine_option ${ext%_*} $ext
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if enabled external_build; then
|
||||||
|
log_echo " skipping assembler detection"
|
||||||
|
else
|
||||||
|
case "${AS}" in
|
||||||
|
auto|"")
|
||||||
|
which nasm >/dev/null 2>&1 && AS=nasm
|
||||||
|
which yasm >/dev/null 2>&1 && AS=yasm
|
||||||
|
if [ "${AS}" = nasm ] ; then
|
||||||
|
# Apple ships version 0.98 of nasm through at least Xcode 6. Revisit
|
||||||
|
# this check if they start shipping a compatible version.
|
||||||
|
apple=`nasm -v | grep "Apple"`
|
||||||
|
[ -n "${apple}" ] \
|
||||||
|
&& echo "Unsupported version of nasm: ${apple}" \
|
||||||
|
&& AS=""
|
||||||
|
fi
|
||||||
|
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
||||||
|
&& die "Neither yasm nor nasm have been found." \
|
||||||
|
"See the prerequisites section in the README for more info."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
log_echo " using $AS"
|
||||||
|
fi
|
||||||
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
||||||
AS_SFX=.asm
|
AS_SFX=.asm
|
||||||
case ${tgt_os} in
|
case ${tgt_os} in
|
||||||
@@ -1210,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
|
||||||
@@ -1323,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
|
||||||
@@ -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
|
||||||
53
configure
vendored
53
configure
vendored
@@ -35,8 +35,12 @@ Advanced options:
|
|||||||
${toggle_debug_libs} in/exclude debug version of libraries
|
${toggle_debug_libs} in/exclude debug version of libraries
|
||||||
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
|
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
|
||||||
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
|
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
|
||||||
|
${toggle_better_hw_compatibility}
|
||||||
|
enable encoder to produce streams with better
|
||||||
|
hardware decoder compatibility
|
||||||
${toggle_vp8} VP8 codec support
|
${toggle_vp8} VP8 codec support
|
||||||
${toggle_vp9} VP9 codec support
|
${toggle_vp9} VP9 codec support
|
||||||
|
${toggle_vp10} VP10 codec support
|
||||||
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
||||||
${toggle_postproc} postprocessing
|
${toggle_postproc} postprocessing
|
||||||
${toggle_vp9_postproc} vp9 specific postprocessing
|
${toggle_vp9_postproc} vp9 specific postprocessing
|
||||||
@@ -106,6 +110,7 @@ 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"
|
||||||
@@ -120,6 +125,7 @@ all_platforms="${all_platforms} x86-darwin11-gcc"
|
|||||||
all_platforms="${all_platforms} x86-darwin12-gcc"
|
all_platforms="${all_platforms} x86-darwin12-gcc"
|
||||||
all_platforms="${all_platforms} x86-darwin13-gcc"
|
all_platforms="${all_platforms} x86-darwin13-gcc"
|
||||||
all_platforms="${all_platforms} x86-darwin14-gcc"
|
all_platforms="${all_platforms} x86-darwin14-gcc"
|
||||||
|
all_platforms="${all_platforms} x86-darwin15-gcc"
|
||||||
all_platforms="${all_platforms} x86-iphonesimulator-gcc"
|
all_platforms="${all_platforms} x86-iphonesimulator-gcc"
|
||||||
all_platforms="${all_platforms} x86-linux-gcc"
|
all_platforms="${all_platforms} x86-linux-gcc"
|
||||||
all_platforms="${all_platforms} x86-linux-icc"
|
all_platforms="${all_platforms} x86-linux-icc"
|
||||||
@@ -132,12 +138,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"
|
||||||
@@ -148,6 +157,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} x86_64-win64-vs14"
|
||||||
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
|
||||||
@@ -187,6 +197,10 @@ fi
|
|||||||
# disable codecs when their source directory does not exist
|
# disable codecs when their source directory does not exist
|
||||||
[ -d "${source_path}/vp8" ] || disable_feature vp8
|
[ -d "${source_path}/vp8" ] || disable_feature vp8
|
||||||
[ -d "${source_path}/vp9" ] || disable_feature vp9
|
[ -d "${source_path}/vp9" ] || disable_feature vp9
|
||||||
|
[ -d "${source_path}/vp10" ] || disable_feature vp10
|
||||||
|
|
||||||
|
# disable vp10 codec by default
|
||||||
|
disable_feature vp10
|
||||||
|
|
||||||
# install everything except the sources, by default. sources will have
|
# install everything except the sources, by default. sources will have
|
||||||
# to be enabled when doing dist builds, since that's no longer a common
|
# to be enabled when doing dist builds, since that's no longer a common
|
||||||
@@ -208,10 +222,13 @@ CODECS="
|
|||||||
vp8_decoder
|
vp8_decoder
|
||||||
vp9_encoder
|
vp9_encoder
|
||||||
vp9_decoder
|
vp9_decoder
|
||||||
|
vp10_encoder
|
||||||
|
vp10_decoder
|
||||||
"
|
"
|
||||||
CODEC_FAMILIES="
|
CODEC_FAMILIES="
|
||||||
vp8
|
vp8
|
||||||
vp9
|
vp9
|
||||||
|
vp10
|
||||||
"
|
"
|
||||||
|
|
||||||
ARCH_LIST="
|
ARCH_LIST="
|
||||||
@@ -220,6 +237,16 @@ ARCH_LIST="
|
|||||||
x86
|
x86
|
||||||
x86_64
|
x86_64
|
||||||
"
|
"
|
||||||
|
ARCH_EXT_LIST_X86="
|
||||||
|
mmx
|
||||||
|
sse
|
||||||
|
sse2
|
||||||
|
sse3
|
||||||
|
ssse3
|
||||||
|
sse4_1
|
||||||
|
avx
|
||||||
|
avx2
|
||||||
|
"
|
||||||
ARCH_EXT_LIST="
|
ARCH_EXT_LIST="
|
||||||
edsp
|
edsp
|
||||||
media
|
media
|
||||||
@@ -231,14 +258,7 @@ ARCH_EXT_LIST="
|
|||||||
msa
|
msa
|
||||||
mips64
|
mips64
|
||||||
|
|
||||||
mmx
|
${ARCH_EXT_LIST_X86}
|
||||||
sse
|
|
||||||
sse2
|
|
||||||
sse3
|
|
||||||
ssse3
|
|
||||||
sse4_1
|
|
||||||
avx
|
|
||||||
avx2
|
|
||||||
"
|
"
|
||||||
HAVE_LIST="
|
HAVE_LIST="
|
||||||
${ARCH_EXT_LIST}
|
${ARCH_EXT_LIST}
|
||||||
@@ -251,9 +271,8 @@ HAVE_LIST="
|
|||||||
EXPERIMENT_LIST="
|
EXPERIMENT_LIST="
|
||||||
spatial_svc
|
spatial_svc
|
||||||
fp_mb_stats
|
fp_mb_stats
|
||||||
full_buffer_test
|
|
||||||
internal_resize
|
|
||||||
emulate_hardware
|
emulate_hardware
|
||||||
|
misc_fixes
|
||||||
"
|
"
|
||||||
CONFIG_LIST="
|
CONFIG_LIST="
|
||||||
dependency_tracking
|
dependency_tracking
|
||||||
@@ -306,6 +325,7 @@ CONFIG_LIST="
|
|||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
vp9_highbitdepth
|
vp9_highbitdepth
|
||||||
|
better_hw_compatibility
|
||||||
experimental
|
experimental
|
||||||
size_limit
|
size_limit
|
||||||
${EXPERIMENT_LIST}
|
${EXPERIMENT_LIST}
|
||||||
@@ -364,6 +384,7 @@ CMDLINE_SELECT="
|
|||||||
temporal_denoising
|
temporal_denoising
|
||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
|
better_hw_compatibility
|
||||||
vp9_highbitdepth
|
vp9_highbitdepth
|
||||||
experimental
|
experimental
|
||||||
"
|
"
|
||||||
@@ -640,7 +661,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"
|
||||||
@@ -706,6 +727,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
16
examples.mk
16
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 \
|
||||||
@@ -67,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
|
||||||
@@ -88,6 +91,7 @@ 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
|
||||||
@@ -324,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)=)\
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#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"
|
||||||
@@ -79,6 +80,8 @@ static const arg_def_t rc_end_usage_arg =
|
|||||||
ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
|
ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
|
||||||
static const arg_def_t speed_arg =
|
static const arg_def_t speed_arg =
|
||||||
ARG_DEF("sp", "speed", 1, "speed configuration");
|
ARG_DEF("sp", "speed", 1, "speed configuration");
|
||||||
|
static const arg_def_t aqmode_arg =
|
||||||
|
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on");
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
static const struct arg_enum_list bitdepth_enum[] = {
|
static const struct arg_enum_list bitdepth_enum[] = {
|
||||||
@@ -100,7 +103,7 @@ static const arg_def_t *svc_args[] = {
|
|||||||
&kf_dist_arg, &scale_factors_arg, &passes_arg, &pass_arg,
|
&kf_dist_arg, &scale_factors_arg, &passes_arg, &pass_arg,
|
||||||
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_arg,
|
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_arg,
|
||||||
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
|
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
|
||||||
&lag_in_frame_arg, &threads_arg,
|
&lag_in_frame_arg, &threads_arg, &aqmode_arg,
|
||||||
#if OUTPUT_RC_STATS
|
#if OUTPUT_RC_STATS
|
||||||
&output_rc_stats_arg,
|
&output_rc_stats_arg,
|
||||||
#endif
|
#endif
|
||||||
@@ -220,6 +223,8 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
#endif
|
#endif
|
||||||
} else if (arg_match(&arg, &speed_arg, argi)) {
|
} else if (arg_match(&arg, &speed_arg, argi)) {
|
||||||
svc_ctx->speed = arg_parse_uint(&arg);
|
svc_ctx->speed = arg_parse_uint(&arg);
|
||||||
|
} else if (arg_match(&arg, &aqmode_arg, argi)) {
|
||||||
|
svc_ctx->aqmode = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &threads_arg, argi)) {
|
} else if (arg_match(&arg, &threads_arg, argi)) {
|
||||||
svc_ctx->threads = arg_parse_uint(&arg);
|
svc_ctx->threads = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
||||||
@@ -403,7 +408,10 @@ static void set_rate_control_stats(struct RateControlStats *rc,
|
|||||||
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
||||||
const int layer = sl * cfg->ts_number_layers + tl;
|
const int layer = sl * cfg->ts_number_layers + tl;
|
||||||
const int tlayer0 = sl * cfg->ts_number_layers;
|
const int tlayer0 = sl * cfg->ts_number_layers;
|
||||||
rc->layer_framerate[layer] =
|
if (cfg->ts_number_layers == 1)
|
||||||
|
rc->layer_framerate[layer] = framerate;
|
||||||
|
else
|
||||||
|
rc->layer_framerate[layer] =
|
||||||
framerate / cfg->ts_rate_decimator[tl];
|
framerate / cfg->ts_rate_decimator[tl];
|
||||||
if (tl > 0) {
|
if (tl > 0) {
|
||||||
rc->layer_pfb[layer] = 1000.0 *
|
rc->layer_pfb[layer] = 1000.0 *
|
||||||
@@ -539,6 +547,59 @@ vpx_codec_err_t parse_superframe_index(const uint8_t *data,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Example pattern for spatial layers and 2 temporal layers used in the
|
||||||
|
// bypass/flexible mode. The pattern corresponds to the pattern
|
||||||
|
// VP9E_TEMPORAL_LAYERING_MODE_0101 (temporal_layering_mode == 2) used in
|
||||||
|
// non-flexible mode.
|
||||||
|
void set_frame_flags_bypass_mode(int sl, int tl, int num_spatial_layers,
|
||||||
|
int is_key_frame,
|
||||||
|
vpx_svc_ref_frame_config_t *ref_frame_config) {
|
||||||
|
for (sl = 0; sl < num_spatial_layers; ++sl) {
|
||||||
|
if (!tl) {
|
||||||
|
if (!sl) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
} else {
|
||||||
|
if (is_key_frame) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_LAST |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
} else {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (tl == 1) {
|
||||||
|
if (!sl) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST |
|
||||||
|
VP8_EFLAG_NO_UPD_GF;
|
||||||
|
} else {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST |
|
||||||
|
VP8_EFLAG_NO_UPD_GF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tl == 0) {
|
||||||
|
ref_frame_config->lst_fb_idx[sl] = sl;
|
||||||
|
if (sl)
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = sl - 1;
|
||||||
|
else
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = 0;
|
||||||
|
ref_frame_config->alt_fb_idx[sl] = 0;
|
||||||
|
} else if (tl == 1) {
|
||||||
|
ref_frame_config->lst_fb_idx[sl] = sl;
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = num_spatial_layers + sl - 1;
|
||||||
|
ref_frame_config->alt_fb_idx[sl] = num_spatial_layers + sl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
AppInput app_input = {0};
|
AppInput app_input = {0};
|
||||||
VpxVideoWriter *writer = NULL;
|
VpxVideoWriter *writer = NULL;
|
||||||
@@ -559,11 +620,14 @@ int main(int argc, const char **argv) {
|
|||||||
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
||||||
struct RateControlStats rc;
|
struct RateControlStats rc;
|
||||||
vpx_svc_layer_id_t layer_id;
|
vpx_svc_layer_id_t layer_id;
|
||||||
|
vpx_svc_ref_frame_config_t ref_frame_config;
|
||||||
int sl, tl;
|
int sl, tl;
|
||||||
double sum_bitrate = 0.0;
|
double sum_bitrate = 0.0;
|
||||||
double sum_bitrate2 = 0.0;
|
double sum_bitrate2 = 0.0;
|
||||||
double framerate = 30.0;
|
double framerate = 30.0;
|
||||||
#endif
|
#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];
|
||||||
@@ -632,6 +696,9 @@ int main(int argc, const char **argv) {
|
|||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
||||||
if (svc_ctx.threads)
|
if (svc_ctx.threads)
|
||||||
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
||||||
|
if (svc_ctx.speed >= 5 && 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) {
|
||||||
@@ -643,9 +710,43 @@ 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, svc_ctx.speed >= 5 ?
|
pts, frame_duration, svc_ctx.speed >= 5 ?
|
||||||
VPX_DL_REALTIME : VPX_DL_GOOD_QUALITY);
|
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) {
|
||||||
@@ -670,9 +771,16 @@ int main(int argc, const char **argv) {
|
|||||||
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
||||||
parse_superframe_index(cx_pkt->data.frame.buf,
|
parse_superframe_index(cx_pkt->data.frame.buf,
|
||||||
cx_pkt->data.frame.sz, sizes, &count);
|
cx_pkt->data.frame.sz, sizes, &count);
|
||||||
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
// Note computing input_layer_frames here won't account for frame
|
||||||
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
// drops in rate control stats.
|
||||||
layer_id.temporal_layer_id];
|
// TODO(marpan): Fix this for non-bypass mode so we can get stats
|
||||||
|
// for dropped frames.
|
||||||
|
if (svc_ctx.temporal_layering_mode !=
|
||||||
|
VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
||||||
|
layer_id.temporal_layer_id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (tl = layer_id.temporal_layer_id;
|
for (tl = layer_id.temporal_layer_id;
|
||||||
tl < enc_cfg.ts_number_layers; ++tl) {
|
tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
@@ -763,6 +871,16 @@ int main(int argc, const char **argv) {
|
|||||||
pts += frame_duration;
|
pts += frame_duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compensate for the extra frame count for the bypass mode.
|
||||||
|
if (svc_ctx.temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
const int layer = sl * enc_cfg.ts_number_layers +
|
||||||
|
layer_id.temporal_layer_id;
|
||||||
|
--rc.layer_input_frames[layer];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("Processed %d frames\n", frame_cnt);
|
printf("Processed %d frames\n", frame_cnt);
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
#if OUTPUT_RC_STATS
|
#if OUTPUT_RC_STATS
|
||||||
@@ -784,6 +902,10 @@ int main(int argc, const char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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));
|
||||||
|
|||||||
@@ -684,14 +684,15 @@ int main(int argc, char **argv) {
|
|||||||
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
||||||
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
|
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||||
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
||||||
vpx_svc_extra_cfg_t svc_params;
|
vpx_svc_extra_cfg_t svc_params;
|
||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
||||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||||
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
||||||
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
|
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
|
||||||
vpx_codec_control(&codec, VP9E_SET_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");
|
||||||
|
|||||||
53
libs.mk
53
libs.mk
@@ -50,7 +50,10 @@ CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
|
|||||||
include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
|
include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
|
||||||
CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
|
CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
|
||||||
|
|
||||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
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
|
||||||
@@ -73,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
|
||||||
@@ -106,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
|
||||||
@@ -223,7 +260,7 @@ OBJS-yes += $(LIBVPX_OBJS)
|
|||||||
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
||||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
||||||
|
|
||||||
SO_VERSION_MAJOR := 2
|
SO_VERSION_MAJOR := 3
|
||||||
SO_VERSION_MINOR := 0
|
SO_VERSION_MINOR := 0
|
||||||
SO_VERSION_PATCH := 0
|
SO_VERSION_PATCH := 0
|
||||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
||||||
@@ -392,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
|
||||||
|
|||||||
127
test/active_map_refresh_test.cc
Normal file
127
test/active_map_refresh_test.cc
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include <algorithm>
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "test/codec_factory.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "test/y4m_video_source.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// Check if any pixel in a 16x16 macroblock varies between frames.
|
||||||
|
int CheckMb(const vpx_image_t ¤t, const vpx_image_t &previous,
|
||||||
|
int mb_r, int mb_c) {
|
||||||
|
for (int plane = 0; plane < 3; plane++) {
|
||||||
|
int r = 16 * mb_r;
|
||||||
|
int c0 = 16 * mb_c;
|
||||||
|
int r_top = std::min(r + 16, static_cast<int>(current.d_h));
|
||||||
|
int c_top = std::min(c0 + 16, static_cast<int>(current.d_w));
|
||||||
|
r = std::max(r, 0);
|
||||||
|
c0 = std::max(c0, 0);
|
||||||
|
if (plane > 0 && current.x_chroma_shift) {
|
||||||
|
c_top = (c_top + 1) >> 1;
|
||||||
|
c0 >>= 1;
|
||||||
|
}
|
||||||
|
if (plane > 0 && current.y_chroma_shift) {
|
||||||
|
r_top = (r_top + 1) >> 1;
|
||||||
|
r >>= 1;
|
||||||
|
}
|
||||||
|
for (; r < r_top; ++r) {
|
||||||
|
for (int c = c0; c < c_top; ++c) {
|
||||||
|
if (current.planes[plane][current.stride[plane] * r + c] !=
|
||||||
|
previous.planes[plane][previous.stride[plane] * r + c])
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenerateMap(int mb_rows, int mb_cols, const vpx_image_t ¤t,
|
||||||
|
const vpx_image_t &previous, uint8_t *map) {
|
||||||
|
for (int mb_r = 0; mb_r < mb_rows; ++mb_r) {
|
||||||
|
for (int mb_c = 0; mb_c < mb_cols; ++mb_c) {
|
||||||
|
map[mb_r * mb_cols + mb_c] = CheckMb(current, previous, mb_r, mb_c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const int kAqModeCyclicRefresh = 3;
|
||||||
|
|
||||||
|
class ActiveMapRefreshTest
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
protected:
|
||||||
|
ActiveMapRefreshTest() : EncoderTest(GET_PARAM(0)) {}
|
||||||
|
virtual ~ActiveMapRefreshTest() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(GET_PARAM(1));
|
||||||
|
cpu_used_ = GET_PARAM(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
::libvpx_test::Y4mVideoSource *y4m_video =
|
||||||
|
static_cast<libvpx_test::Y4mVideoSource *>(video);
|
||||||
|
if (video->frame() == 1) {
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||||
|
encoder->Control(VP9E_SET_AQ_MODE, kAqModeCyclicRefresh);
|
||||||
|
} else if (video->frame() >= 2 && video->img()) {
|
||||||
|
vpx_image_t *current = video->img();
|
||||||
|
vpx_image_t *previous = y4m_holder_->img();
|
||||||
|
ASSERT_TRUE(previous != NULL);
|
||||||
|
vpx_active_map_t map = vpx_active_map_t();
|
||||||
|
const int width = static_cast<int>(current->d_w);
|
||||||
|
const int height = static_cast<int>(current->d_h);
|
||||||
|
const int mb_width = (width + 15) / 16;
|
||||||
|
const int mb_height = (height + 15) / 16;
|
||||||
|
uint8_t *active_map = new uint8_t[mb_width * mb_height];
|
||||||
|
GenerateMap(mb_height, mb_width, *current, *previous, active_map);
|
||||||
|
map.cols = mb_width;
|
||||||
|
map.rows = mb_height;
|
||||||
|
map.active_map = active_map;
|
||||||
|
encoder->Control(VP8E_SET_ACTIVEMAP, &map);
|
||||||
|
delete[] active_map;
|
||||||
|
}
|
||||||
|
if (video->img()) {
|
||||||
|
y4m_video->SwapBuffers(y4m_holder_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int cpu_used_;
|
||||||
|
::libvpx_test::Y4mVideoSource *y4m_holder_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(ActiveMapRefreshTest, Test) {
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.g_profile = 1;
|
||||||
|
cfg_.rc_target_bitrate = 600;
|
||||||
|
cfg_.rc_resize_allowed = 0;
|
||||||
|
cfg_.rc_min_quantizer = 8;
|
||||||
|
cfg_.rc_max_quantizer = 30;
|
||||||
|
cfg_.g_pass = VPX_RC_ONE_PASS;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.kf_max_dist = 90000;
|
||||||
|
|
||||||
|
::libvpx_test::Y4mVideoSource video("desktop_credits.y4m", 0, 30);
|
||||||
|
::libvpx_test::Y4mVideoSource video_holder("desktop_credits.y4m", 0, 30);
|
||||||
|
video_holder.Begin();
|
||||||
|
y4m_holder_ = &video_holder;
|
||||||
|
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 6));
|
||||||
|
} // namespace
|
||||||
@@ -8,22 +8,20 @@
|
|||||||
* 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.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if CONFIG_VP9_ENCODER
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#endif
|
|
||||||
#include "vpx_mem/vpx_mem.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 "third_party/googletest/src/include/gtest/gtest.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
@@ -194,6 +192,48 @@ class IntProColTest
|
|||||||
int16_t sum_c_;
|
int16_t sum_c_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef int (*SatdFunc)(const int16_t *coeffs, int length);
|
||||||
|
typedef std::tr1::tuple<int, SatdFunc> SatdTestParam;
|
||||||
|
|
||||||
|
class SatdTest
|
||||||
|
: public ::testing::Test,
|
||||||
|
public ::testing::WithParamInterface<SatdTestParam> {
|
||||||
|
protected:
|
||||||
|
virtual void SetUp() {
|
||||||
|
satd_size_ = GET_PARAM(0);
|
||||||
|
satd_func_ = GET_PARAM(1);
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
src_ = reinterpret_cast<int16_t*>(
|
||||||
|
vpx_memalign(16, sizeof(*src_) * satd_size_));
|
||||||
|
ASSERT_TRUE(src_ != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
vpx_free(src_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillConstant(const int16_t val) {
|
||||||
|
for (int i = 0; i < satd_size_; ++i) src_[i] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom() {
|
||||||
|
for (int i = 0; i < satd_size_; ++i) src_[i] = rnd_.Rand16();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Check(const int expected) {
|
||||||
|
int total;
|
||||||
|
ASM_REGISTER_STATE_CHECK(total = satd_func_(src_, satd_size_));
|
||||||
|
EXPECT_EQ(expected, total);
|
||||||
|
}
|
||||||
|
|
||||||
|
int satd_size_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int16_t *src_;
|
||||||
|
SatdFunc satd_func_;
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
uint8_t* AverageTestBase::source_data_ = NULL;
|
uint8_t* AverageTestBase::source_data_ = NULL;
|
||||||
|
|
||||||
@@ -246,58 +286,126 @@ TEST_P(IntProColTest, Random) {
|
|||||||
RunComparison();
|
RunComparison();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_P(SatdTest, MinValue) {
|
||||||
|
const int kMin = -32640;
|
||||||
|
const int expected = -kMin * satd_size_;
|
||||||
|
FillConstant(kMin);
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(SatdTest, MaxValue) {
|
||||||
|
const int kMax = 32640;
|
||||||
|
const int expected = kMax * satd_size_;
|
||||||
|
FillConstant(kMax);
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(SatdTest, Random) {
|
||||||
|
int expected;
|
||||||
|
switch (satd_size_) {
|
||||||
|
case 16: expected = 205298; break;
|
||||||
|
case 64: expected = 1113950; break;
|
||||||
|
case 256: expected = 4268415; break;
|
||||||
|
case 1024: expected = 16954082; break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Invalid satd size (" << satd_size_
|
||||||
|
<< ") valid: 16/64/256/1024";
|
||||||
|
}
|
||||||
|
FillRandom();
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, AverageTest,
|
C, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 1, 8, &vp9_avg_8x8_c),
|
make_tuple(16, 16, 1, 8, &vpx_avg_8x8_c),
|
||||||
make_tuple(16, 16, 1, 4, &vp9_avg_4x4_c)));
|
make_tuple(16, 16, 1, 4, &vpx_avg_4x4_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, SatdTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, &vpx_satd_c),
|
||||||
|
make_tuple(64, &vpx_satd_c),
|
||||||
|
make_tuple(256, &vpx_satd_c),
|
||||||
|
make_tuple(1024, &vpx_satd_c)));
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, AverageTest,
|
SSE2, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_sse2),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_sse2),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_sse2),
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(16, 16, 0, 4, &vp9_avg_4x4_sse2),
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_sse2),
|
||||||
make_tuple(16, 16, 5, 4, &vp9_avg_4x4_sse2),
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2),
|
||||||
make_tuple(32, 32, 15, 4, &vp9_avg_4x4_sse2)));
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, IntProRowTest, ::testing::Values(
|
SSE2, IntProRowTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
|
make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
make_tuple(32, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
|
make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
make_tuple(64, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c)));
|
make_tuple(64, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, IntProColTest, ::testing::Values(
|
SSE2, IntProColTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
|
make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||||
make_tuple(32, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
|
make_tuple(32, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||||
make_tuple(64, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c)));
|
make_tuple(64, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, SatdTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, &vpx_satd_sse2),
|
||||||
|
make_tuple(64, &vpx_satd_sse2),
|
||||||
|
make_tuple(256, &vpx_satd_sse2),
|
||||||
|
make_tuple(1024, &vpx_satd_sse2)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, AverageTest,
|
NEON, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_neon),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_neon),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_neon),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_neon)));
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_neon),
|
||||||
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_neon),
|
||||||
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_neon),
|
||||||
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_neon)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
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
|
#endif
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, AverageTest,
|
MSA, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_msa),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_msa),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_msa),
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(16, 16, 0, 4, &vp9_avg_4x4_msa),
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_msa),
|
||||||
make_tuple(16, 16, 5, 4, &vp9_avg_4x4_msa),
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa),
|
||||||
make_tuple(32, 32, 15, 4, &vp9_avg_4x4_msa)));
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -8,10 +8,11 @@
|
|||||||
* 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.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if CONFIG_VP9_ENCODER
|
#if CONFIG_VP9_ENCODER
|
||||||
@@ -22,7 +23,6 @@
|
|||||||
#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 "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
|||||||
@@ -80,4 +80,7 @@ TEST_P(BordersTest, TestLowBitrate) {
|
|||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||||
|
::libvpx_test::kTwoPassGood));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -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_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -233,6 +233,8 @@ class VP9CodecFactory : public CodecFactory {
|
|||||||
int usage) const {
|
int usage) const {
|
||||||
#if CONFIG_VP9_ENCODER
|
#if CONFIG_VP9_ENCODER
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
|
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
|
||||||
|
#elif CONFIG_VP10_ENCODER
|
||||||
|
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
|
||||||
#else
|
#else
|
||||||
return VPX_CODEC_INCAPABLE;
|
return VPX_CODEC_INCAPABLE;
|
||||||
#endif
|
#endif
|
||||||
@@ -251,7 +253,96 @@ const libvpx_test::VP9CodecFactory kVP9;
|
|||||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
||||||
#endif // CONFIG_VP9
|
#endif // CONFIG_VP9
|
||||||
|
|
||||||
|
/*
|
||||||
|
* VP10 Codec Definitions
|
||||||
|
*/
|
||||||
|
#if CONFIG_VP10
|
||||||
|
class VP10Decoder : public Decoder {
|
||||||
|
public:
|
||||||
|
VP10Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
|
||||||
|
: Decoder(cfg, deadline) {}
|
||||||
|
|
||||||
|
VP10Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
|
||||||
|
unsigned long deadline) // NOLINT
|
||||||
|
: Decoder(cfg, flag, deadline) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual vpx_codec_iface_t* CodecInterface() const {
|
||||||
|
#if CONFIG_VP10_DECODER
|
||||||
|
return &vpx_codec_vp10_dx_algo;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class VP10Encoder : public Encoder {
|
||||||
|
public:
|
||||||
|
VP10Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
|
||||||
|
const unsigned long init_flags, TwopassStatsStore *stats)
|
||||||
|
: Encoder(cfg, deadline, init_flags, stats) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual vpx_codec_iface_t* CodecInterface() const {
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
return &vpx_codec_vp10_cx_algo;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class VP10CodecFactory : public CodecFactory {
|
||||||
|
public:
|
||||||
|
VP10CodecFactory() : CodecFactory() {}
|
||||||
|
|
||||||
|
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
||||||
|
unsigned long deadline) const {
|
||||||
|
return CreateDecoder(cfg, 0, deadline);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
||||||
|
const vpx_codec_flags_t flags,
|
||||||
|
unsigned long deadline) const { // NOLINT
|
||||||
|
#if CONFIG_VP10_DECODER
|
||||||
|
return new VP10Decoder(cfg, flags, deadline);
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
|
||||||
|
unsigned long deadline,
|
||||||
|
const unsigned long init_flags,
|
||||||
|
TwopassStatsStore *stats) const {
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
return new VP10Encoder(cfg, deadline, init_flags, stats);
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
|
||||||
|
int usage) const {
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
|
||||||
|
#else
|
||||||
|
return VPX_CODEC_INCAPABLE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const libvpx_test::VP10CodecFactory kVP10;
|
||||||
|
|
||||||
|
#define VP10_INSTANTIATE_TEST_CASE(test, ...)\
|
||||||
|
INSTANTIATE_TEST_CASE_P(VP10, test, \
|
||||||
|
::testing::Combine( \
|
||||||
|
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
|
||||||
|
&libvpx_test::kVP10)), \
|
||||||
|
__VA_ARGS__))
|
||||||
|
#else
|
||||||
|
#define VP10_INSTANTIATE_TEST_CASE(test, ...)
|
||||||
|
#endif // CONFIG_VP10
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|
||||||
#endif // TEST_CODEC_FACTORY_H_
|
#endif // TEST_CODEC_FACTORY_H_
|
||||||
|
|||||||
@@ -8,10 +8,11 @@
|
|||||||
* 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.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if CONFIG_VP9_ENCODER
|
#if CONFIG_VP9_ENCODER
|
||||||
@@ -22,12 +23,11 @@
|
|||||||
#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 "third_party/googletest/src/include/gtest/gtest.h"
|
#include "vpx_dsp/ssim.h"
|
||||||
#include "vp9/encoder/vp9_ssim.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
double vp9_get_ssim_metrics(uint8_t *img1, int img1_pitch,
|
double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch,
|
||||||
uint8_t *img2, int img2_pitch,
|
uint8_t *img2, int img2_pitch,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
Ssimv *sv2, Metrics *m,
|
Ssimv *sv2, Metrics *m,
|
||||||
@@ -65,7 +65,7 @@ class ConsistencyTestBase : public ::testing::Test {
|
|||||||
vpx_free(reference_data_[1]);
|
vpx_free(reference_data_[1]);
|
||||||
reference_data_[1] = NULL;
|
reference_data_[1] = NULL;
|
||||||
|
|
||||||
delete ssim_array_;
|
delete[] ssim_array_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
@@ -144,7 +144,7 @@ class ConsistencyVP9Test
|
|||||||
double CheckConsistency(int frame) {
|
double CheckConsistency(int frame) {
|
||||||
EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
|
EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
|
||||||
return
|
return
|
||||||
vp9_get_ssim_metrics(source_data_[frame], source_stride_,
|
vpx_get_ssim_metrics(source_data_[frame], source_stride_,
|
||||||
reference_data_[frame], reference_stride_,
|
reference_data_[frame], reference_stride_,
|
||||||
width_, height_, ssim_array_, &metrics_, 1);
|
width_, height_, ssim_array_, &metrics_, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -140,4 +140,9 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kRealTime),
|
::libvpx_test::kRealTime),
|
||||||
::testing::Range(0, 9));
|
::testing::Range(0, 9));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
|
CpuSpeedTest,
|
||||||
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||||
|
::testing::Range(0, 3));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -538,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;
|
||||||
@@ -761,6 +761,8 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
first_drop_ = 0;
|
first_drop_ = 0;
|
||||||
bits_total_ = 0;
|
bits_total_ = 0;
|
||||||
duration_ = 0.0;
|
duration_ = 0.0;
|
||||||
|
mismatch_psnr_ = 0.0;
|
||||||
|
mismatch_nframes_ = 0;
|
||||||
}
|
}
|
||||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||||
}
|
}
|
||||||
@@ -768,7 +770,7 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == 0) {
|
if (video->frame() == 0) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 2; ++i) {
|
for (i = 0; i < VPX_MAX_LAYERS; ++i) {
|
||||||
svc_params_.max_quantizers[i] = 63;
|
svc_params_.max_quantizers[i] = 63;
|
||||||
svc_params_.min_quantizers[i] = 0;
|
svc_params_.min_quantizers[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -781,6 +783,7 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
||||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
|
encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
|
||||||
encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 300);
|
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();
|
const vpx_rational_t tb = video->timebase();
|
||||||
timebase_ = static_cast<double>(tb.num) / tb.den;
|
timebase_ = static_cast<double>(tb.num) / tb.den;
|
||||||
@@ -816,6 +819,18 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
file_datarate_ = file_size_in_kb / 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_;
|
vpx_codec_pts_t last_pts_;
|
||||||
int64_t bits_in_buffer_model_;
|
int64_t bits_in_buffer_model_;
|
||||||
double timebase_;
|
double timebase_;
|
||||||
@@ -828,6 +843,8 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
size_t bits_in_last_frame_;
|
size_t bits_in_last_frame_;
|
||||||
vpx_svc_extra_cfg_t svc_params_;
|
vpx_svc_extra_cfg_t svc_params_;
|
||||||
int speed_setting_;
|
int speed_setting_;
|
||||||
|
double mismatch_psnr_;
|
||||||
|
int mismatch_nframes_;
|
||||||
};
|
};
|
||||||
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
||||||
const vpx_svc_extra_cfg_t *svc_params,
|
const vpx_svc_extra_cfg_t *svc_params,
|
||||||
@@ -867,7 +884,7 @@ static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||||
// 3 temporal layers.
|
// 3 temporal layers. Run CIF clip with 1 thread.
|
||||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
cfg_.rc_buf_optimal_sz = 500;
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
@@ -882,6 +899,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
|||||||
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_.g_error_resilient = 1;
|
cfg_.g_error_resilient = 1;
|
||||||
|
cfg_.g_threads = 1;
|
||||||
cfg_.temporal_layering_mode = 3;
|
cfg_.temporal_layering_mode = 3;
|
||||||
svc_params_.scaling_factor_num[0] = 144;
|
svc_params_.scaling_factor_num[0] = 144;
|
||||||
svc_params_.scaling_factor_den[0] = 288;
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
@@ -905,9 +923,50 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
|||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
||||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
||||||
::testing::Values(::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kOnePassGood,
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
#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 "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
#include "vp9/common/vp9_entropy.h"
|
||||||
#include "vp9/common/vp9_scan.h"
|
#include "vp9/common/vp9_scan.h"
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
@@ -39,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;
|
||||||
@@ -271,12 +248,12 @@ 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,
|
||||||
@@ -291,11 +268,11 @@ void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
|||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_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,
|
||||||
@@ -317,28 +294,28 @@ void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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_VP9_HIGHBITDEPTH
|
||||||
@@ -821,14 +798,14 @@ using std::tr1::make_tuple;
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -861,16 +838,16 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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_VP9_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(
|
||||||
@@ -888,27 +865,19 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 1, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 2, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_10, 3, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 0, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 1, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht16x16_sse2, &iht16x16_12, 2, VPX_BITS_12),
|
|
||||||
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, 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, 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, 2, VPX_BITS_8),
|
||||||
@@ -933,8 +902,8 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Trans16x16DCT,
|
MSA, Trans16x16DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct16x16_msa,
|
make_tuple(&vpx_fdct16x16_msa,
|
||||||
&vp9_idct16x16_256_add_msa, 0, VPX_BITS_8)));
|
&vpx_idct16x16_256_add_msa, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Trans16x16HT,
|
MSA, Trans16x16HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
|
|||||||
@@ -13,13 +13,14 @@
|
|||||||
#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 "./vp9_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 "./vpx_config.h"
|
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.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"
|
||||||
@@ -81,15 +82,15 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
|
|||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_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_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
@@ -194,7 +195,7 @@ TEST_P(Trans32x32Test, CoeffCheck) {
|
|||||||
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) {
|
||||||
@@ -231,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));
|
||||||
|
|
||||||
@@ -314,61 +315,61 @@ using std::tr1::make_tuple;
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VP9_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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
@@ -376,19 +377,19 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Trans32x32Test,
|
MSA, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct32x32_msa,
|
make_tuple(&vpx_fdct32x32_msa,
|
||||||
&vp9_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fdct32x32_rd_msa,
|
make_tuple(&vpx_fdct32x32_rd_msa,
|
||||||
&vp9_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
||||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_MSA && !CONFIG_VP9_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_VP9_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));
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
@@ -41,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
|
||||||
@@ -185,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_VP8_ENCODER || CONFIG_VP9_ENCODER || 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();
|
||||||
@@ -137,7 +143,7 @@ class Encoder {
|
|||||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
}
|
}
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || 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();
|
||||||
|
|||||||
@@ -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,13 @@ TEST_P(ErrorResilienceTestLargeCodecControls, CodecControl3TemporalLayers) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
|
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
||||||
|
::testing::Values(true));
|
||||||
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
|
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
|
||||||
ONE_PASS_TEST_MODES);
|
ONE_PASS_TEST_MODES);
|
||||||
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES);
|
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
||||||
|
::testing::Values(true));
|
||||||
|
// SVC-related tests don't run for VP10 since SVC is not supported.
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
||||||
|
::testing::Values(false));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
#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 "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.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"
|
||||||
@@ -40,7 +41,7 @@ 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) {
|
||||||
@@ -54,11 +55,11 @@ void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
|||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_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) {
|
||||||
@@ -70,20 +71,20 @@ void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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_VP9_HIGHBITDEPTH
|
||||||
@@ -418,14 +419,14 @@ using std::tr1::make_tuple;
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -460,20 +461,20 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
|
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
|
make_tuple(&vp9_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(&vp9_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(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -491,15 +492,23 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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(&vp9_fwht4x4_mmx, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && \
|
||||||
|
!CONFIG_EMULATE_HARDWARE
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, Trans4x4WHT,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
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(
|
||||||
@@ -513,24 +522,16 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 1, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 2, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_10, 3, VPX_BITS_10),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 0, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 1, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 2, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_highbd_fht4x4_sse2, &iht4x4_12, 3, VPX_BITS_12),
|
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
|
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
|
||||||
@@ -541,7 +542,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Trans4x4DCT,
|
MSA, Trans4x4DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct4x4_msa, &vp9_idct4x4_16_add_msa, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct4x4_msa, &vpx_idct4x4_16_add_msa, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Trans4x4HT,
|
MSA, Trans4x4HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
#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 "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
#include "vp9/common/vp9_entropy.h"
|
||||||
#include "vp9/common/vp9_scan.h"
|
#include "vp9/common/vp9_scan.h"
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
@@ -82,7 +83,7 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
|
|||||||
|
|
||||||
|
|
||||||
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
||||||
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) {
|
||||||
@@ -91,11 +92,11 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
|||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_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) {
|
||||||
@@ -107,28 +108,28 @@ void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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_VP9_HIGHBITDEPTH
|
||||||
@@ -657,14 +658,14 @@ using std::tr1::make_tuple;
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -684,8 +685,6 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp9_fht8x8_c, &vp9_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(
|
||||||
@@ -696,12 +695,10 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
// 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_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
@@ -716,12 +713,10 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
// 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,
|
||||||
@@ -736,18 +731,16 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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(
|
||||||
@@ -771,14 +764,12 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&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_VP9_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_VP9_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
|
||||||
|
|
||||||
@@ -786,7 +777,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, FwdTrans8x8DCT,
|
MSA, FwdTrans8x8DCT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_fdct8x8_msa, &vp9_idct8x8_64_add_msa, 0, VPX_BITS_8)));
|
make_tuple(&vpx_fdct8x8_msa, &vpx_idct8x8_64_add_msa, 0, VPX_BITS_8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, FwdTrans8x8HT,
|
MSA, FwdTrans8x8HT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
|
|||||||
@@ -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,396 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include "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 "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vp8/common/blockd.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
class IntraPredBase {
|
|
||||||
public:
|
|
||||||
virtual ~IntraPredBase() { libvpx_test::ClearSystemState(); }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void SetupMacroblock(MACROBLOCKD *mbptr,
|
|
||||||
MODE_INFO *miptr,
|
|
||||||
uint8_t *data,
|
|
||||||
int block_size,
|
|
||||||
int stride,
|
|
||||||
int num_planes) {
|
|
||||||
mbptr_ = mbptr;
|
|
||||||
miptr_ = miptr;
|
|
||||||
mbptr_->up_available = 1;
|
|
||||||
mbptr_->left_available = 1;
|
|
||||||
mbptr_->mode_info_context = miptr_;
|
|
||||||
stride_ = stride;
|
|
||||||
block_size_ = block_size;
|
|
||||||
num_planes_ = num_planes;
|
|
||||||
for (int p = 0; p < num_planes; p++)
|
|
||||||
data_ptr_[p] = data + stride * (block_size + 1) * p +
|
|
||||||
stride + block_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FillRandom() {
|
|
||||||
// Fill edges with random data
|
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
|
||||||
for (int p = 0; p < num_planes_; p++) {
|
|
||||||
for (int x = -1 ; x <= block_size_; x++)
|
|
||||||
data_ptr_[p][x - stride_] = rnd.Rand8();
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
data_ptr_[p][y * stride_ - 1] = rnd.Rand8();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) = 0;
|
|
||||||
|
|
||||||
void SetLeftUnavailable() {
|
|
||||||
mbptr_->left_available = 0;
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int i = -1; i < block_size_; ++i)
|
|
||||||
data_ptr_[p][stride_ * i - 1] = 129;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetTopUnavailable() {
|
|
||||||
mbptr_->up_available = 0;
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
memset(&data_ptr_[p][-1 - stride_], 127, block_size_ + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetTopLeftUnavailable() {
|
|
||||||
SetLeftUnavailable();
|
|
||||||
SetTopUnavailable();
|
|
||||||
}
|
|
||||||
|
|
||||||
int BlockSizeLog2Min1() const {
|
|
||||||
switch (block_size_) {
|
|
||||||
case 16:
|
|
||||||
return 3;
|
|
||||||
case 8:
|
|
||||||
return 2;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check DC prediction output against a reference
|
|
||||||
void CheckDCPrediction() const {
|
|
||||||
for (int p = 0; p < num_planes_; p++) {
|
|
||||||
// calculate expected DC
|
|
||||||
int expected;
|
|
||||||
if (mbptr_->up_available || mbptr_->left_available) {
|
|
||||||
int sum = 0, shift = BlockSizeLog2Min1() + mbptr_->up_available +
|
|
||||||
mbptr_->left_available;
|
|
||||||
if (mbptr_->up_available)
|
|
||||||
for (int x = 0; x < block_size_; x++)
|
|
||||||
sum += data_ptr_[p][x - stride_];
|
|
||||||
if (mbptr_->left_available)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
sum += data_ptr_[p][y * stride_ - 1];
|
|
||||||
expected = (sum + (1 << (shift - 1))) >> shift;
|
|
||||||
} else {
|
|
||||||
expected = 0x80;
|
|
||||||
}
|
|
||||||
// check that all subsequent lines are equal to the first
|
|
||||||
for (int y = 1; y < block_size_; ++y)
|
|
||||||
ASSERT_EQ(0, memcmp(data_ptr_[p], &data_ptr_[p][y * stride_],
|
|
||||||
block_size_));
|
|
||||||
// within the first line, ensure that each pixel has the same value
|
|
||||||
for (int x = 1; x < block_size_; ++x)
|
|
||||||
ASSERT_EQ(data_ptr_[p][0], data_ptr_[p][x]);
|
|
||||||
// now ensure that that pixel has the expected (DC) value
|
|
||||||
ASSERT_EQ(expected, data_ptr_[p][0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check V prediction output against a reference
|
|
||||||
void CheckVPrediction() const {
|
|
||||||
// check that all lines equal the top border
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
ASSERT_EQ(0, memcmp(&data_ptr_[p][-stride_],
|
|
||||||
&data_ptr_[p][y * stride_], block_size_));
|
|
||||||
}
|
|
||||||
|
|
||||||
// check H prediction output against a reference
|
|
||||||
void CheckHPrediction() const {
|
|
||||||
// for each line, ensure that each pixel is equal to the left border
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
for (int x = 0; x < block_size_; x++)
|
|
||||||
ASSERT_EQ(data_ptr_[p][-1 + y * stride_],
|
|
||||||
data_ptr_[p][x + y * stride_]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ClipByte(int value) {
|
|
||||||
if (value > 255)
|
|
||||||
return 255;
|
|
||||||
else if (value < 0)
|
|
||||||
return 0;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check TM prediction output against a reference
|
|
||||||
void CheckTMPrediction() const {
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
for (int x = 0; x < block_size_; x++) {
|
|
||||||
const int expected = ClipByte(data_ptr_[p][x - stride_]
|
|
||||||
+ data_ptr_[p][stride_ * y - 1]
|
|
||||||
- data_ptr_[p][-1 - stride_]);
|
|
||||||
ASSERT_EQ(expected, data_ptr_[p][y * stride_ + x]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Actual test
|
|
||||||
void RunTest() {
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED LEFT");
|
|
||||||
FillRandom();
|
|
||||||
SetLeftUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED TOP");
|
|
||||||
FillRandom();
|
|
||||||
SetTopUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED TOP_LEFT");
|
|
||||||
FillRandom();
|
|
||||||
SetTopLeftUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("H_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(H_PRED);
|
|
||||||
CheckHPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("V_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(V_PRED);
|
|
||||||
CheckVPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("TM_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(TM_PRED);
|
|
||||||
CheckTMPrediction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MACROBLOCKD *mbptr_;
|
|
||||||
MODE_INFO *miptr_;
|
|
||||||
uint8_t *data_ptr_[2]; // in the case of Y, only [0] is used
|
|
||||||
int stride_;
|
|
||||||
int block_size_;
|
|
||||||
int num_planes_;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (*IntraPredYFunc)(MACROBLOCKD *x,
|
|
||||||
uint8_t *yabove_row,
|
|
||||||
uint8_t *yleft,
|
|
||||||
int left_stride,
|
|
||||||
uint8_t *ypred_ptr,
|
|
||||||
int y_stride);
|
|
||||||
|
|
||||||
class IntraPredYTest
|
|
||||||
: public IntraPredBase,
|
|
||||||
public ::testing::TestWithParam<IntraPredYFunc> {
|
|
||||||
public:
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
mb_ = reinterpret_cast<MACROBLOCKD*>(
|
|
||||||
vpx_memalign(32, sizeof(MACROBLOCKD)));
|
|
||||||
mi_ = reinterpret_cast<MODE_INFO*>(
|
|
||||||
vpx_memalign(32, sizeof(MODE_INFO)));
|
|
||||||
data_array_ = reinterpret_cast<uint8_t*>(
|
|
||||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
vpx_free(data_array_);
|
|
||||||
vpx_free(mi_);
|
|
||||||
vpx_free(mb_);
|
|
||||||
data_array_ = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static const int kBlockSize = 16;
|
|
||||||
static const int kDataAlignment = 16;
|
|
||||||
static const int kStride = kBlockSize * 3;
|
|
||||||
// We use 48 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 16-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 17 lines so we have one line above us for top-prediction.
|
|
||||||
static const int kDataBufferSize = kStride * (kBlockSize + 1);
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
pred_fn_ = GetParam();
|
|
||||||
SetupMacroblock(mb_, mi_, data_array_, kBlockSize, kStride, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) {
|
|
||||||
mbptr_->mode_info_context->mbmi.mode = mode;
|
|
||||||
ASM_REGISTER_STATE_CHECK(pred_fn_(mbptr_,
|
|
||||||
data_ptr_[0] - kStride,
|
|
||||||
data_ptr_[0] - 1, kStride,
|
|
||||||
data_ptr_[0], kStride));
|
|
||||||
}
|
|
||||||
|
|
||||||
IntraPredYFunc pred_fn_;
|
|
||||||
static uint8_t* data_array_;
|
|
||||||
static MACROBLOCKD * mb_;
|
|
||||||
static MODE_INFO *mi_;
|
|
||||||
};
|
|
||||||
|
|
||||||
MACROBLOCKD* IntraPredYTest::mb_ = NULL;
|
|
||||||
MODE_INFO* IntraPredYTest::mi_ = NULL;
|
|
||||||
uint8_t* IntraPredYTest::data_array_ = NULL;
|
|
||||||
|
|
||||||
TEST_P(IntraPredYTest, IntraPredTests) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_c));
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_sse2));
|
|
||||||
#endif
|
|
||||||
#if HAVE_SSSE3
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_ssse3));
|
|
||||||
#endif
|
|
||||||
#if HAVE_NEON
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_neon));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (*IntraPredUvFunc)(MACROBLOCKD *x,
|
|
||||||
uint8_t *uabove_row,
|
|
||||||
uint8_t *vabove_row,
|
|
||||||
uint8_t *uleft,
|
|
||||||
uint8_t *vleft,
|
|
||||||
int left_stride,
|
|
||||||
uint8_t *upred_ptr,
|
|
||||||
uint8_t *vpred_ptr,
|
|
||||||
int pred_stride);
|
|
||||||
|
|
||||||
class IntraPredUVTest
|
|
||||||
: public IntraPredBase,
|
|
||||||
public ::testing::TestWithParam<IntraPredUvFunc> {
|
|
||||||
public:
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
mb_ = reinterpret_cast<MACROBLOCKD*>(
|
|
||||||
vpx_memalign(32, sizeof(MACROBLOCKD)));
|
|
||||||
mi_ = reinterpret_cast<MODE_INFO*>(
|
|
||||||
vpx_memalign(32, sizeof(MODE_INFO)));
|
|
||||||
data_array_ = reinterpret_cast<uint8_t*>(
|
|
||||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
vpx_free(data_array_);
|
|
||||||
vpx_free(mi_);
|
|
||||||
vpx_free(mb_);
|
|
||||||
data_array_ = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static const int kBlockSize = 8;
|
|
||||||
static const int kDataAlignment = 8;
|
|
||||||
static const int kStride = kBlockSize * 3;
|
|
||||||
// We use 24 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 8-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 9 lines so we have one line above us for top-prediction.
|
|
||||||
// [0] = U, [1] = V
|
|
||||||
static const int kDataBufferSize = 2 * kStride * (kBlockSize + 1);
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
pred_fn_ = GetParam();
|
|
||||||
SetupMacroblock(mb_, mi_, data_array_, kBlockSize, kStride, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) {
|
|
||||||
mbptr_->mode_info_context->mbmi.uv_mode = mode;
|
|
||||||
pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[1] - kStride,
|
|
||||||
data_ptr_[0] - 1, data_ptr_[1] - 1, kStride,
|
|
||||||
data_ptr_[0], data_ptr_[1], kStride);
|
|
||||||
}
|
|
||||||
|
|
||||||
IntraPredUvFunc pred_fn_;
|
|
||||||
// We use 24 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 8-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 9 lines so we have one line above us for top-prediction.
|
|
||||||
// [0] = U, [1] = V
|
|
||||||
static uint8_t* data_array_;
|
|
||||||
static MACROBLOCKD* mb_;
|
|
||||||
static MODE_INFO* mi_;
|
|
||||||
};
|
|
||||||
|
|
||||||
MACROBLOCKD* IntraPredUVTest::mb_ = NULL;
|
|
||||||
MODE_INFO* IntraPredUVTest::mi_ = NULL;
|
|
||||||
uint8_t* IntraPredUVTest::data_array_ = NULL;
|
|
||||||
|
|
||||||
TEST_P(IntraPredUVTest, IntraPredTests) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_c));
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_sse2));
|
|
||||||
#endif
|
|
||||||
#if HAVE_SSSE3
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_ssse3));
|
|
||||||
#endif
|
|
||||||
#if HAVE_NEON
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_neon));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@@ -63,9 +63,22 @@ class InvalidFileTest
|
|||||||
EXPECT_NE(res, EOF) << "Read result data failed";
|
EXPECT_NE(res, EOF) << "Read result data failed";
|
||||||
|
|
||||||
// Check results match.
|
// Check results match.
|
||||||
EXPECT_EQ(expected_res_dec, res_dec)
|
const DecodeParam input = GET_PARAM(1);
|
||||||
<< "Results don't match: frame number = " << video.frame_number()
|
if (input.threads > 1) {
|
||||||
<< ". (" << decoder->DecodeError() << ")";
|
// The serial decode check is too strict for tile-threaded decoding as
|
||||||
|
// there is no guarantee on the decode order nor which specific error
|
||||||
|
// will take precedence. Currently a tile-level error is not forwarded so
|
||||||
|
// the frame will simply be marked corrupt.
|
||||||
|
EXPECT_TRUE(res_dec == expected_res_dec ||
|
||||||
|
res_dec == VPX_CODEC_CORRUPT_FRAME)
|
||||||
|
<< "Results don't match: frame number = " << video.frame_number()
|
||||||
|
<< ". (" << decoder->DecodeError() << "). Expected: "
|
||||||
|
<< expected_res_dec << " or " << VPX_CODEC_CORRUPT_FRAME;
|
||||||
|
} else {
|
||||||
|
EXPECT_EQ(expected_res_dec, res_dec)
|
||||||
|
<< "Results don't match: frame number = " << video.frame_number()
|
||||||
|
<< ". (" << decoder->DecodeError() << ")";
|
||||||
|
}
|
||||||
|
|
||||||
return !HasFailure();
|
return !HasFailure();
|
||||||
}
|
}
|
||||||
@@ -112,7 +125,9 @@ TEST_P(InvalidFileTest, ReturnCode) {
|
|||||||
|
|
||||||
const DecodeParam kVP9InvalidFileTests[] = {
|
const DecodeParam kVP9InvalidFileTests[] = {
|
||||||
{1, "invalid-vp90-02-v2.webm"},
|
{1, "invalid-vp90-02-v2.webm"},
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
{1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"},
|
{1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"},
|
||||||
|
#endif
|
||||||
{1, "invalid-vp90-03-v3.webm"},
|
{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-.ivf"},
|
||||||
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
|
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
|
||||||
@@ -143,7 +158,7 @@ TEST_P(InvalidFileInvalidPeekTest, ReturnCode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
||||||
{1, "invalid-vp90-01-v2.webm"},
|
{1, "invalid-vp90-01-v3.webm"},
|
||||||
};
|
};
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
#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 "./vpx_config.h"
|
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
#include "vp9/common/vp9_entropy.h"
|
||||||
#include "vp9/common/vp9_loopfilter.h"
|
#include "vp9/common/vp9_loopfilter.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
@@ -60,49 +60,49 @@ typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
@@ -114,25 +114,25 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
@@ -141,13 +141,13 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
|
|||||||
void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit,
|
void wrapper_vertical_16_msa(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_msa(s, p, blimit, limit, thresh);
|
vpx_lpf_vertical_16_msa(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);
|
||||||
}
|
}
|
||||||
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
||||||
|
|
||||||
@@ -534,46 +534,46 @@ using std::tr1::make_tuple;
|
|||||||
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, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&vpx_highbd_lpf_horizontal_16_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, 2),
|
&vpx_highbd_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 8, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&vpx_highbd_lpf_horizontal_16_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, 2),
|
&vpx_highbd_lpf_horizontal_16_c, 10, 2),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 10, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&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, 1),
|
&vpx_highbd_lpf_horizontal_16_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, 2),
|
&vpx_highbd_lpf_horizontal_16_c, 12, 2),
|
||||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vp9_highbd_lpf_vertical_8_c, 12, 1),
|
&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, 1),
|
&wrapper_vertical_16_c, 12, 1),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||||
@@ -586,11 +586,13 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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, 1),
|
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, 1),
|
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8, 2),
|
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8, 1),
|
make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
|
||||||
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1)));
|
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_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -598,8 +600,8 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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, 1),
|
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
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,
|
||||||
2)));
|
2)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -608,42 +610,42 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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_VP9_HIGHBITDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -657,36 +659,36 @@ 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, 1),
|
&vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_16_neon,
|
make_tuple(&vpx_lpf_horizontal_16_neon,
|
||||||
&vp9_lpf_horizontal_16_c, 8, 2),
|
&vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&wrapper_vertical_16_neon,
|
make_tuple(&wrapper_vertical_16_neon,
|
||||||
&wrapper_vertical_16_c, 8, 1),
|
&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, 1),
|
&wrapper_vertical_16_dual_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_8_neon,
|
|
||||||
&vp9_lpf_horizontal_8_c, 8, 1),
|
|
||||||
make_tuple(&vp9_lpf_vertical_8_neon,
|
|
||||||
&vp9_lpf_vertical_8_c, 8, 1),
|
|
||||||
#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, 1),
|
&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, 1)));
|
&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_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
@@ -694,23 +696,23 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Loop8Test6Param,
|
MSA, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_lpf_horizontal_8_msa, &vp9_lpf_horizontal_8_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_16_msa, &vp9_lpf_horizontal_16_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||||
make_tuple(&vp9_lpf_horizontal_16_msa, &vp9_lpf_horizontal_16_c, 8, 2),
|
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||||
make_tuple(&vp9_lpf_vertical_8_msa, &vp9_lpf_vertical_8_c, 8, 1),
|
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)));
|
make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Loop8Test9Param,
|
MSA, Loop8Test9Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_lpf_horizontal_4_dual_msa,
|
make_tuple(&vpx_lpf_horizontal_4_dual_msa,
|
||||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_horizontal_8_dual_msa,
|
make_tuple(&vpx_lpf_horizontal_8_dual_msa,
|
||||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_4_dual_msa,
|
make_tuple(&vpx_lpf_vertical_4_dual_msa,
|
||||||
&vp9_lpf_vertical_4_dual_c, 8),
|
&vpx_lpf_vertical_4_dual_c, 8),
|
||||||
make_tuple(&vp9_lpf_vertical_8_dual_msa,
|
make_tuple(&vpx_lpf_vertical_8_dual_msa,
|
||||||
&vp9_lpf_vertical_8_dual_c, 8)));
|
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||||
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
#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 "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_blockd.h"
|
#include "vp9/common/vp9_blockd.h"
|
||||||
#include "vp9/common/vp9_scan.h"
|
#include "vp9/common/vp9_scan.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
@@ -201,62 +202,62 @@ 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 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON && !CONFIG_VP9_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 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
@@ -264,44 +265,44 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
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_VP9_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
|
||||||
|
|
||||||
@@ -309,33 +310,33 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, PartialIDctTest,
|
MSA, 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_msa,
|
&vpx_idct32x32_34_add_msa,
|
||||||
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_msa,
|
&vpx_idct32x32_1_add_msa,
|
||||||
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_msa,
|
&vpx_idct16x16_10_add_msa,
|
||||||
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_msa,
|
&vpx_idct16x16_1_add_msa,
|
||||||
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_msa,
|
&vpx_idct8x8_12_add_msa,
|
||||||
TX_8X8, 10),
|
TX_8X8, 10),
|
||||||
make_tuple(&vp9_fdct8x8_c,
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
&vp9_idct8x8_64_add_c,
|
&vpx_idct8x8_64_add_c,
|
||||||
&vp9_idct8x8_1_add_msa,
|
&vpx_idct8x8_1_add_msa,
|
||||||
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_msa,
|
&vpx_idct4x4_1_add_msa,
|
||||||
TX_4X4, 1)));
|
TX_4X4, 1)));
|
||||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
|
|||||||
@@ -110,4 +110,9 @@ INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest,
|
|||||||
::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
|
::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, VP8PostProcessingFilterTest,
|
||||||
|
::testing::Values(vp8_post_proc_down_and_across_mb_row_msa));
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
#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 "./vp8_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 "./vp8_rtcd.h"
|
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vp8/common/onyx.h"
|
#include "vp8/common/onyx.h"
|
||||||
#include "vp8/encoder/block.h"
|
#include "vp8/encoder/block.h"
|
||||||
@@ -192,4 +192,12 @@ INSTANTIATE_TEST_CASE_P(NEON, QuantizeTest,
|
|||||||
::testing::Values(make_tuple(&vp8_fast_quantize_b_neon,
|
::testing::Values(make_tuple(&vp8_fast_quantize_b_neon,
|
||||||
&vp8_fast_quantize_b_c)));
|
&vp8_fast_quantize_b_c)));
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, QuantizeTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vp8_fast_quantize_b_msa, &vp8_fast_quantize_b_c),
|
||||||
|
make_tuple(&vp8_regular_quantize_b_msa, &vp8_regular_quantize_b_c)));
|
||||||
|
#endif // HAVE_MSA
|
||||||
} // 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>
|
||||||
|
|
||||||
@@ -96,7 +98,7 @@ class RegisterStateCheck {
|
|||||||
|
|
||||||
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,13 +196,27 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||||
libvpx_test::Encoder *encoder) {
|
libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == kStepDownFrame) {
|
if (change_config_) {
|
||||||
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
int new_q = 60;
|
||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
if (video->frame() == 0) {
|
||||||
}
|
struct vpx_scaling_mode mode = {VP8E_ONETWO, VP8E_ONETWO};
|
||||||
if (video->frame() == kStepUpFrame) {
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
}
|
||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
if (video->frame() == 1) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = new_q;
|
||||||
|
encoder->Config(&cfg_);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (video->frame() == kStepDownFrame) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
|
if (video->frame() == kStepUpFrame) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,6 +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;
|
||||||
@@ -371,6 +545,9 @@ VP9_INSTANTIATE_TEST_CASE(ResizeTest,
|
|||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
||||||
::testing::Values(::libvpx_test::kOnePassBest));
|
::testing::Values(::libvpx_test::kOnePassBest));
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 9));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
921
test/sad_test.cc
921
test/sad_test.cc
File diff suppressed because it is too large
Load Diff
@@ -11,13 +11,15 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vp8_rtcd.h"
|
||||||
#include "test/acm_random.h"
|
#include "test/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 "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
@@ -184,58 +186,48 @@ TEST_P(SixtapPredictTest, TestWithRandomData) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
const SixtapPredictFunc sixtap_16x16_c = vp8_sixtap_predict16x16_c;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_c = vp8_sixtap_predict8x8_c;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_c = vp8_sixtap_predict8x4_c;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_c = vp8_sixtap_predict4x4_c;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, SixtapPredictTest, ::testing::Values(
|
C, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_c),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_c),
|
||||||
make_tuple(8, 8, sixtap_8x8_c),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_c),
|
||||||
make_tuple(8, 4, sixtap_8x4_c),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_c),
|
||||||
make_tuple(4, 4, sixtap_4x4_c)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_c)));
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
const SixtapPredictFunc sixtap_16x16_neon = vp8_sixtap_predict16x16_neon;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_neon = vp8_sixtap_predict8x8_neon;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_neon = vp8_sixtap_predict8x4_neon;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
DISABLED_NEON, SixtapPredictTest, ::testing::Values(
|
NEON, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_neon),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_neon),
|
||||||
make_tuple(8, 8, sixtap_8x8_neon),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_neon),
|
||||||
make_tuple(8, 4, sixtap_8x4_neon)));
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_neon)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_MMX
|
#if HAVE_MMX
|
||||||
const SixtapPredictFunc sixtap_16x16_mmx = vp8_sixtap_predict16x16_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_mmx = vp8_sixtap_predict8x8_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_mmx = vp8_sixtap_predict8x4_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_mmx = vp8_sixtap_predict4x4_mmx;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MMX, SixtapPredictTest, ::testing::Values(
|
MMX, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_mmx),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_mmx),
|
||||||
make_tuple(8, 8, sixtap_8x8_mmx),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_mmx),
|
||||||
make_tuple(8, 4, sixtap_8x4_mmx),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_mmx),
|
||||||
make_tuple(4, 4, sixtap_4x4_mmx)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_mmx)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
const SixtapPredictFunc sixtap_16x16_sse2 = vp8_sixtap_predict16x16_sse2;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_sse2 = vp8_sixtap_predict8x8_sse2;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_sse2 = vp8_sixtap_predict8x4_sse2;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, SixtapPredictTest, ::testing::Values(
|
SSE2, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_sse2),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_sse2),
|
||||||
make_tuple(8, 8, sixtap_8x8_sse2),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_sse2),
|
||||||
make_tuple(8, 4, sixtap_8x4_sse2)));
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_sse2)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
const SixtapPredictFunc sixtap_16x16_ssse3 = vp8_sixtap_predict16x16_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_ssse3 = vp8_sixtap_predict8x8_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_ssse3 = vp8_sixtap_predict8x4_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_ssse3 = vp8_sixtap_predict4x4_ssse3;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3, SixtapPredictTest, ::testing::Values(
|
SSSE3, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_ssse3),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_ssse3),
|
||||||
make_tuple(8, 8, sixtap_8x8_ssse3),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_ssse3),
|
||||||
make_tuple(8, 4, sixtap_8x4_ssse3),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_ssse3),
|
||||||
make_tuple(4, 4, sixtap_4x4_ssse3)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_ssse3)));
|
||||||
|
#endif
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MSA, SixtapPredictTest, ::testing::Values(
|
||||||
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_msa),
|
||||||
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_msa),
|
||||||
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_msa),
|
||||||
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_msa)));
|
||||||
#endif
|
#endif
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,123 +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/acm_random.h"
|
|
||||||
#include "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "vp8/common/blockd.h"
|
|
||||||
#include "vp8/encoder/block.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
typedef void (*SubtractBlockFunc)(BLOCK *be, BLOCKD *bd, int pitch);
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
class SubtractBlockTest : public ::testing::TestWithParam<SubtractBlockFunc> {
|
|
||||||
public:
|
|
||||||
virtual void TearDown() {
|
|
||||||
libvpx_test::ClearSystemState();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
TEST_P(SubtractBlockTest, SimpleSubtract) {
|
|
||||||
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
|
|
||||||
uint8_t *source = reinterpret_cast<uint8_t*>(
|
|
||||||
vpx_memalign(16, kBlockHeight * kSrcStride[0] * sizeof(*source)));
|
|
||||||
be.src_diff = reinterpret_cast<int16_t*>(
|
|
||||||
vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*be.src_diff)));
|
|
||||||
bd.predictor = reinterpret_cast<unsigned char*>(
|
|
||||||
vpx_memalign(16, kBlockHeight * kDiffPredStride * sizeof(*bd.predictor)));
|
|
||||||
|
|
||||||
for (int i = 0; kSrcStride[i] > 0; ++i) {
|
|
||||||
// start at block0
|
|
||||||
be.src = 0;
|
|
||||||
be.base_src = &source;
|
|
||||||
be.src_stride = kSrcStride[i];
|
|
||||||
|
|
||||||
// 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
|
|
||||||
uint8_t *base_src = *be.base_src;
|
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
|
||||||
base_src[c] = rnd.Rand8();
|
|
||||||
}
|
|
||||||
base_src += be.src_stride;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set predictor
|
|
||||||
uint8_t *predictor = bd.predictor;
|
|
||||||
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));
|
|
||||||
|
|
||||||
base_src = *be.base_src;
|
|
||||||
src_diff = be.src_diff;
|
|
||||||
predictor = bd.predictor;
|
|
||||||
for (int r = 0; r < kBlockHeight; ++r) {
|
|
||||||
for (int c = 0; c < kBlockWidth; ++c) {
|
|
||||||
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(bd.predictor);
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, SubtractBlockTest,
|
|
||||||
::testing::Values(vp8_subtract_b_c));
|
|
||||||
|
|
||||||
#if HAVE_NEON
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, SubtractBlockTest,
|
|
||||||
::testing::Values(vp8_subtract_b_neon));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_MMX
|
|
||||||
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,11 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
|
|||||||
EXPECT_EQ(sf_count_, 1);
|
EXPECT_EQ(sf_count_, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
|
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
|
||||||
::libvpx_test::kTwoPassGood));
|
::testing::Values(::libvpx_test::kTwoPassGood),
|
||||||
|
::testing::Values(0)));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
|
||||||
|
::testing::Values(::libvpx_test::kTwoPassGood),
|
||||||
|
::testing::Values(CONFIG_MISC_FIXES)));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_422.y4m
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv
|
||||||
|
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_credits.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
||||||
@@ -417,6 +418,18 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
|
||||||
@@ -641,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
|
||||||
@@ -687,8 +728,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
|
|||||||
endif # CONFIG_VP9_HIGHBITDEPTH
|
endif # CONFIG_VP9_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
|
||||||
@@ -768,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
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ b87815bf86020c592ccc7a846ba2e28ec8043902 *hantro_odd.yuv
|
|||||||
456d1493e52d32a5c30edf44a27debc1fa6b253a *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf.res
|
456d1493e52d32a5c30edf44a27debc1fa6b253a *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf.res
|
||||||
c123d1f9f02fb4143abb5e271916e3a3080de8f6 *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf
|
c123d1f9f02fb4143abb5e271916e3a3080de8f6 *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf
|
||||||
456d1493e52d32a5c30edf44a27debc1fa6b253a *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf.res
|
456d1493e52d32a5c30edf44a27debc1fa6b253a *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf.res
|
||||||
fe346136b9b8c1e6f6084cc106485706915795e4 *invalid-vp90-01-v2.webm
|
fe346136b9b8c1e6f6084cc106485706915795e4 *invalid-vp90-01-v3.webm
|
||||||
25751f5d3b05ff03f0719ad42cd625348eb8961e *invalid-vp90-01-v2.webm.res
|
5d9474c0309b7ca09a182d888f73b37a8fe1362c *invalid-vp90-01-v3.webm.res
|
||||||
d78e2fceba5ac942246503ec8366f879c4775ca5 *invalid-vp90-02-v2.webm
|
d78e2fceba5ac942246503ec8366f879c4775ca5 *invalid-vp90-02-v2.webm
|
||||||
8e2eff4af87d2b561cce2365713269e301457ef3 *invalid-vp90-02-v2.webm.res
|
8e2eff4af87d2b561cce2365713269e301457ef3 *invalid-vp90-02-v2.webm.res
|
||||||
df1a1453feb3c00d7d89746c7003b4163523bff3 *invalid-vp90-03-v3.webm
|
df1a1453feb3c00d7d89746c7003b4163523bff3 *invalid-vp90-03-v3.webm
|
||||||
@@ -743,3 +743,92 @@ d06285d109ecbaef63b0cbcc44d70a129186f51c *invalid-vp90-2-03-size-224x196.webm.iv
|
|||||||
e60d859b0ef2b331b21740cf6cb83fabe469b079 *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf
|
e60d859b0ef2b331b21740cf6cb83fabe469b079 *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf
|
||||||
0ae808dca4d3c1152a9576e14830b6faa39f1b4a *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
|
0ae808dca4d3c1152a9576e14830b6faa39f1b4a *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
|
||||||
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
|
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
|
||||||
|
5b5763b388b1b52a81bb82b39f7ec25c4bd3d0e1 *desktop_credits.y4m
|
||||||
|
85771f6ab44e4a0226e206c0cde8351dd5918953 *vp90-2-02-size-130x132.webm
|
||||||
|
512dad5eabbed37b4bbbc64ce153f1a5484427b8 *vp90-2-02-size-130x132.webm.md5
|
||||||
|
01f7127d40360289db63b27f61cb9afcda350e95 *vp90-2-02-size-132x130.webm
|
||||||
|
4a94275328ae076cf60f966c097a8721010fbf5a *vp90-2-02-size-132x130.webm.md5
|
||||||
|
f41c0400b5716b4b70552c40dd03d44be131e1cc *vp90-2-02-size-132x132.webm
|
||||||
|
1a69e989f697e424bfe3e3e8a77bb0c0992c8e47 *vp90-2-02-size-132x132.webm.md5
|
||||||
|
94a5cbfacacba100e0c5f7861c72a1b417feca0f *vp90-2-02-size-178x180.webm
|
||||||
|
dedfecf1d784bcf70629592fa5e6f01d5441ccc9 *vp90-2-02-size-178x180.webm.md5
|
||||||
|
4828b62478c04014bba3095a83106911a71cf387 *vp90-2-02-size-180x178.webm
|
||||||
|
423da2b861050c969d78ed8e8f8f14045d1d8199 *vp90-2-02-size-180x178.webm.md5
|
||||||
|
338f7c9282f43e29940f5391118aadd17e4f9234 *vp90-2-02-size-180x180.webm
|
||||||
|
6c2ef013392310778dca5dd5351160eca66b0a60 *vp90-2-02-size-180x180.webm.md5
|
||||||
|
679fa7d6807e936ff937d7b282e7dbd8ac76447e *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm
|
||||||
|
fc7267ab8fc2bf5d6c234e34ee6c078a967b4888 *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm.md5
|
||||||
|
9d33a137c819792209c5ce4e4e1ee5da73d574fe *vp90-2-14-resize-10frames-fp-tiles-1-2.webm
|
||||||
|
0c78a154956a8605d050bdd75e0dcc4d39c040a6 *vp90-2-14-resize-10frames-fp-tiles-1-2.webm.md5
|
||||||
|
d6a8d8c57f66a91d23e8e7df480f9ae841e56c37 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm
|
||||||
|
e9b4e8c7b33b5fda745d340c3f47e6623ae40cf2 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm.md5
|
||||||
|
aa6fe043a0c4a42b49c87ebbe812d4afd9945bec *vp90-2-14-resize-10frames-fp-tiles-1-8.webm
|
||||||
|
028520578994c2d013d4c0129033d4f2ff31bbe0 *vp90-2-14-resize-10frames-fp-tiles-1-8.webm.md5
|
||||||
|
d1d5463c9ea7b5cc5f609ddedccddf656f348d1a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm
|
||||||
|
92d5872f5bdffbed721703b7e959b4f885e3d77a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm.md5
|
||||||
|
677cb29de1215d97346015af5807a9b1faad54cf *vp90-2-14-resize-10frames-fp-tiles-2-4.webm
|
||||||
|
a5db19f977094ec3fd60b4f7671b3e6740225e12 *vp90-2-14-resize-10frames-fp-tiles-2-4.webm.md5
|
||||||
|
cdd3c52ba21067efdbb2de917fe2a965bf27332e *vp90-2-14-resize-10frames-fp-tiles-2-8.webm
|
||||||
|
db17ec5d894ea8b8d0b7f32206d0dd3d46dcfa6d *vp90-2-14-resize-10frames-fp-tiles-2-8.webm.md5
|
||||||
|
0f6093c472125d05b764d7d1965c1d56771c0ea2 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm
|
||||||
|
bc7c79e1bee07926dd970462ce6f64fc30eec3e1 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm.md5
|
||||||
|
c5142e2bff4091338196c8ea8bc9266e64f548bc *vp90-2-14-resize-10frames-fp-tiles-4-2.webm
|
||||||
|
22aa3dd430b69fd3d92f6561bac86deeed90486d *vp90-2-14-resize-10frames-fp-tiles-4-2.webm.md5
|
||||||
|
ede8b1466d2f26e1b1bd9602addb9cd1017e1d8c *vp90-2-14-resize-10frames-fp-tiles-4-8.webm
|
||||||
|
508d5ebb9c0eac2a4100281a3ee052ec2fc19217 *vp90-2-14-resize-10frames-fp-tiles-4-8.webm.md5
|
||||||
|
2b292e3392854cd1d76ae597a6f53656cf741cfa *vp90-2-14-resize-10frames-fp-tiles-8-1.webm
|
||||||
|
1c24e54fa19e94e1722f24676404444e941c3d31 *vp90-2-14-resize-10frames-fp-tiles-8-1.webm.md5
|
||||||
|
61beda21064e09634564caa6697ab90bd53c9af7 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm
|
||||||
|
9c0657b4d9e1d0e4c9d28a90e5a8630a65519124 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm.md5
|
||||||
|
1758c50a11a7c92522749b4a251664705f1f0d4b *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm
|
||||||
|
4f454a06750614314ae15a44087b79016fe2db97 *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm.md5
|
||||||
|
3920c95ba94f1f048a731d9d9b416043b44aa4bd *vp90-2-14-resize-10frames-fp-tiles-8-4.webm
|
||||||
|
4eb347a0456d2c49a1e1d8de5aa1c51acc39887e *vp90-2-14-resize-10frames-fp-tiles-8-4.webm.md5
|
||||||
|
4b95a74c032a473b6683d7ad5754db1b0ec378e9 *vp90-2-21-resize_inter_1280x720_5_1-2.webm
|
||||||
|
a7826dd386bedfe69d02736969bfb47fb6a40a5e *vp90-2-21-resize_inter_1280x720_5_1-2.webm.md5
|
||||||
|
5cfff79e82c4d69964ccb8e75b4f0c53b9295167 *vp90-2-21-resize_inter_1280x720_5_3-4.webm
|
||||||
|
a18f57db4a25e1f543a99f2ceb182e00db0ee22f *vp90-2-21-resize_inter_1280x720_5_3-4.webm.md5
|
||||||
|
d26db0811bf30eb4131d928669713e2485f8e833 *vp90-2-21-resize_inter_1280x720_7_1-2.webm
|
||||||
|
fd6f9f332cd5bea4c0f0d57be4297bea493cc5a1 *vp90-2-21-resize_inter_1280x720_7_1-2.webm.md5
|
||||||
|
5c7d73d4d268e2ba9593b31cb091fd339505c7fd *vp90-2-21-resize_inter_1280x720_7_3-4.webm
|
||||||
|
7bbb949cabc1e70dadcc74582739f63b833034e0 *vp90-2-21-resize_inter_1280x720_7_3-4.webm.md5
|
||||||
|
f2d2a41a60eb894aff0c5854afca15931f1445a8 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm
|
||||||
|
66d7789992613ac9d678ff905ff1059daa1b89e4 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm.md5
|
||||||
|
764edb75fe7dd64e73a1b4f3b4b2b1bf237a4dea *vp90-2-21-resize_inter_1920x1080_5_3-4.webm
|
||||||
|
f78bea1075983fd990e7f25d4f31438f9b5efa34 *vp90-2-21-resize_inter_1920x1080_5_3-4.webm.md5
|
||||||
|
96496f2ade764a5de9f0c27917c7df1f120fb2ef *vp90-2-21-resize_inter_1920x1080_7_1-2.webm
|
||||||
|
2632b635135ed5ecd67fd22dec7990d29c4f4cb5 *vp90-2-21-resize_inter_1920x1080_7_1-2.webm.md5
|
||||||
|
74889ea42001bf41428cb742ca74e65129c886dc *vp90-2-21-resize_inter_1920x1080_7_3-4.webm
|
||||||
|
d2cf3b25956415bb579d368e7098097e482dd73a *vp90-2-21-resize_inter_1920x1080_7_3-4.webm.md5
|
||||||
|
4658986a8ce36ebfcc80a1903e446eaab3985336 *vp90-2-21-resize_inter_320x180_5_1-2.webm
|
||||||
|
8a3d8cf325109ffa913cc9426c32eea8c202a09a *vp90-2-21-resize_inter_320x180_5_1-2.webm.md5
|
||||||
|
16303aa45176520ee42c2c425247aadc1506b881 *vp90-2-21-resize_inter_320x180_5_3-4.webm
|
||||||
|
41cab1ddf7715b680a4dbce42faa9bcd72af4e5c *vp90-2-21-resize_inter_320x180_5_3-4.webm.md5
|
||||||
|
56648adcee66dd0e5cb6ac947f5ee1b9cc8ba129 *vp90-2-21-resize_inter_320x180_7_1-2.webm
|
||||||
|
70047377787003cc03dda7b2394e6d7eaa666d9e *vp90-2-21-resize_inter_320x180_7_1-2.webm.md5
|
||||||
|
d2ff99165488499cc55f75929f1ce5ca9c9e359b *vp90-2-21-resize_inter_320x180_7_3-4.webm
|
||||||
|
e69019e378114a4643db283b66d1a7e304761a56 *vp90-2-21-resize_inter_320x180_7_3-4.webm.md5
|
||||||
|
4834d129bed0f4289d3a88f2ae3a1736f77621b0 *vp90-2-21-resize_inter_320x240_5_1-2.webm
|
||||||
|
a75653c53d22b623c1927fc0088da21dafef21f4 *vp90-2-21-resize_inter_320x240_5_1-2.webm.md5
|
||||||
|
19818e1b7fd1c1e63d8873c31b0babe29dd33ba6 *vp90-2-21-resize_inter_320x240_5_3-4.webm
|
||||||
|
8d89814ff469a186312111651b16601dfbce4336 *vp90-2-21-resize_inter_320x240_5_3-4.webm.md5
|
||||||
|
ac8057bae52498f324ce92a074d5f8207cc4a4a7 *vp90-2-21-resize_inter_320x240_7_1-2.webm
|
||||||
|
2643440898c83c08cc47bc744245af696b877c24 *vp90-2-21-resize_inter_320x240_7_1-2.webm.md5
|
||||||
|
cf4a4cd38ac8b18c42d8c25a3daafdb39132256b *vp90-2-21-resize_inter_320x240_7_3-4.webm
|
||||||
|
70ba8ec9120b26e9b0ffa2c79b432f16cbcb50ec *vp90-2-21-resize_inter_320x240_7_3-4.webm.md5
|
||||||
|
669f10409fe1c4a054010162ca47773ea1fdbead *vp90-2-21-resize_inter_640x360_5_1-2.webm
|
||||||
|
6355a04249004a35fb386dd1024214234f044383 *vp90-2-21-resize_inter_640x360_5_1-2.webm.md5
|
||||||
|
c23763b950b8247c1775d1f8158d93716197676c *vp90-2-21-resize_inter_640x360_5_3-4.webm
|
||||||
|
59e6fc381e3ec3b7bdaac586334e0bc944d18fb6 *vp90-2-21-resize_inter_640x360_5_3-4.webm.md5
|
||||||
|
71b45cbfdd068baa1f679a69e5e6f421d256a85f *vp90-2-21-resize_inter_640x360_7_1-2.webm
|
||||||
|
1416fc761b690c54a955c4cf017fa078520e8c18 *vp90-2-21-resize_inter_640x360_7_1-2.webm.md5
|
||||||
|
6c409903279448a697e4db63bab1061784bcd8d2 *vp90-2-21-resize_inter_640x360_7_3-4.webm
|
||||||
|
60de1299793433a630b71130cf76c9f5965758e2 *vp90-2-21-resize_inter_640x360_7_3-4.webm.md5
|
||||||
|
852b597b8af096d90c80bf0ed6ed3b336b851f19 *vp90-2-21-resize_inter_640x480_5_1-2.webm
|
||||||
|
f6856f19236ee46ed462bd0a2e7e72b9c3b9cea6 *vp90-2-21-resize_inter_640x480_5_1-2.webm.md5
|
||||||
|
792a16c6f60043bd8dceb515f0b95b8891647858 *vp90-2-21-resize_inter_640x480_5_3-4.webm
|
||||||
|
68ffe59877e9a7863805e1c0a3ce18ce037d7c9d *vp90-2-21-resize_inter_640x480_5_3-4.webm.md5
|
||||||
|
61e044c4759972a35ea3db8c1478a988910a4ef4 *vp90-2-21-resize_inter_640x480_7_1-2.webm
|
||||||
|
7739bfca167b1b43fea72f807f01e097b7cb98d8 *vp90-2-21-resize_inter_640x480_7_1-2.webm.md5
|
||||||
|
7291af354b4418917eee00e3a7e366086a0b7a10 *vp90-2-21-resize_inter_640x480_7_3-4.webm
|
||||||
|
4a18b09ccb36564193f0215f599d745d95bb558c *vp90-2-21-resize_inter_640x480_7_3-4.webm.md5
|
||||||
|
|||||||
41
test/test.mk
41
test/test.mk
@@ -36,6 +36,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
|
|||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += user_priv_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += user_priv_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_frame_parallel_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_frame_parallel_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_refresh_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += borders_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += borders_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
|
||||||
@@ -93,7 +94,7 @@ endif
|
|||||||
ifeq ($(CONFIG_SHARED),)
|
ifeq ($(CONFIG_SHARED),)
|
||||||
|
|
||||||
## VP8
|
## VP8
|
||||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
ifeq ($(CONFIG_VP8),yes)
|
||||||
|
|
||||||
# These tests require both the encoder and decoder to be built.
|
# These tests require both the encoder and decoder to be built.
|
||||||
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
|
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
|
||||||
@@ -103,14 +104,12 @@ endif
|
|||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += subtract_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
|
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-yes += idct_test.cc
|
LIBVPX_TEST_SRCS-yes += idct_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += intrapred_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
|
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
|
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
|
||||||
|
|
||||||
@@ -121,7 +120,7 @@ endif
|
|||||||
endif # VP8
|
endif # VP8
|
||||||
|
|
||||||
## VP9
|
## VP9
|
||||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
|
ifeq ($(CONFIG_VP9),yes)
|
||||||
|
|
||||||
# These tests require both the encoder and decoder to be built.
|
# These tests require both the encoder and decoder to be built.
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
|
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
|
||||||
@@ -134,26 +133,24 @@ LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
|
|||||||
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
|
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += convolve_test.cc
|
LIBVPX_TEST_SRCS-yes += convolve_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_thread_test.cc
|
LIBVPX_TEST_SRCS-yes += lpf_8_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += vp9_intrapred_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_thread_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += lpf_8_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_avg_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += vp9_intrapred_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
|
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
|
||||||
@@ -163,10 +160,24 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
|
|||||||
|
|
||||||
endif # VP9
|
endif # VP9
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
## VP10
|
||||||
|
ifeq ($(CONFIG_VP10),yes)
|
||||||
|
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9_DECODER) := test_intra_pred_speed.cc
|
LIBVPX_TEST_SRCS-yes += vp10_inv_txfm_test.cc
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9_DECODER) += ../md5_utils.h ../md5_utils.c
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_dct_test.cc
|
||||||
|
|
||||||
|
endif # VP10
|
||||||
|
|
||||||
|
## Multi-codec / unconditional whitebox tests.
|
||||||
|
|
||||||
|
ifeq ($(findstring yes,$(CONFIG_VP9_ENCODER)$(CONFIG_VP10_ENCODER)),yes)
|
||||||
|
LIBVPX_TEST_SRCS-yes += avg_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
||||||
|
|
||||||
|
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
|
||||||
|
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
||||||
|
|
||||||
endif # CONFIG_SHARED
|
endif # CONFIG_SHARED
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
* 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.
|
||||||
*/
|
*/
|
||||||
// Test and time VP9 intra-predictor functions
|
// Test and time VPX intra-predictor functions
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.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 "./vp9_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/md5_helper.h"
|
#include "test/md5_helper.h"
|
||||||
@@ -170,215 +170,203 @@ void TestIntraPred32(VpxPredFunc const *pred_funcs) {
|
|||||||
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
|
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
|
||||||
d45, d135, d117, d153, d207, d63, tm) \
|
d45, d135, d117, d153, d207, d63, tm) \
|
||||||
TEST(arch, test_func) { \
|
TEST(arch, test_func) { \
|
||||||
static const VpxPredFunc vp9_intra_pred[] = { \
|
static const VpxPredFunc vpx_intra_pred[] = { \
|
||||||
dc, dc_left, dc_top, dc_128, v, h, d45, \
|
dc, dc_left, dc_top, dc_128, v, h, d45, \
|
||||||
d135, d117, d153, d207, d63, tm}; \
|
d135, d117, d153, d207, d63, tm}; \
|
||||||
test_func(vp9_intra_pred); \
|
test_func(vpx_intra_pred); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// 4x4
|
// 4x4
|
||||||
|
|
||||||
INTRA_PRED_TEST(C, TestIntraPred4, vp9_dc_predictor_4x4_c,
|
INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
|
||||||
vp9_dc_left_predictor_4x4_c, vp9_dc_top_predictor_4x4_c,
|
vpx_dc_left_predictor_4x4_c, vpx_dc_top_predictor_4x4_c,
|
||||||
vp9_dc_128_predictor_4x4_c, vp9_v_predictor_4x4_c,
|
vpx_dc_128_predictor_4x4_c, vpx_v_predictor_4x4_c,
|
||||||
vp9_h_predictor_4x4_c, vp9_d45_predictor_4x4_c,
|
vpx_h_predictor_4x4_c, vpx_d45_predictor_4x4_c,
|
||||||
vp9_d135_predictor_4x4_c, vp9_d117_predictor_4x4_c,
|
vpx_d135_predictor_4x4_c, vpx_d117_predictor_4x4_c,
|
||||||
vp9_d153_predictor_4x4_c, vp9_d207_predictor_4x4_c,
|
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
|
||||||
vp9_d63_predictor_4x4_c, vp9_tm_predictor_4x4_c)
|
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
|
||||||
|
|
||||||
#if HAVE_SSE
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE, TestIntraPred4, vp9_dc_predictor_4x4_sse,
|
INTRA_PRED_TEST(SSE2, TestIntraPred4, vpx_dc_predictor_4x4_sse2,
|
||||||
vp9_dc_left_predictor_4x4_sse, vp9_dc_top_predictor_4x4_sse,
|
vpx_dc_left_predictor_4x4_sse2, vpx_dc_top_predictor_4x4_sse2,
|
||||||
vp9_dc_128_predictor_4x4_sse, vp9_v_predictor_4x4_sse, NULL,
|
vpx_dc_128_predictor_4x4_sse2, vpx_v_predictor_4x4_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, vp9_tm_predictor_4x4_sse)
|
vpx_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
#endif // HAVE_SSE
|
vpx_tm_predictor_4x4_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_h_predictor_4x4_ssse3, vp9_d45_predictor_4x4_ssse3, NULL,
|
NULL, vpx_d45_predictor_4x4_ssse3, NULL, NULL,
|
||||||
NULL, vp9_d153_predictor_4x4_ssse3,
|
vpx_d153_predictor_4x4_ssse3, vpx_d207_predictor_4x4_ssse3,
|
||||||
vp9_d207_predictor_4x4_ssse3, vp9_d63_predictor_4x4_ssse3, NULL)
|
vpx_d63_predictor_4x4_ssse3, NULL)
|
||||||
#endif // HAVE_SSSE3
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vp9_dc_predictor_4x4_dspr2, NULL, NULL,
|
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL,
|
||||||
NULL, NULL, vp9_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
|
NULL, NULL, vpx_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
|
||||||
NULL, NULL, vp9_tm_predictor_4x4_dspr2)
|
NULL, NULL, vpx_tm_predictor_4x4_dspr2)
|
||||||
#endif // HAVE_DSPR2
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INTRA_PRED_TEST(NEON, TestIntraPred4, vp9_dc_predictor_4x4_neon,
|
INTRA_PRED_TEST(NEON, TestIntraPred4, vpx_dc_predictor_4x4_neon,
|
||||||
vp9_dc_left_predictor_4x4_neon, vp9_dc_top_predictor_4x4_neon,
|
vpx_dc_left_predictor_4x4_neon, vpx_dc_top_predictor_4x4_neon,
|
||||||
vp9_dc_128_predictor_4x4_neon, vp9_v_predictor_4x4_neon,
|
vpx_dc_128_predictor_4x4_neon, vpx_v_predictor_4x4_neon,
|
||||||
vp9_h_predictor_4x4_neon, vp9_d45_predictor_4x4_neon,
|
vpx_h_predictor_4x4_neon, vpx_d45_predictor_4x4_neon,
|
||||||
vp9_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
|
vpx_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
|
||||||
vp9_tm_predictor_4x4_neon)
|
vpx_tm_predictor_4x4_neon)
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INTRA_PRED_TEST(MSA, TestIntraPred4, vp9_dc_predictor_4x4_msa,
|
INTRA_PRED_TEST(MSA, TestIntraPred4, vpx_dc_predictor_4x4_msa,
|
||||||
vp9_dc_left_predictor_4x4_msa, vp9_dc_top_predictor_4x4_msa,
|
vpx_dc_left_predictor_4x4_msa, vpx_dc_top_predictor_4x4_msa,
|
||||||
vp9_dc_128_predictor_4x4_msa, vp9_v_predictor_4x4_msa,
|
vpx_dc_128_predictor_4x4_msa, vpx_v_predictor_4x4_msa,
|
||||||
vp9_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, vp9_tm_predictor_4x4_msa)
|
NULL, vpx_tm_predictor_4x4_msa)
|
||||||
#endif // HAVE_MSA
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// 8x8
|
// 8x8
|
||||||
|
|
||||||
INTRA_PRED_TEST(C, TestIntraPred8, vp9_dc_predictor_8x8_c,
|
INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
|
||||||
vp9_dc_left_predictor_8x8_c, vp9_dc_top_predictor_8x8_c,
|
vpx_dc_left_predictor_8x8_c, vpx_dc_top_predictor_8x8_c,
|
||||||
vp9_dc_128_predictor_8x8_c, vp9_v_predictor_8x8_c,
|
vpx_dc_128_predictor_8x8_c, vpx_v_predictor_8x8_c,
|
||||||
vp9_h_predictor_8x8_c, vp9_d45_predictor_8x8_c,
|
vpx_h_predictor_8x8_c, vpx_d45_predictor_8x8_c,
|
||||||
vp9_d135_predictor_8x8_c, vp9_d117_predictor_8x8_c,
|
vpx_d135_predictor_8x8_c, vpx_d117_predictor_8x8_c,
|
||||||
vp9_d153_predictor_8x8_c, vp9_d207_predictor_8x8_c,
|
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
|
||||||
vp9_d63_predictor_8x8_c, vp9_tm_predictor_8x8_c)
|
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
|
||||||
|
|
||||||
#if HAVE_SSE
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE, TestIntraPred8, vp9_dc_predictor_8x8_sse,
|
INTRA_PRED_TEST(SSE2, TestIntraPred8, vpx_dc_predictor_8x8_sse2,
|
||||||
vp9_dc_left_predictor_8x8_sse, vp9_dc_top_predictor_8x8_sse,
|
vpx_dc_left_predictor_8x8_sse2, vpx_dc_top_predictor_8x8_sse2,
|
||||||
vp9_dc_128_predictor_8x8_sse, vp9_v_predictor_8x8_sse, NULL,
|
vpx_dc_128_predictor_8x8_sse2, vpx_v_predictor_8x8_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
vpx_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL, NULL,
|
||||||
#endif // HAVE_SSE
|
NULL, vpx_tm_predictor_8x8_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
|
||||||
NULL, NULL, NULL, NULL, NULL, vp9_tm_predictor_8x8_sse2)
|
|
||||||
#endif // HAVE_SSE2
|
|
||||||
|
|
||||||
#if HAVE_SSSE3
|
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_h_predictor_8x8_ssse3, vp9_d45_predictor_8x8_ssse3, NULL,
|
NULL, vpx_d45_predictor_8x8_ssse3, NULL, NULL,
|
||||||
NULL, vp9_d153_predictor_8x8_ssse3,
|
vpx_d153_predictor_8x8_ssse3, vpx_d207_predictor_8x8_ssse3,
|
||||||
vp9_d207_predictor_8x8_ssse3, vp9_d63_predictor_8x8_ssse3, NULL)
|
vpx_d63_predictor_8x8_ssse3, NULL)
|
||||||
#endif // HAVE_SSSE3
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vp9_dc_predictor_8x8_dspr2, NULL, NULL,
|
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL,
|
||||||
NULL, NULL, vp9_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
|
NULL, NULL, vpx_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
|
||||||
NULL, NULL, vp9_tm_predictor_8x8_c)
|
NULL, NULL, vpx_tm_predictor_8x8_c)
|
||||||
#endif // HAVE_DSPR2
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INTRA_PRED_TEST(NEON, TestIntraPred8, vp9_dc_predictor_8x8_neon,
|
INTRA_PRED_TEST(NEON, TestIntraPred8, vpx_dc_predictor_8x8_neon,
|
||||||
vp9_dc_left_predictor_8x8_neon, vp9_dc_top_predictor_8x8_neon,
|
vpx_dc_left_predictor_8x8_neon, vpx_dc_top_predictor_8x8_neon,
|
||||||
vp9_dc_128_predictor_8x8_neon, vp9_v_predictor_8x8_neon,
|
vpx_dc_128_predictor_8x8_neon, vpx_v_predictor_8x8_neon,
|
||||||
vp9_h_predictor_8x8_neon, vp9_d45_predictor_8x8_neon, NULL,
|
vpx_h_predictor_8x8_neon, vpx_d45_predictor_8x8_neon, NULL,
|
||||||
NULL, NULL, NULL, NULL, vp9_tm_predictor_8x8_neon)
|
NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_neon)
|
||||||
|
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INTRA_PRED_TEST(MSA, TestIntraPred8, vp9_dc_predictor_8x8_msa,
|
INTRA_PRED_TEST(MSA, TestIntraPred8, vpx_dc_predictor_8x8_msa,
|
||||||
vp9_dc_left_predictor_8x8_msa, vp9_dc_top_predictor_8x8_msa,
|
vpx_dc_left_predictor_8x8_msa, vpx_dc_top_predictor_8x8_msa,
|
||||||
vp9_dc_128_predictor_8x8_msa, vp9_v_predictor_8x8_msa,
|
vpx_dc_128_predictor_8x8_msa, vpx_v_predictor_8x8_msa,
|
||||||
vp9_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, vp9_tm_predictor_8x8_msa)
|
NULL, vpx_tm_predictor_8x8_msa)
|
||||||
#endif // HAVE_MSA
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// 16x16
|
// 16x16
|
||||||
|
|
||||||
INTRA_PRED_TEST(C, TestIntraPred16, vp9_dc_predictor_16x16_c,
|
INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c,
|
||||||
vp9_dc_left_predictor_16x16_c, vp9_dc_top_predictor_16x16_c,
|
vpx_dc_left_predictor_16x16_c, vpx_dc_top_predictor_16x16_c,
|
||||||
vp9_dc_128_predictor_16x16_c, vp9_v_predictor_16x16_c,
|
vpx_dc_128_predictor_16x16_c, vpx_v_predictor_16x16_c,
|
||||||
vp9_h_predictor_16x16_c, vp9_d45_predictor_16x16_c,
|
vpx_h_predictor_16x16_c, vpx_d45_predictor_16x16_c,
|
||||||
vp9_d135_predictor_16x16_c, vp9_d117_predictor_16x16_c,
|
vpx_d135_predictor_16x16_c, vpx_d117_predictor_16x16_c,
|
||||||
vp9_d153_predictor_16x16_c, vp9_d207_predictor_16x16_c,
|
vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c,
|
||||||
vp9_d63_predictor_16x16_c, vp9_tm_predictor_16x16_c)
|
vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c)
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred16, vp9_dc_predictor_16x16_sse2,
|
INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
|
||||||
vp9_dc_left_predictor_16x16_sse2,
|
vpx_dc_left_predictor_16x16_sse2,
|
||||||
vp9_dc_top_predictor_16x16_sse2,
|
vpx_dc_top_predictor_16x16_sse2,
|
||||||
vp9_dc_128_predictor_16x16_sse2, vp9_v_predictor_16x16_sse2,
|
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_tm_predictor_16x16_sse2)
|
vpx_tm_predictor_16x16_sse2)
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_h_predictor_16x16_ssse3, vp9_d45_predictor_16x16_ssse3,
|
NULL, vpx_d45_predictor_16x16_ssse3,
|
||||||
NULL, NULL, vp9_d153_predictor_16x16_ssse3,
|
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
|
||||||
vp9_d207_predictor_16x16_ssse3, vp9_d63_predictor_16x16_ssse3,
|
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
|
||||||
NULL)
|
NULL)
|
||||||
#endif // HAVE_SSSE3
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vp9_dc_predictor_16x16_dspr2, NULL,
|
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL,
|
||||||
NULL, NULL, NULL, vp9_h_predictor_16x16_dspr2, NULL, NULL, NULL,
|
NULL, NULL, NULL, vpx_h_predictor_16x16_dspr2, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL, NULL)
|
NULL, NULL, NULL, NULL)
|
||||||
#endif // HAVE_DSPR2
|
#endif // HAVE_DSPR2
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INTRA_PRED_TEST(NEON, TestIntraPred16, vp9_dc_predictor_16x16_neon,
|
INTRA_PRED_TEST(NEON, TestIntraPred16, vpx_dc_predictor_16x16_neon,
|
||||||
vp9_dc_left_predictor_16x16_neon,
|
vpx_dc_left_predictor_16x16_neon,
|
||||||
vp9_dc_top_predictor_16x16_neon,
|
vpx_dc_top_predictor_16x16_neon,
|
||||||
vp9_dc_128_predictor_16x16_neon, vp9_v_predictor_16x16_neon,
|
vpx_dc_128_predictor_16x16_neon, vpx_v_predictor_16x16_neon,
|
||||||
vp9_h_predictor_16x16_neon, vp9_d45_predictor_16x16_neon, NULL,
|
vpx_h_predictor_16x16_neon, vpx_d45_predictor_16x16_neon, NULL,
|
||||||
NULL, NULL, NULL, NULL, vp9_tm_predictor_16x16_neon)
|
NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_neon)
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INTRA_PRED_TEST(MSA, TestIntraPred16, vp9_dc_predictor_16x16_msa,
|
INTRA_PRED_TEST(MSA, TestIntraPred16, vpx_dc_predictor_16x16_msa,
|
||||||
vp9_dc_left_predictor_16x16_msa, vp9_dc_top_predictor_16x16_msa,
|
vpx_dc_left_predictor_16x16_msa, vpx_dc_top_predictor_16x16_msa,
|
||||||
vp9_dc_128_predictor_16x16_msa, vp9_v_predictor_16x16_msa,
|
vpx_dc_128_predictor_16x16_msa, vpx_v_predictor_16x16_msa,
|
||||||
vp9_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, vp9_tm_predictor_16x16_msa)
|
NULL, vpx_tm_predictor_16x16_msa)
|
||||||
#endif // HAVE_MSA
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// 32x32
|
// 32x32
|
||||||
|
|
||||||
INTRA_PRED_TEST(C, TestIntraPred32, vp9_dc_predictor_32x32_c,
|
INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
|
||||||
vp9_dc_left_predictor_32x32_c, vp9_dc_top_predictor_32x32_c,
|
vpx_dc_left_predictor_32x32_c, vpx_dc_top_predictor_32x32_c,
|
||||||
vp9_dc_128_predictor_32x32_c, vp9_v_predictor_32x32_c,
|
vpx_dc_128_predictor_32x32_c, vpx_v_predictor_32x32_c,
|
||||||
vp9_h_predictor_32x32_c, vp9_d45_predictor_32x32_c,
|
vpx_h_predictor_32x32_c, vpx_d45_predictor_32x32_c,
|
||||||
vp9_d135_predictor_32x32_c, vp9_d117_predictor_32x32_c,
|
vpx_d135_predictor_32x32_c, vpx_d117_predictor_32x32_c,
|
||||||
vp9_d153_predictor_32x32_c, vp9_d207_predictor_32x32_c,
|
vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c,
|
||||||
vp9_d63_predictor_32x32_c, vp9_tm_predictor_32x32_c)
|
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
#if ARCH_X86_64
|
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vp9_dc_predictor_32x32_sse2,
|
vpx_dc_left_predictor_32x32_sse2,
|
||||||
vp9_dc_left_predictor_32x32_sse2,
|
vpx_dc_top_predictor_32x32_sse2,
|
||||||
vp9_dc_top_predictor_32x32_sse2,
|
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
||||||
vp9_dc_128_predictor_32x32_sse2, vp9_v_predictor_32x32_sse2,
|
vpx_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, vpx_tm_predictor_32x32_sse2)
|
||||||
vp9_tm_predictor_32x32_sse2)
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
#else
|
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vp9_dc_predictor_32x32_sse2,
|
|
||||||
vp9_dc_left_predictor_32x32_sse2,
|
|
||||||
vp9_dc_top_predictor_32x32_sse2,
|
|
||||||
vp9_dc_128_predictor_32x32_sse2, vp9_v_predictor_32x32_sse2,
|
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
|
||||||
#endif // ARCH_X86_64
|
|
||||||
#endif // HAVE_SSE2
|
|
||||||
|
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_h_predictor_32x32_ssse3, vp9_d45_predictor_32x32_ssse3,
|
NULL, vpx_d45_predictor_32x32_ssse3, NULL, NULL,
|
||||||
NULL, NULL, vp9_d153_predictor_32x32_ssse3,
|
vpx_d153_predictor_32x32_ssse3, vpx_d207_predictor_32x32_ssse3,
|
||||||
vp9_d207_predictor_32x32_ssse3, vp9_d63_predictor_32x32_ssse3,
|
vpx_d63_predictor_32x32_ssse3, NULL)
|
||||||
NULL)
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
#endif // HAVE_SSSE3
|
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INTRA_PRED_TEST(NEON, TestIntraPred32, vp9_dc_predictor_32x32_neon,
|
INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon,
|
||||||
vp9_dc_left_predictor_32x32_neon,
|
vpx_dc_left_predictor_32x32_neon,
|
||||||
vp9_dc_top_predictor_32x32_neon,
|
vpx_dc_top_predictor_32x32_neon,
|
||||||
vp9_dc_128_predictor_32x32_neon, vp9_v_predictor_32x32_neon,
|
vpx_dc_128_predictor_32x32_neon, vpx_v_predictor_32x32_neon,
|
||||||
vp9_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
vp9_tm_predictor_32x32_neon)
|
vpx_tm_predictor_32x32_neon)
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INTRA_PRED_TEST(MSA, TestIntraPred32, vp9_dc_predictor_32x32_msa,
|
INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
|
||||||
vp9_dc_left_predictor_32x32_msa, vp9_dc_top_predictor_32x32_msa,
|
vpx_dc_left_predictor_32x32_msa, vpx_dc_top_predictor_32x32_msa,
|
||||||
vp9_dc_128_predictor_32x32_msa, vp9_v_predictor_32x32_msa,
|
vpx_dc_128_predictor_32x32_msa, vpx_v_predictor_32x32_msa,
|
||||||
vp9_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, vp9_tm_predictor_32x32_msa)
|
NULL, vpx_tm_predictor_32x32_msa)
|
||||||
#endif // HAVE_MSA
|
#endif // HAVE_MSA
|
||||||
|
|
||||||
#include "test/test_libvpx.cc"
|
#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"
|
||||||
@@ -22,8 +25,8 @@ extern void vp9_rtcd();
|
|||||||
extern void vpx_dsp_rtcd();
|
extern void vpx_dsp_rtcd();
|
||||||
extern void vpx_scale_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.
|
||||||
@@ -31,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);
|
||||||
@@ -53,7 +57,7 @@ int main(int argc, char **argv) {
|
|||||||
append_negative_gtest_filter(":AVX.*:AVX/*");
|
append_negative_gtest_filter(":AVX.*:AVX/*");
|
||||||
if (!(simd_caps & HAS_AVX2))
|
if (!(simd_caps & HAS_AVX2))
|
||||||
append_negative_gtest_filter(":AVX2.*: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
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -144,7 +163,7 @@ 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
|
#endif // CONFIG_VP8_DECODER
|
||||||
|
|
||||||
// Test VP9 decode in serial mode with single thread.
|
// Test VP9 decode in serial mode with single thread.
|
||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
|
|||||||
@@ -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",
|
||||||
@@ -182,6 +210,20 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp90-2-14-resize-fp-tiles-4-2.webm", "vp90-2-14-resize-fp-tiles-4-8.webm",
|
"vp90-2-14-resize-fp-tiles-4-2.webm", "vp90-2-14-resize-fp-tiles-4-8.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
|
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
|
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-4.webm",
|
||||||
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
|
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
|
||||||
"vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
|
"vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
|
||||||
"vp90-2-18-resize.ivf", "vp90-2-19-skip.webm",
|
"vp90-2-18-resize.ivf", "vp90-2-19-skip.webm",
|
||||||
@@ -193,10 +235,16 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp93-2-20-10bit-yuv422.webm", "vp93-2-20-12bit-yuv422.webm",
|
"vp93-2-20-10bit-yuv422.webm", "vp93-2-20-12bit-yuv422.webm",
|
||||||
"vp93-2-20-10bit-yuv440.webm", "vp93-2-20-12bit-yuv440.webm",
|
"vp93-2-20-10bit-yuv440.webm", "vp93-2-20-12bit-yuv440.webm",
|
||||||
"vp93-2-20-10bit-yuv444.webm", "vp93-2-20-12bit-yuv444.webm",
|
"vp93-2-20-10bit-yuv444.webm", "vp93-2-20-12bit-yuv444.webm",
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH`
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
"vp90-2-20-big_superframe-01.webm", "vp90-2-20-big_superframe-02.webm",
|
"vp90-2-20-big_superframe-01.webm", "vp90-2-20-big_superframe-02.webm",
|
||||||
|
RESIZE_TEST_VECTORS
|
||||||
};
|
};
|
||||||
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
|
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
|
||||||
|
const char *const kVP9TestVectorsResize[] = {
|
||||||
|
RESIZE_TEST_VECTORS
|
||||||
|
};
|
||||||
|
const int kNumVP9TestVectorsResize = NELEMENTS(kVP9TestVectorsResize);
|
||||||
|
#undef RESIZE_TEST_VECTORS
|
||||||
#endif // CONFIG_VP9_DECODER
|
#endif // CONFIG_VP9_DECODER
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ extern const char *const kVP8TestVectors[];
|
|||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
extern const int kNumVP9TestVectors;
|
extern const int kNumVP9TestVectors;
|
||||||
extern const char *const kVP9TestVectors[];
|
extern const char *const kVP9TestVectors[];
|
||||||
|
extern const int kNumVP9TestVectorsResize;
|
||||||
|
extern const char *const kVP9TestVectorsResize[];
|
||||||
#endif // CONFIG_VP9_DECODER
|
#endif // CONFIG_VP9_DECODER
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|||||||
@@ -104,4 +104,5 @@ TEST_P(TileIndependenceTest, MD5Match) {
|
|||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
// Macros
|
// Macros
|
||||||
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
|
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
|
||||||
|
|
||||||
static double compute_psnr(const vpx_image_t *img1,
|
inline double compute_psnr(const vpx_image_t *img1, const vpx_image_t *img2) {
|
||||||
const vpx_image_t *img2) {
|
|
||||||
assert((img1->fmt == img2->fmt) &&
|
assert((img1->fmt == img2->fmt) &&
|
||||||
(img1->d_w == img2->d_w) &&
|
(img1->d_w == img2->d_w) &&
|
||||||
(img1->d_h == img2->d_h));
|
(img1->d_h == img2->d_h));
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,9 @@
|
|||||||
#define TEST_VIDEO_SOURCE_H_
|
#define TEST_VIDEO_SOURCE_H_
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
#undef NOMINMAX
|
||||||
|
#define NOMINMAX
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
@@ -48,7 +51,7 @@ static std::string GetDataPath() {
|
|||||||
#undef TO_STRING
|
#undef TO_STRING
|
||||||
#undef STRINGIFY
|
#undef STRINGIFY
|
||||||
|
|
||||||
static FILE *OpenTestDataFile(const std::string& file_name) {
|
inline FILE *OpenTestDataFile(const std::string& file_name) {
|
||||||
const std::string path_to_source = GetDataPath() + "/" + file_name;
|
const std::string path_to_source = GetDataPath() + "/" + file_name;
|
||||||
return fopen(path_to_source.c_str(), "rb");
|
return fopen(path_to_source.c_str(), "rb");
|
||||||
}
|
}
|
||||||
|
|||||||
111
test/vp10_dct_test.cc
Normal file
111
test/vp10_dct_test.cc
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "vpx_ports/msvc.h"
|
||||||
|
|
||||||
|
#undef CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||||
|
#define CONFIG_COEFFICIENT_RANGE_CHECKING 1
|
||||||
|
#include "vp10/encoder/dct.c"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void reference_dct_1d(const double *in, double *out, int size) {
|
||||||
|
const double PI = 3.141592653589793238462643383279502884;
|
||||||
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
|
for (int k = 0; k < size; ++k) {
|
||||||
|
out[k] = 0;
|
||||||
|
for (int n = 0; n < size; ++n) {
|
||||||
|
out[k] += in[n] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
}
|
||||||
|
if (k == 0)
|
||||||
|
out[k] = out[k] * kInvSqrt2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef void (*FdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*IdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*FdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
typedef void (*IdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
|
||||||
|
class TransTestBase {
|
||||||
|
public:
|
||||||
|
virtual ~TransTestBase() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void RunFwdAccuracyCheck() {
|
||||||
|
tran_low_t *input = new tran_low_t[txfm_size_];
|
||||||
|
tran_low_t *output = new tran_low_t[txfm_size_];
|
||||||
|
double *ref_input = new double[txfm_size_];
|
||||||
|
double *ref_output = new double[txfm_size_];
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
const int count_test_block = 5000;
|
||||||
|
for (int ti = 0; ti < count_test_block; ++ti) {
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
input[ni] = rnd.Rand8() - rnd.Rand8();
|
||||||
|
ref_input[ni] = static_cast<double>(input[ni]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fwd_txfm_(input, output);
|
||||||
|
fwd_txfm_ref_(ref_input, ref_output, txfm_size_);
|
||||||
|
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
EXPECT_LE(
|
||||||
|
abs(output[ni] - static_cast<tran_low_t>(round(ref_output[ni]))),
|
||||||
|
max_error_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] input;
|
||||||
|
delete[] output;
|
||||||
|
delete[] ref_input;
|
||||||
|
delete[] ref_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
double max_error_;
|
||||||
|
int txfm_size_;
|
||||||
|
FdctFunc fwd_txfm_;
|
||||||
|
FdctFuncRef fwd_txfm_ref_;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<FdctFunc, FdctFuncRef, int, int> FdctParam;
|
||||||
|
class Vp10FwdTxfm
|
||||||
|
: public TransTestBase,
|
||||||
|
public ::testing::TestWithParam<FdctParam> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
fwd_txfm_ref_ = GET_PARAM(1);
|
||||||
|
txfm_size_ = GET_PARAM(2);
|
||||||
|
max_error_ = GET_PARAM(3);
|
||||||
|
}
|
||||||
|
virtual void TearDown() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10FwdTxfm, RunFwdAccuracyCheck) {
|
||||||
|
RunFwdAccuracyCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10FwdTxfm,
|
||||||
|
::testing::Values(
|
||||||
|
FdctParam(&fdct4, &reference_dct_1d, 4, 1),
|
||||||
|
FdctParam(&fdct8, &reference_dct_1d, 8, 1),
|
||||||
|
FdctParam(&fdct16, &reference_dct_1d, 16, 2)));
|
||||||
|
} // namespace
|
||||||
321
test/vp10_inv_txfm_test.cc
Normal file
321
test/vp10_inv_txfm_test.cc
Normal file
@@ -0,0 +1,321 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/blockd.h"
|
||||||
|
#include "vp10/common/scan.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vp10/common/vp10_inv_txfm.h"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const double PI = 3.141592653589793238462643383279502884;
|
||||||
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
|
|
||||||
|
void reference_idct_1d(const double *in, double *out, int size) {
|
||||||
|
for (int n = 0; n < size; ++n) {
|
||||||
|
out[n] = 0;
|
||||||
|
for (int k = 0; k < size; ++k) {
|
||||||
|
if (k == 0)
|
||||||
|
out[n] += kInvSqrt2 * in[k] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
else
|
||||||
|
out[n] += in[k] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef void (*IdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*IdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
|
||||||
|
class TransTestBase {
|
||||||
|
public:
|
||||||
|
virtual ~TransTestBase() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void RunInvAccuracyCheck() {
|
||||||
|
tran_low_t *input = new tran_low_t[txfm_size_];
|
||||||
|
tran_low_t *output = new tran_low_t[txfm_size_];
|
||||||
|
double *ref_input = new double[txfm_size_];
|
||||||
|
double *ref_output = new double[txfm_size_];
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
const int count_test_block = 5000;
|
||||||
|
for (int ti = 0; ti < count_test_block; ++ti) {
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
input[ni] = rnd.Rand8() - rnd.Rand8();
|
||||||
|
ref_input[ni] = static_cast<double>(input[ni]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fwd_txfm_(input, output);
|
||||||
|
fwd_txfm_ref_(ref_input, ref_output, txfm_size_);
|
||||||
|
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
EXPECT_LE(
|
||||||
|
abs(output[ni] - static_cast<tran_low_t>(round(ref_output[ni]))),
|
||||||
|
max_error_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] input;
|
||||||
|
delete[] output;
|
||||||
|
delete[] ref_input;
|
||||||
|
delete[] ref_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
double max_error_;
|
||||||
|
int txfm_size_;
|
||||||
|
IdctFunc fwd_txfm_;
|
||||||
|
IdctFuncRef fwd_txfm_ref_;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<IdctFunc, IdctFuncRef, int, int> IdctParam;
|
||||||
|
class Vp10InvTxfm
|
||||||
|
: public TransTestBase,
|
||||||
|
public ::testing::TestWithParam<IdctParam> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
fwd_txfm_ref_ = GET_PARAM(1);
|
||||||
|
txfm_size_ = GET_PARAM(2);
|
||||||
|
max_error_ = GET_PARAM(3);
|
||||||
|
}
|
||||||
|
virtual void TearDown() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10InvTxfm, RunInvAccuracyCheck) {
|
||||||
|
RunInvAccuracyCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10InvTxfm,
|
||||||
|
::testing::Values(
|
||||||
|
IdctParam(&vp10_idct4_c, &reference_idct_1d, 4, 1),
|
||||||
|
IdctParam(&vp10_idct8_c, &reference_idct_1d, 8, 2),
|
||||||
|
IdctParam(&vp10_idct16_c, &reference_idct_1d, 16, 4),
|
||||||
|
IdctParam(&vp10_idct32_c, &reference_idct_1d, 32, 6))
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride);
|
||||||
|
typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
|
||||||
|
typedef std::tr1::tuple<FwdTxfmFunc,
|
||||||
|
InvTxfmFunc,
|
||||||
|
InvTxfmFunc,
|
||||||
|
TX_SIZE, int> PartialInvTxfmParam;
|
||||||
|
const int kMaxNumCoeffs = 1024;
|
||||||
|
class Vp10PartialIDctTest
|
||||||
|
: public ::testing::TestWithParam<PartialInvTxfmParam> {
|
||||||
|
public:
|
||||||
|
virtual ~Vp10PartialIDctTest() {}
|
||||||
|
virtual void SetUp() {
|
||||||
|
ftxfm_ = GET_PARAM(0);
|
||||||
|
full_itxfm_ = GET_PARAM(1);
|
||||||
|
partial_itxfm_ = GET_PARAM(2);
|
||||||
|
tx_size_ = GET_PARAM(3);
|
||||||
|
last_nonzero_ = GET_PARAM(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int last_nonzero_;
|
||||||
|
TX_SIZE tx_size_;
|
||||||
|
FwdTxfmFunc ftxfm_;
|
||||||
|
InvTxfmFunc full_itxfm_;
|
||||||
|
InvTxfmFunc partial_itxfm_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10PartialIDctTest, RunQuantCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
int size;
|
||||||
|
switch (tx_size_) {
|
||||||
|
case TX_4X4:
|
||||||
|
size = 4;
|
||||||
|
break;
|
||||||
|
case TX_8X8:
|
||||||
|
size = 8;
|
||||||
|
break;
|
||||||
|
case TX_16X16:
|
||||||
|
size = 16;
|
||||||
|
break;
|
||||||
|
case TX_32X32:
|
||||||
|
size = 32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Wrong Size!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
|
|
||||||
|
const int count_test_block = 1000;
|
||||||
|
const int block_size = size * size;
|
||||||
|
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
|
||||||
|
|
||||||
|
int max_error = 0;
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// clear out destination buffer
|
||||||
|
memset(dst1, 0, sizeof(*dst1) * block_size);
|
||||||
|
memset(dst2, 0, sizeof(*dst2) * block_size);
|
||||||
|
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
|
||||||
|
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// Initialize a test block with input range [-255, 255].
|
||||||
|
if (i == 0) {
|
||||||
|
for (int j = 0; j < block_size; ++j)
|
||||||
|
input_extreme_block[j] = 255;
|
||||||
|
} else if (i == 1) {
|
||||||
|
for (int j = 0; j < block_size; ++j)
|
||||||
|
input_extreme_block[j] = -255;
|
||||||
|
} else {
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
input_extreme_block[j] = rnd.Rand8() % 2 ? 255 : -255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ftxfm_(input_extreme_block, output_ref_block, size);
|
||||||
|
|
||||||
|
// quantization with maximum allowed step sizes
|
||||||
|
test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336;
|
||||||
|
for (int j = 1; j < last_nonzero_; ++j)
|
||||||
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]]
|
||||||
|
= (output_ref_block[j] / 1828) * 1828;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
|
||||||
|
ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block1, dst2, size));
|
||||||
|
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
const int diff = dst1[j] - dst2[j];
|
||||||
|
const int error = diff * diff;
|
||||||
|
if (max_error < error)
|
||||||
|
max_error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPECT_EQ(0, max_error)
|
||||||
|
<< "Error: partial inverse transform produces different results";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(Vp10PartialIDctTest, ResultsMatch) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
int size;
|
||||||
|
switch (tx_size_) {
|
||||||
|
case TX_4X4:
|
||||||
|
size = 4;
|
||||||
|
break;
|
||||||
|
case TX_8X8:
|
||||||
|
size = 8;
|
||||||
|
break;
|
||||||
|
case TX_16X16:
|
||||||
|
size = 16;
|
||||||
|
break;
|
||||||
|
case TX_32X32:
|
||||||
|
size = 32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Wrong Size!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
|
const int count_test_block = 1000;
|
||||||
|
const int max_coeff = 32766 / 4;
|
||||||
|
const int block_size = size * size;
|
||||||
|
int max_error = 0;
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// clear out destination buffer
|
||||||
|
memset(dst1, 0, sizeof(*dst1) * block_size);
|
||||||
|
memset(dst2, 0, sizeof(*dst2) * block_size);
|
||||||
|
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
|
||||||
|
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
|
||||||
|
int max_energy_leftover = max_coeff * max_coeff;
|
||||||
|
for (int j = 0; j < last_nonzero_; ++j) {
|
||||||
|
int16_t coef = static_cast<int16_t>(sqrt(1.0 * max_energy_leftover) *
|
||||||
|
(rnd.Rand16() - 32768) / 65536);
|
||||||
|
max_energy_leftover -= coef * coef;
|
||||||
|
if (max_energy_leftover < 0) {
|
||||||
|
max_energy_leftover = 0;
|
||||||
|
coef = 0;
|
||||||
|
}
|
||||||
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]] = coef;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(test_coef_block2, test_coef_block1,
|
||||||
|
sizeof(*test_coef_block2) * block_size);
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
|
||||||
|
ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size));
|
||||||
|
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
const int diff = dst1[j] - dst2[j];
|
||||||
|
const int error = diff * diff;
|
||||||
|
if (max_error < error)
|
||||||
|
max_error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPECT_EQ(0, max_error)
|
||||||
|
<< "Error: partial inverse transform produces different results";
|
||||||
|
}
|
||||||
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10PartialIDctTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
|
&vp10_idct32x32_1024_add_c,
|
||||||
|
&vp10_idct32x32_34_add_c,
|
||||||
|
TX_32X32, 34),
|
||||||
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
|
&vp10_idct32x32_1024_add_c,
|
||||||
|
&vp10_idct32x32_1_add_c,
|
||||||
|
TX_32X32, 1),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vp10_idct16x16_256_add_c,
|
||||||
|
&vp10_idct16x16_10_add_c,
|
||||||
|
TX_16X16, 10),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vp10_idct16x16_256_add_c,
|
||||||
|
&vp10_idct16x16_1_add_c,
|
||||||
|
TX_16X16, 1),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vp10_idct8x8_64_add_c,
|
||||||
|
&vp10_idct8x8_12_add_c,
|
||||||
|
TX_8X8, 12),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vp10_idct8x8_64_add_c,
|
||||||
|
&vp10_idct8x8_1_add_c,
|
||||||
|
TX_8X8, 1),
|
||||||
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
|
&vp10_idct4x4_16_add_c,
|
||||||
|
&vp10_idct4x4_1_add_c,
|
||||||
|
TX_4X4, 1)));
|
||||||
|
} // namespace
|
||||||
@@ -16,12 +16,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
#include "vpx/vpx_integer.h"
|
|
||||||
|
|
||||||
#include "vp8/encoder/boolhuff.h"
|
#include "test/acm_random.h"
|
||||||
#include "vp8/decoder/dboolhuff.h"
|
#include "vp8/decoder/dboolhuff.h"
|
||||||
|
#include "vp8/encoder/boolhuff.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const int num_tests = 10;
|
const int num_tests = 10;
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp8_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
namespace {
|
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"
|
|
||||||
#include "vp9/encoder/vp9_ratectrl.h"
|
#include "vp9/encoder/vp9_ratectrl.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -21,8 +22,8 @@ namespace {
|
|||||||
const unsigned int kFrames = 100;
|
const unsigned int kFrames = 100;
|
||||||
const int kBitrate = 500;
|
const int kBitrate = 500;
|
||||||
|
|
||||||
#define ARF_NOT_SEEN 1000001
|
#define ARF_NOT_SEEN 1000001
|
||||||
#define ARF_SEEN_ONCE 1000000
|
#define ARF_SEEN_ONCE 1000000
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *filename;
|
const char *filename;
|
||||||
@@ -108,7 +109,7 @@ class ArfFreqTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void BeginPassHook(unsigned int) {
|
virtual void BeginPassHook(unsigned int) {
|
||||||
min_arf_ = ARF_NOT_SEEN;
|
min_run_ = ARF_NOT_SEEN;
|
||||||
run_of_visible_frames_ = 0;
|
run_of_visible_frames_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,15 +138,15 @@ class ArfFreqTest
|
|||||||
if (frames == 1) {
|
if (frames == 1) {
|
||||||
run_of_visible_frames_++;
|
run_of_visible_frames_++;
|
||||||
} else if (frames == 2) {
|
} else if (frames == 2) {
|
||||||
if (min_arf_ == ARF_NOT_SEEN) {
|
if (min_run_ == ARF_NOT_SEEN) {
|
||||||
min_arf_ = ARF_SEEN_ONCE;
|
min_run_ = ARF_SEEN_ONCE;
|
||||||
} else if (min_arf_ == ARF_SEEN_ONCE ||
|
} else if (min_run_ == ARF_SEEN_ONCE ||
|
||||||
run_of_visible_frames_ < min_arf_) {
|
run_of_visible_frames_ < min_run_) {
|
||||||
min_arf_ = run_of_visible_frames_;
|
min_run_ = run_of_visible_frames_;
|
||||||
}
|
}
|
||||||
run_of_visible_frames_ = 1;
|
run_of_visible_frames_ = 1;
|
||||||
} else {
|
} else {
|
||||||
min_arf_ = 0;
|
min_run_ = 0;
|
||||||
run_of_visible_frames_ = 1;
|
run_of_visible_frames_ = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,8 +167,8 @@ class ArfFreqTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetMinArfDistance() const {
|
int GetMinVisibleRun() const {
|
||||||
return min_arf_;
|
return min_run_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetMinArfDistanceRequested() const {
|
int GetMinArfDistanceRequested() const {
|
||||||
@@ -185,7 +186,7 @@ class ArfFreqTest
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int min_arf_requested_;
|
int min_arf_requested_;
|
||||||
int min_arf_;
|
int min_run_;
|
||||||
int run_of_visible_frames_;
|
int run_of_visible_frames_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -214,9 +215,10 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||||
const int min_arf_dist = GetMinArfDistance();
|
const int min_run = GetMinVisibleRun();
|
||||||
const int min_arf_dist_requested = GetMinArfDistanceRequested();
|
const int min_arf_dist_requested = GetMinArfDistanceRequested();
|
||||||
if (min_arf_dist != ARF_NOT_SEEN && min_arf_dist != ARF_SEEN_ONCE) {
|
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);
|
EXPECT_GE(min_arf_dist, min_arf_dist_requested);
|
||||||
}
|
}
|
||||||
delete(video);
|
delete(video);
|
||||||
@@ -227,4 +229,24 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kEncodeVectors),
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
::testing::ValuesIn(kMinArfVectors));
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
# if CONFIG_VP10_ENCODER
|
||||||
|
// TODO(angiebird): 25-29 fail in high bitdepth mode.
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DISABLED_VP10, ArfFreqTest,
|
||||||
|
::testing::Combine(
|
||||||
|
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
|
||||||
|
&libvpx_test::kVP10)),
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
|
::testing::ValuesIn(kMinArfVectors)));
|
||||||
|
# endif // CONFIG_VP10_ENCODER
|
||||||
|
#else
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
|
ArfFreqTest,
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // namespace
|
} // 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;
|
||||||
|
|||||||
@@ -8,43 +8,16 @@
|
|||||||
* 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/y4m_video_source.h"
|
|
||||||
#include "test/yuv_video_source.h"
|
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "test/y4m_video_source.h"
|
||||||
#include "vp9/decoder/vp9_decoder.h"
|
#include "vp9/vp9_dx_iface.h"
|
||||||
|
|
||||||
typedef vpx_codec_stream_info_t vp9_stream_info_t;
|
|
||||||
struct vpx_codec_alg_priv {
|
|
||||||
vpx_codec_priv_t base;
|
|
||||||
vpx_codec_dec_cfg_t cfg;
|
|
||||||
vp9_stream_info_t si;
|
|
||||||
struct VP9Decoder *pbi;
|
|
||||||
int postproc_cfg_set;
|
|
||||||
vp8_postproc_cfg_t postproc_cfg;
|
|
||||||
vpx_decrypt_cb decrypt_cb;
|
|
||||||
void *decrypt_state;
|
|
||||||
vpx_image_t img;
|
|
||||||
int img_avail;
|
|
||||||
int flushed;
|
|
||||||
int invert_tile_order;
|
|
||||||
int frame_parallel_decode;
|
|
||||||
|
|
||||||
// External frame buffer info to save for VP9 common.
|
|
||||||
void *ext_priv; // Private data associated with the external frame buffers.
|
|
||||||
vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb;
|
|
||||||
vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb;
|
|
||||||
};
|
|
||||||
|
|
||||||
static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
|
|
||||||
return (vpx_codec_alg_priv_t *)ctx->priv;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const unsigned int kFramerate = 50;
|
|
||||||
const int kCpuUsed = 2;
|
const int kCpuUsed = 2;
|
||||||
|
|
||||||
struct EncodePerfTestVideo {
|
struct EncodePerfTestVideo {
|
||||||
@@ -65,37 +38,29 @@ struct EncodeParameters {
|
|||||||
int32_t lossless;
|
int32_t lossless;
|
||||||
int32_t error_resilient;
|
int32_t error_resilient;
|
||||||
int32_t frame_parallel;
|
int32_t frame_parallel;
|
||||||
|
vpx_color_range_t color_range;
|
||||||
vpx_color_space_t cs;
|
vpx_color_space_t cs;
|
||||||
|
int render_size[2];
|
||||||
// TODO(JBB): quantizers / bitrate
|
// TODO(JBB): quantizers / bitrate
|
||||||
};
|
};
|
||||||
|
|
||||||
const EncodeParameters kVP9EncodeParameterSet[] = {
|
const EncodeParameters kVP9EncodeParameterSet[] = {
|
||||||
{0, 0, 0, 1, 0, VPX_CS_BT_601},
|
{0, 0, 0, 1, 0, VPX_CR_STUDIO_RANGE, VPX_CS_BT_601},
|
||||||
{0, 0, 0, 0, 0, VPX_CS_BT_709},
|
{0, 0, 0, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_709},
|
||||||
{0, 0, 1, 0, 0, VPX_CS_BT_2020},
|
{0, 0, 1, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_2020},
|
||||||
{0, 2, 0, 0, 1, VPX_CS_UNKNOWN},
|
{0, 2, 0, 0, 1, VPX_CR_STUDIO_RANGE, VPX_CS_UNKNOWN, { 640, 480 }},
|
||||||
// TODO(JBB): Test profiles (requires more work).
|
// TODO(JBB): Test profiles (requires more work).
|
||||||
};
|
};
|
||||||
|
|
||||||
int is_extension_y4m(const char *filename) {
|
class VpxEncoderParmsGetToDecoder
|
||||||
const char *dot = strrchr(filename, '.');
|
|
||||||
if (!dot || dot == filename)
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return !strcmp(dot, ".y4m");
|
|
||||||
}
|
|
||||||
|
|
||||||
class Vp9EncoderParmsGetToDecoder
|
|
||||||
: public ::libvpx_test::EncoderTest,
|
: public ::libvpx_test::EncoderTest,
|
||||||
public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
|
public ::libvpx_test::CodecTestWith2Params<EncodeParameters,
|
||||||
EncodePerfTestVideo> {
|
EncodePerfTestVideo> {
|
||||||
protected:
|
protected:
|
||||||
Vp9EncoderParmsGetToDecoder()
|
VpxEncoderParmsGetToDecoder()
|
||||||
: EncoderTest(GET_PARAM(0)),
|
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
|
||||||
encode_parms(GET_PARAM(1)) {
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Vp9EncoderParmsGetToDecoder() {}
|
virtual ~VpxEncoderParmsGetToDecoder() {}
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
InitializeConfig();
|
InitializeConfig();
|
||||||
@@ -111,6 +76,7 @@ class Vp9EncoderParmsGetToDecoder
|
|||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == 1) {
|
if (video->frame() == 1) {
|
||||||
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
||||||
|
encoder->Control(VP9E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||||
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
||||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
||||||
encode_parms.frame_parallel);
|
encode_parms.frame_parallel);
|
||||||
@@ -121,37 +87,44 @@ class Vp9EncoderParmsGetToDecoder
|
|||||||
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||||
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||||
|
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0)
|
||||||
|
encoder->Control(VP9E_SET_RENDER_SIZE, encode_parms.render_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||||
const libvpx_test::VideoSource& video,
|
const libvpx_test::VideoSource &video,
|
||||||
libvpx_test::Decoder *decoder) {
|
libvpx_test::Decoder *decoder) {
|
||||||
vpx_codec_ctx_t* vp9_decoder = decoder->GetDecoder();
|
vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder();
|
||||||
vpx_codec_alg_priv_t* priv =
|
vpx_codec_alg_priv_t *const priv =
|
||||||
(vpx_codec_alg_priv_t*) get_alg_priv(vp9_decoder);
|
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
|
||||||
|
FrameWorkerData *const worker_data =
|
||||||
VP9Decoder* pbi = priv->pbi;
|
reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1);
|
||||||
VP9_COMMON* common = &pbi->common;
|
VP9_COMMON *const common = &worker_data->pbi->common;
|
||||||
|
|
||||||
if (encode_parms.lossless) {
|
if (encode_parms.lossless) {
|
||||||
EXPECT_EQ(common->base_qindex, 0);
|
EXPECT_EQ(0, common->base_qindex);
|
||||||
EXPECT_EQ(common->y_dc_delta_q, 0);
|
EXPECT_EQ(0, common->y_dc_delta_q);
|
||||||
EXPECT_EQ(common->uv_dc_delta_q, 0);
|
EXPECT_EQ(0, common->uv_dc_delta_q);
|
||||||
EXPECT_EQ(common->uv_ac_delta_q, 0);
|
EXPECT_EQ(0, common->uv_ac_delta_q);
|
||||||
EXPECT_EQ(common->tx_mode, ONLY_4X4);
|
EXPECT_EQ(ONLY_4X4, common->tx_mode);
|
||||||
}
|
}
|
||||||
EXPECT_EQ(common->error_resilient_mode, encode_parms.error_resilient);
|
EXPECT_EQ(encode_parms.error_resilient, common->error_resilient_mode);
|
||||||
if (encode_parms.error_resilient) {
|
if (encode_parms.error_resilient) {
|
||||||
EXPECT_EQ(common->frame_parallel_decoding_mode, 1);
|
EXPECT_EQ(1, common->frame_parallel_decoding_mode);
|
||||||
EXPECT_EQ(common->use_prev_frame_mvs, 0);
|
EXPECT_EQ(0, common->use_prev_frame_mvs);
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(common->frame_parallel_decoding_mode,
|
EXPECT_EQ(encode_parms.frame_parallel,
|
||||||
encode_parms.frame_parallel);
|
common->frame_parallel_decoding_mode);
|
||||||
}
|
}
|
||||||
EXPECT_EQ(common->color_space, encode_parms.cs);
|
EXPECT_EQ(encode_parms.color_range, common->color_range);
|
||||||
EXPECT_EQ(common->log2_tile_cols, encode_parms.tile_cols);
|
EXPECT_EQ(encode_parms.cs, common->color_space);
|
||||||
EXPECT_EQ(common->log2_tile_rows, encode_parms.tile_rows);
|
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0) {
|
||||||
|
EXPECT_EQ(encode_parms.render_size[0], common->render_width);
|
||||||
|
EXPECT_EQ(encode_parms.render_size[1], common->render_height);
|
||||||
|
}
|
||||||
|
EXPECT_EQ(encode_parms.tile_cols, common->log2_tile_cols);
|
||||||
|
EXPECT_EQ(encode_parms.tile_rows, common->log2_tile_rows);
|
||||||
|
|
||||||
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
||||||
return VPX_CODEC_OK == res_dec;
|
return VPX_CODEC_OK == res_dec;
|
||||||
@@ -163,31 +136,18 @@ class Vp9EncoderParmsGetToDecoder
|
|||||||
EncodeParameters encode_parms;
|
EncodeParameters encode_parms;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO(hkuang): This test conflicts with frame parallel decode. So disable it
|
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
|
||||||
// for now until fix.
|
|
||||||
TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
|
|
||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
|
||||||
libvpx_test::VideoSource *video;
|
libvpx_test::VideoSource *const video =
|
||||||
if (is_extension_y4m(test_video_.name)) {
|
new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
|
||||||
video = new libvpx_test::Y4mVideoSource(test_video_.name,
|
ASSERT_TRUE(video != NULL);
|
||||||
0, test_video_.frames);
|
|
||||||
} else {
|
|
||||||
video = new libvpx_test::YUVVideoSource(test_video_.name,
|
|
||||||
VPX_IMG_FMT_I420,
|
|
||||||
test_video_.width,
|
|
||||||
test_video_.height,
|
|
||||||
kFramerate, 1, 0,
|
|
||||||
test_video_.frames);
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||||
delete(video);
|
delete video;
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP9_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
|
||||||
Vp9EncoderParmsGetToDecoder,
|
::testing::ValuesIn(kVP9EncodeParameterSet),
|
||||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
|
||||||
|
|
||||||
} // namespace
|
} // 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 {
|
||||||
|
|
||||||
@@ -186,4 +187,23 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
# if CONFIG_VP10_ENCODER
|
||||||
|
// TODO(angiebird): many fail in high bitdepth mode.
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DISABLED_VP10, EndToEndTestLarge,
|
||||||
|
::testing::Combine(
|
||||||
|
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
|
||||||
|
&libvpx_test::kVP10)),
|
||||||
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kCpuUsedVectors)));
|
||||||
|
# endif // CONFIG_VP10_ENCODER
|
||||||
|
#else
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
|
EndToEndTestLarge,
|
||||||
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.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"
|
||||||
@@ -67,12 +67,22 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
|||||||
int64_t ret;
|
int64_t ret;
|
||||||
int64_t ref_ssz;
|
int64_t ref_ssz;
|
||||||
int64_t ref_ret;
|
int64_t ref_ret;
|
||||||
|
const int msb = bit_depth_ + 8 - 1;
|
||||||
for (int i = 0; i < kNumIterations; ++i) {
|
for (int i = 0; i < kNumIterations; ++i) {
|
||||||
int err_count = 0;
|
int err_count = 0;
|
||||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||||
for (int j = 0; j < block_size; j++) {
|
for (int j = 0; j < block_size; j++) {
|
||||||
coeff[j] = rnd(2 << 20) - (1 << 20);
|
// coeff and dqcoeff will always have at least the same sign, and this
|
||||||
dqcoeff[j] = rnd(2 << 20) - (1 << 20);
|
// can be used for optimization, so generate test input precisely.
|
||||||
|
if (rnd(2)) {
|
||||||
|
// Positive number
|
||||||
|
coeff[j] = rnd(1 << msb);
|
||||||
|
dqcoeff[j] = rnd(1 << msb);
|
||||||
|
} else {
|
||||||
|
// Negative number
|
||||||
|
coeff[j] = -rnd(1 << msb);
|
||||||
|
dqcoeff[j] = -rnd(1 << msb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
||||||
bit_depth_);
|
bit_depth_);
|
||||||
@@ -85,7 +95,7 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
|||||||
err_count_total += err_count;
|
err_count_total += err_count;
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, err_count_total)
|
EXPECT_EQ(0, err_count_total)
|
||||||
<< "Error: Error Block Test, C output doesn't match SSE2 output. "
|
<< "Error: Error Block Test, C output doesn't match optimized output. "
|
||||||
<< "First failed at test case " << first_failure;
|
<< "First failed at test case " << first_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,23 +110,36 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
|||||||
int64_t ret;
|
int64_t ret;
|
||||||
int64_t ref_ssz;
|
int64_t ref_ssz;
|
||||||
int64_t ref_ret;
|
int64_t ref_ret;
|
||||||
int max_val = ((1 << 20) - 1);
|
const int msb = bit_depth_ + 8 - 1;
|
||||||
|
int max_val = ((1 << msb) - 1);
|
||||||
for (int i = 0; i < kNumIterations; ++i) {
|
for (int i = 0; i < kNumIterations; ++i) {
|
||||||
int err_count = 0;
|
int err_count = 0;
|
||||||
int k = (i / 9) % 5;
|
int k = (i / 9) % 9;
|
||||||
|
|
||||||
// Change the maximum coeff value, to test different bit boundaries
|
// Change the maximum coeff value, to test different bit boundaries
|
||||||
if ( k == 4 && (i % 9) == 0 ) {
|
if ( k == 8 && (i % 9) == 0 ) {
|
||||||
max_val >>= 1;
|
max_val >>= 1;
|
||||||
}
|
}
|
||||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||||
for (int j = 0; j < block_size; j++) {
|
for (int j = 0; j < block_size; j++) {
|
||||||
if (k < 4) { // Test at maximum values
|
if (k < 4) {
|
||||||
coeff[j] = k % 2 ? max_val : -max_val;
|
// Test at positive maximum values
|
||||||
dqcoeff[j] = (k >> 1) % 2 ? max_val : -max_val;
|
coeff[j] = k % 2 ? max_val : 0;
|
||||||
|
dqcoeff[j] = (k >> 1) % 2 ? max_val : 0;
|
||||||
|
} else if (k < 8) {
|
||||||
|
// Test at negative maximum values
|
||||||
|
coeff[j] = k % 2 ? -max_val : 0;
|
||||||
|
dqcoeff[j] = (k >> 1) % 2 ? -max_val : 0;
|
||||||
} else {
|
} else {
|
||||||
coeff[j] = rnd(2 << 14) - (1 << 14);
|
if (rnd(2)) {
|
||||||
dqcoeff[j] = rnd(2 << 14) - (1 << 14);
|
// Positive number
|
||||||
|
coeff[j] = rnd(1 << 14);
|
||||||
|
dqcoeff[j] = rnd(1 << 14);
|
||||||
|
} else {
|
||||||
|
// Negative number
|
||||||
|
coeff[j] = -rnd(1 << 14);
|
||||||
|
dqcoeff[j] = -rnd(1 << 14);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
||||||
@@ -130,13 +153,30 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
|||||||
err_count_total += err_count;
|
err_count_total += err_count;
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, err_count_total)
|
EXPECT_EQ(0, err_count_total)
|
||||||
<< "Error: Error Block Test, C output doesn't match SSE2 output. "
|
<< "Error: Error Block Test, C output doesn't match optimized output. "
|
||||||
<< "First failed at test case " << first_failure;
|
<< "First failed at test case " << first_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_c(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp9_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp9_highbd_block_error_8bit_sse2(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, ErrorBlockTest,
|
SSE2, ErrorBlockTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
@@ -145,7 +185,27 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp9_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_12),
|
&vp9_highbd_block_error_c, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp9_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_8)));
|
&vp9_highbd_block_error_c, VPX_BITS_8),
|
||||||
|
make_tuple(&wrap_vp9_highbd_block_error_8bit_sse2,
|
||||||
|
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
|
#if HAVE_AVX
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
assert(bps == 8);
|
||||||
|
return vp9_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
AVX, ErrorBlockTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&wrap_vp9_highbd_block_error_8bit_avx,
|
||||||
|
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_AVX
|
||||||
|
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -130,8 +130,13 @@ TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP9_INSTANTIATE_TEST_CASE(
|
||||||
VP9EncoderThreadTest,
|
VPxEncoderThreadTest,
|
||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kRealTime),
|
::libvpx_test::kRealTime),
|
||||||
::testing::Range(1, 9));
|
::testing::Range(1, 9));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
|
VPxEncoderThreadTest,
|
||||||
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||||
|
::testing::Range(1, 3));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#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 "./vp9_rtcd.h"
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "test/util.h"
|
||||||
#include "vp9/common/vp9_blockd.h"
|
#include "vp9/common/vp9_blockd.h"
|
||||||
#include "vp9/common/vp9_pred_common.h"
|
#include "vp9/common/vp9_pred_common.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "test/util.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -131,168 +131,101 @@ using std::tr1::make_tuple;
|
|||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
#if ARCH_X86_64
|
#if CONFIG_USE_X86INC
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
&vp9_highbd_dc_predictor_32x32_c, 32, 8),
|
&vpx_highbd_dc_predictor_32x32_c, 32, 8),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
&vp9_highbd_tm_predictor_16x16_c, 16, 8),
|
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vp9_highbd_tm_predictor_32x32_c, 32, 8),
|
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 8),
|
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 8),
|
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16, 8),
|
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 8),
|
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 8),
|
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16, 8),
|
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32, 8),
|
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 8),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 8)));
|
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 8),
|
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
10),
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 8),
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16, 8),
|
10),
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 8),
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
10),
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 8),
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16, 8),
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32, 8),
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 8),
|
10),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 8)));
|
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
||||||
#endif
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
#if ARCH_X86_64
|
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||||
::testing::Values(
|
&vpx_highbd_v_predictor_16x16_c, 16,
|
||||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
10),
|
||||||
&vp9_highbd_dc_predictor_32x32_c, 32,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
10),
|
&vpx_highbd_v_predictor_32x32_c, 32,
|
||||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
10),
|
||||||
&vp9_highbd_tm_predictor_16x16_c, 16,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
10),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vp9_highbd_tm_predictor_32x32_c, 32,
|
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||||
10),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16,
|
|
||||||
10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16,
|
|
||||||
10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32,
|
|
||||||
10),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 10)));
|
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16,
|
|
||||||
10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16, 10),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32, 10),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 10)));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ARCH_X86_64
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
&vp9_highbd_dc_predictor_32x32_c, 32,
|
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||||
&vp9_highbd_tm_predictor_16x16_c, 16,
|
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vp9_highbd_tm_predictor_32x32_c, 32,
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 12),
|
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 12),
|
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16,
|
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 12),
|
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 12),
|
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16,
|
&vpx_highbd_v_predictor_16x16_c, 16,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32,
|
&vpx_highbd_v_predictor_32x32_c, 32,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 12),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 12)));
|
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
#endif // CONFIG_USE_X86INC
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_dc_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_8x8_c, 8, 12),
|
|
||||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_dc_predictor_16x16_c, 16,
|
|
||||||
12),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_v_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_v_predictor_8x8_c, 8, 12),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vp9_highbd_v_predictor_16x16_c, 16, 12),
|
|
||||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vp9_highbd_v_predictor_32x32_c, 32, 12),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vp9_highbd_tm_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vp9_highbd_tm_predictor_8x8_c, 8, 12)));
|
|
||||||
#endif
|
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
} // namespace
|
} // 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"
|
||||||
@@ -125,4 +127,8 @@ VP9_INSTANTIATE_TEST_CASE(LosslessTest,
|
|||||||
::testing::Values(::libvpx_test::kRealTime,
|
::testing::Values(::libvpx_test::kRealTime,
|
||||||
::libvpx_test::kOnePassGood,
|
::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
|
|
||||||
|
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
|
||||||
|
::testing::Values(::libvpx_test::kOnePassGood,
|
||||||
|
::libvpx_test::kTwoPassGood));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
#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 "./vpx_config.h"
|
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_entropy.h"
|
#include "vp9/common/vp9_entropy.h"
|
||||||
#include "vp9/common/vp9_scan.h"
|
#include "vp9/common/vp9_scan.h"
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
@@ -331,21 +331,21 @@ using std::tr1::make_tuple;
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, VP9QuantizeTest,
|
SSE2, VP9QuantizeTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
&vp9_highbd_quantize_b_c, VPX_BITS_8),
|
&vpx_highbd_quantize_b_c, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
&vp9_highbd_quantize_b_c, VPX_BITS_10),
|
&vpx_highbd_quantize_b_c, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||||
&vp9_highbd_quantize_b_c, VPX_BITS_12)));
|
&vpx_highbd_quantize_b_c, VPX_BITS_12)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, VP9Quantize32Test,
|
SSE2, VP9Quantize32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_8),
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_8),
|
||||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_10),
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_10),
|
||||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_12)));
|
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_12)));
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ vp9_spatial_svc() {
|
|||||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||||
local readonly test_name="vp9_spatial_svc"
|
local readonly test_name="vp9_spatial_svc"
|
||||||
for layers in $(seq 1 ${vp9_ssvc_test_layers}); do
|
for layers in $(seq 1 ${vp9_ssvc_test_layers}); do
|
||||||
vp9_spatial_svc_encoder "${test_name}" -l ${layers}
|
vp9_spatial_svc_encoder "${test_name}" -sl ${layers}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp9_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 "./vp9_rtcd.h"
|
|
||||||
#include "vp9/common/vp9_blockd.h"
|
#include "vp9/common/vp9_blockd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
@@ -89,15 +91,19 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
|
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
|
||||||
::testing::Values(vp9_subtract_block_c));
|
::testing::Values(vpx_subtract_block_c));
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
|
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
|
||||||
::testing::Values(vp9_subtract_block_sse2));
|
::testing::Values(vpx_subtract_block_sse2));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
|
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
|
||||||
::testing::Values(vp9_subtract_block_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
|
||||||
|
|
||||||
} // namespace vp9
|
} // namespace vp9
|
||||||
|
|||||||
@@ -18,33 +18,33 @@
|
|||||||
#if CONFIG_WEBM_IO
|
#if CONFIG_WEBM_IO
|
||||||
#include "test/webm_video_source.h"
|
#include "test/webm_video_source.h"
|
||||||
#endif
|
#endif
|
||||||
#include "vp9/common/vp9_thread.h"
|
#include "vpx_util/vpx_thread.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
class VP9WorkerThreadTest : public ::testing::TestWithParam<bool> {
|
class VPxWorkerThreadTest : public ::testing::TestWithParam<bool> {
|
||||||
protected:
|
protected:
|
||||||
virtual ~VP9WorkerThreadTest() {}
|
virtual ~VPxWorkerThreadTest() {}
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
vp9_get_worker_interface()->init(&worker_);
|
vpx_get_worker_interface()->init(&worker_);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
vp9_get_worker_interface()->end(&worker_);
|
vpx_get_worker_interface()->end(&worker_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Run(VP9Worker* worker) {
|
void Run(VPxWorker* worker) {
|
||||||
const bool synchronous = GetParam();
|
const bool synchronous = GetParam();
|
||||||
if (synchronous) {
|
if (synchronous) {
|
||||||
vp9_get_worker_interface()->execute(worker);
|
vpx_get_worker_interface()->execute(worker);
|
||||||
} else {
|
} else {
|
||||||
vp9_get_worker_interface()->launch(worker);
|
vpx_get_worker_interface()->launch(worker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9Worker worker_;
|
VPxWorker worker_;
|
||||||
};
|
};
|
||||||
|
|
||||||
int ThreadHook(void* data, void* return_value) {
|
int ThreadHook(void* data, void* return_value) {
|
||||||
@@ -53,12 +53,12 @@ int ThreadHook(void* data, void* return_value) {
|
|||||||
return *reinterpret_cast<int*>(return_value);
|
return *reinterpret_cast<int*>(return_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(VP9WorkerThreadTest, HookSuccess) {
|
TEST_P(VPxWorkerThreadTest, HookSuccess) {
|
||||||
// should be a no-op.
|
// should be a no-op.
|
||||||
EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
|
||||||
|
|
||||||
int hook_data = 0;
|
int hook_data = 0;
|
||||||
int return_value = 1; // return successfully from the hook
|
int return_value = 1; // return successfully from the hook
|
||||||
@@ -67,17 +67,17 @@ TEST_P(VP9WorkerThreadTest, HookSuccess) {
|
|||||||
worker_.data2 = &return_value;
|
worker_.data2 = &return_value;
|
||||||
|
|
||||||
Run(&worker_);
|
Run(&worker_);
|
||||||
EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
|
||||||
EXPECT_FALSE(worker_.had_error);
|
EXPECT_FALSE(worker_.had_error);
|
||||||
EXPECT_EQ(5, hook_data);
|
EXPECT_EQ(5, hook_data);
|
||||||
|
|
||||||
// should be a no-op.
|
// should be a no-op.
|
||||||
EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(VP9WorkerThreadTest, HookFailure) {
|
TEST_P(VPxWorkerThreadTest, HookFailure) {
|
||||||
EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
|
||||||
|
|
||||||
int hook_data = 0;
|
int hook_data = 0;
|
||||||
int return_value = 0; // return failure from the hook
|
int return_value = 0; // return failure from the hook
|
||||||
@@ -86,29 +86,29 @@ TEST_P(VP9WorkerThreadTest, HookFailure) {
|
|||||||
worker_.data2 = &return_value;
|
worker_.data2 = &return_value;
|
||||||
|
|
||||||
Run(&worker_);
|
Run(&worker_);
|
||||||
EXPECT_FALSE(vp9_get_worker_interface()->sync(&worker_));
|
EXPECT_FALSE(vpx_get_worker_interface()->sync(&worker_));
|
||||||
EXPECT_EQ(1, worker_.had_error);
|
EXPECT_EQ(1, worker_.had_error);
|
||||||
|
|
||||||
// Ensure _reset() clears the error and _launch() can be called again.
|
// Ensure _reset() clears the error and _launch() can be called again.
|
||||||
return_value = 1;
|
return_value = 1;
|
||||||
EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
|
||||||
EXPECT_FALSE(worker_.had_error);
|
EXPECT_FALSE(worker_.had_error);
|
||||||
vp9_get_worker_interface()->launch(&worker_);
|
vpx_get_worker_interface()->launch(&worker_);
|
||||||
EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
|
EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
|
||||||
EXPECT_FALSE(worker_.had_error);
|
EXPECT_FALSE(worker_.had_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
|
TEST_P(VPxWorkerThreadTest, EndWithoutSync) {
|
||||||
// Create a large number of threads to increase the chances of detecting a
|
// Create a large number of threads to increase the chances of detecting a
|
||||||
// race. Doing more work in the hook is no guarantee as any race would occur
|
// race. Doing more work in the hook is no guarantee as any race would occur
|
||||||
// post hook execution in the main thread loop driver.
|
// post hook execution in the main thread loop driver.
|
||||||
static const int kNumWorkers = 64;
|
static const int kNumWorkers = 64;
|
||||||
VP9Worker workers[kNumWorkers];
|
VPxWorker workers[kNumWorkers];
|
||||||
int hook_data[kNumWorkers];
|
int hook_data[kNumWorkers];
|
||||||
int return_value[kNumWorkers];
|
int return_value[kNumWorkers];
|
||||||
|
|
||||||
for (int n = 0; n < kNumWorkers; ++n) {
|
for (int n = 0; n < kNumWorkers; ++n) {
|
||||||
vp9_get_worker_interface()->init(&workers[n]);
|
vpx_get_worker_interface()->init(&workers[n]);
|
||||||
return_value[n] = 1; // return successfully from the hook
|
return_value[n] = 1; // return successfully from the hook
|
||||||
workers[n].hook = ThreadHook;
|
workers[n].hook = ThreadHook;
|
||||||
workers[n].data1 = &hook_data[n];
|
workers[n].data1 = &hook_data[n];
|
||||||
@@ -117,7 +117,7 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
|
|||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
for (int n = 0; n < kNumWorkers; ++n) {
|
for (int n = 0; n < kNumWorkers; ++n) {
|
||||||
EXPECT_NE(vp9_get_worker_interface()->reset(&workers[n]), 0);
|
EXPECT_NE(vpx_get_worker_interface()->reset(&workers[n]), 0);
|
||||||
hook_data[n] = 0;
|
hook_data[n] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,16 +126,16 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int n = kNumWorkers - 1; n >= 0; --n) {
|
for (int n = kNumWorkers - 1; n >= 0; --n) {
|
||||||
vp9_get_worker_interface()->end(&workers[n]);
|
vpx_get_worker_interface()->end(&workers[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VP9WorkerThreadTest, TestInterfaceAPI) {
|
TEST(VPxWorkerThreadTest, TestInterfaceAPI) {
|
||||||
EXPECT_EQ(0, vp9_set_worker_interface(NULL));
|
EXPECT_EQ(0, vpx_set_worker_interface(NULL));
|
||||||
EXPECT_TRUE(vp9_get_worker_interface() != NULL);
|
EXPECT_TRUE(vpx_get_worker_interface() != NULL);
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
VP9WorkerInterface winterface = *vp9_get_worker_interface();
|
VPxWorkerInterface winterface = *vpx_get_worker_interface();
|
||||||
switch (i) {
|
switch (i) {
|
||||||
default:
|
default:
|
||||||
case 0: winterface.init = NULL; break;
|
case 0: winterface.init = NULL; break;
|
||||||
@@ -145,7 +145,7 @@ TEST(VP9WorkerThreadTest, TestInterfaceAPI) {
|
|||||||
case 4: winterface.execute = NULL; break;
|
case 4: winterface.execute = NULL; break;
|
||||||
case 5: winterface.end = NULL; break;
|
case 5: winterface.end = NULL; break;
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, vp9_set_worker_interface(&winterface));
|
EXPECT_EQ(0, vpx_set_worker_interface(&winterface));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ string DecodeFile(const string& filename, int num_threads) {
|
|||||||
void DecodeFiles(const FileList files[]) {
|
void DecodeFiles(const FileList files[]) {
|
||||||
for (const FileList *iter = files; iter->name != NULL; ++iter) {
|
for (const FileList *iter = files; iter->name != NULL; ++iter) {
|
||||||
SCOPED_TRACE(iter->name);
|
SCOPED_TRACE(iter->name);
|
||||||
for (int t = 2; t <= 8; ++t) {
|
for (int t = 1; t <= 8; ++t) {
|
||||||
EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t))
|
EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t))
|
||||||
<< "threads = " << t;
|
<< "threads = " << t;
|
||||||
}
|
}
|
||||||
@@ -202,21 +202,21 @@ void DecodeFiles(const FileList files[]) {
|
|||||||
// hang.
|
// hang.
|
||||||
namespace impl {
|
namespace impl {
|
||||||
|
|
||||||
void Init(VP9Worker *const worker) { memset(worker, 0, sizeof(*worker)); }
|
void Init(VPxWorker *const worker) { memset(worker, 0, sizeof(*worker)); }
|
||||||
int Reset(VP9Worker *const /*worker*/) { return 1; }
|
int Reset(VPxWorker *const /*worker*/) { return 1; }
|
||||||
int Sync(VP9Worker *const worker) { return !worker->had_error; }
|
int Sync(VPxWorker *const worker) { return !worker->had_error; }
|
||||||
|
|
||||||
void Execute(VP9Worker *const worker) {
|
void Execute(VPxWorker *const worker) {
|
||||||
worker->had_error |= !worker->hook(worker->data1, worker->data2);
|
worker->had_error |= !worker->hook(worker->data1, worker->data2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Launch(VP9Worker *const worker) { Execute(worker); }
|
void Launch(VPxWorker *const worker) { Execute(worker); }
|
||||||
void End(VP9Worker *const /*worker*/) {}
|
void End(VPxWorker *const /*worker*/) {}
|
||||||
|
|
||||||
} // namespace impl
|
} // namespace impl
|
||||||
|
|
||||||
TEST(VP9WorkerThreadTest, TestSerialInterface) {
|
TEST(VPxWorkerThreadTest, TestSerialInterface) {
|
||||||
static const VP9WorkerInterface serial_interface = {
|
static const VPxWorkerInterface serial_interface = {
|
||||||
impl::Init, impl::Reset, impl::Sync, impl::Launch, impl::Execute, impl::End
|
impl::Init, impl::Reset, impl::Sync, impl::Launch, impl::Execute, impl::End
|
||||||
};
|
};
|
||||||
// TODO(jzern): Avoid using a file that will use the row-based thread
|
// TODO(jzern): Avoid using a file that will use the row-based thread
|
||||||
@@ -225,23 +225,23 @@ TEST(VP9WorkerThreadTest, TestSerialInterface) {
|
|||||||
// progress in the row above before proceeding.
|
// progress in the row above before proceeding.
|
||||||
static const char expected_md5[] = "b35a1b707b28e82be025d960aba039bc";
|
static const char expected_md5[] = "b35a1b707b28e82be025d960aba039bc";
|
||||||
static const char filename[] = "vp90-2-03-size-226x226.webm";
|
static const char filename[] = "vp90-2-03-size-226x226.webm";
|
||||||
VP9WorkerInterface default_interface = *vp9_get_worker_interface();
|
VPxWorkerInterface default_interface = *vpx_get_worker_interface();
|
||||||
|
|
||||||
EXPECT_NE(vp9_set_worker_interface(&serial_interface), 0);
|
EXPECT_NE(vpx_set_worker_interface(&serial_interface), 0);
|
||||||
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
||||||
|
|
||||||
// Reset the interface.
|
// Reset the interface.
|
||||||
EXPECT_NE(vp9_set_worker_interface(&default_interface), 0);
|
EXPECT_NE(vpx_set_worker_interface(&default_interface), 0);
|
||||||
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode) {
|
TEST(VP9DecodeMultiThreadedTest, NoTilesNonFrameParallel) {
|
||||||
// no tiles or frame parallel; this exercises loop filter threading.
|
// no tiles or frame parallel; this exercises loop filter threading.
|
||||||
EXPECT_EQ("b35a1b707b28e82be025d960aba039bc",
|
EXPECT_EQ("b35a1b707b28e82be025d960aba039bc",
|
||||||
DecodeFile("vp90-2-03-size-226x226.webm", 2));
|
DecodeFile("vp90-2-03-size-226x226.webm", 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
TEST(VP9DecodeMultiThreadedTest, FrameParallel) {
|
||||||
static const FileList files[] = {
|
static const FileList files[] = {
|
||||||
{ "vp90-2-08-tile_1x2_frame_parallel.webm",
|
{ "vp90-2-08-tile_1x2_frame_parallel.webm",
|
||||||
"68ede6abd66bae0a2edf2eb9232241b6" },
|
"68ede6abd66bae0a2edf2eb9232241b6" },
|
||||||
@@ -255,8 +255,7 @@ TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
|||||||
DecodeFiles(files);
|
DecodeFiles(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test tile quantity changes within one file.
|
TEST(VP9DecodeMultiThreadedTest, FrameParallelResize) {
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
|
||||||
static const FileList files[] = {
|
static const FileList files[] = {
|
||||||
{ "vp90-2-14-resize-fp-tiles-1-16.webm",
|
{ "vp90-2-14-resize-fp-tiles-1-16.webm",
|
||||||
"0cd5e632c326297e975f38949c31ea94" },
|
"0cd5e632c326297e975f38949c31ea94" },
|
||||||
@@ -307,8 +306,21 @@ TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
|||||||
|
|
||||||
DecodeFiles(files);
|
DecodeFiles(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(VP9DecodeMultiThreadedTest, NonFrameParallel) {
|
||||||
|
static const FileList files[] = {
|
||||||
|
{ "vp90-2-08-tile_1x2.webm", "570b4a5d5a70d58b5359671668328a16" },
|
||||||
|
{ "vp90-2-08-tile_1x4.webm", "988d86049e884c66909d2d163a09841a" },
|
||||||
|
{ "vp90-2-08-tile_1x8.webm", "0941902a52e9092cb010905eab16364c" },
|
||||||
|
{ "vp90-2-08-tile-4x1.webm", "06505aade6647c583c8e00a2f582266f" },
|
||||||
|
{ "vp90-2-08-tile-4x4.webm", "85c2299892460d76e2c600502d52bfe2" },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DecodeFiles(files);
|
||||||
|
}
|
||||||
#endif // CONFIG_WEBM_IO
|
#endif // CONFIG_WEBM_IO
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool());
|
INSTANTIATE_TEST_CASE_P(Synchronous, VPxWorkerThreadTest, ::testing::Bool());
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -10,11 +10,10 @@
|
|||||||
|
|
||||||
#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_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "./vpx_scale_rtcd.h"
|
#include "./vpx_scale_rtcd.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vpx_scale/yv12config.h"
|
#include "vpx_scale/yv12config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "./y4menc.h"
|
||||||
#include "test/md5_helper.h"
|
#include "test/md5_helper.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
#include "test/y4m_video_source.h"
|
#include "test/y4m_video_source.h"
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./y4menc.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef TEST_Y4M_VIDEO_SOURCE_H_
|
#ifndef TEST_Y4M_VIDEO_SOURCE_H_
|
||||||
#define TEST_Y4M_VIDEO_SOURCE_H_
|
#define TEST_Y4M_VIDEO_SOURCE_H_
|
||||||
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "test/video_source.h"
|
#include "test/video_source.h"
|
||||||
@@ -91,6 +92,18 @@ class Y4mVideoSource : public VideoSource {
|
|||||||
y4m_input_fetch_frame(&y4m_, input_file_, img_.get());
|
y4m_input_fetch_frame(&y4m_, input_file_, img_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Swap buffers with another y4m source. This allows reading a new frame
|
||||||
|
// while keeping the old frame around. A whole Y4mSource is required and
|
||||||
|
// not just a vpx_image_t because of how the y4m reader manipulates
|
||||||
|
// vpx_image_t internals,
|
||||||
|
void SwapBuffers(Y4mVideoSource *other) {
|
||||||
|
std::swap(other->y4m_.dst_buf, y4m_.dst_buf);
|
||||||
|
vpx_image_t *tmp;
|
||||||
|
tmp = other->img_.release();
|
||||||
|
other->img_.reset(img_.release());
|
||||||
|
img_.reset(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CloseSource() {
|
void CloseSource() {
|
||||||
y4m_input_close(&y4m_);
|
y4m_input_close(&y4m_);
|
||||||
|
|||||||
17
third_party/libwebm/Android.mk
vendored
17
third_party/libwebm/Android.mk
vendored
@@ -1,11 +1,10 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_CPP_EXTENSION := .cpp
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SRC_FILES := mkvmuxer.cpp \
|
LOCAL_MODULE:= libwebm
|
||||||
mkvmuxerutil.cpp \
|
LOCAL_SRC_FILES:= mkvparser.cpp \
|
||||||
mkvparser.cpp \
|
mkvreader.cpp \
|
||||||
mkvreader.cpp \
|
mkvmuxer.cpp \
|
||||||
mkvwriter.cpp
|
mkvmuxerutil.cpp \
|
||||||
LOCAL_MODULE := libwebm
|
mkvwriter.cpp
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|||||||
2
third_party/libwebm/PATENTS.TXT
vendored
2
third_party/libwebm/PATENTS.TXT
vendored
@@ -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.
|
||||||
|
|||||||
5
third_party/libwebm/README.libvpx
vendored
5
third_party/libwebm/README.libvpx
vendored
@@ -1,7 +1,10 @@
|
|||||||
URL: https://chromium.googlesource.com/webm/libwebm
|
URL: https://chromium.googlesource.com/webm/libwebm
|
||||||
Version: 249629d46c6e9391f25a90cff6d19075f47474cb
|
Version: 476366249e1fda7710a389cd41c57db42305e0d4
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE.txt
|
License File: LICENSE.txt
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
libwebm is used to handle WebM container I/O.
|
libwebm is used to handle WebM container I/O.
|
||||||
|
|
||||||
|
Local Changes:
|
||||||
|
* <none>
|
||||||
|
|||||||
926
third_party/libwebm/mkvmuxer.cpp
vendored
926
third_party/libwebm/mkvmuxer.cpp
vendored
File diff suppressed because it is too large
Load Diff
296
third_party/libwebm/mkvmuxer.hpp
vendored
296
third_party/libwebm/mkvmuxer.hpp
vendored
@@ -23,6 +23,8 @@ namespace mkvmuxer {
|
|||||||
class MkvWriter;
|
class MkvWriter;
|
||||||
class Segment;
|
class Segment;
|
||||||
|
|
||||||
|
const uint64 kMaxTrackNumber = 126;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
// Interface used by the mkvmuxer to write out the Mkv data.
|
// Interface used by the mkvmuxer to write out the Mkv data.
|
||||||
class IMkvWriter {
|
class IMkvWriter {
|
||||||
@@ -57,6 +59,10 @@ class IMkvWriter {
|
|||||||
|
|
||||||
// Writes out the EBML header for a WebM file. This function must be called
|
// Writes out the EBML header for a WebM file. This function must be called
|
||||||
// before any other libwebm writing functions are called.
|
// before any other libwebm writing functions are called.
|
||||||
|
bool WriteEbmlHeader(IMkvWriter* writer, uint64 doc_type_version);
|
||||||
|
|
||||||
|
// Deprecated. Writes out EBML header with doc_type_version as
|
||||||
|
// kDefaultDocTypeVersion. Exists for backward compatibility.
|
||||||
bool WriteEbmlHeader(IMkvWriter* writer);
|
bool WriteEbmlHeader(IMkvWriter* writer);
|
||||||
|
|
||||||
// Copies in Chunk from source to destination between the given byte positions
|
// Copies in Chunk from source to destination between the given byte positions
|
||||||
@@ -70,12 +76,23 @@ class Frame {
|
|||||||
Frame();
|
Frame();
|
||||||
~Frame();
|
~Frame();
|
||||||
|
|
||||||
|
// Sets this frame's contents based on |frame|. Returns true on success. On
|
||||||
|
// failure, this frame's existing contents may be lost.
|
||||||
|
bool CopyFrom(const Frame& frame);
|
||||||
|
|
||||||
// Copies |frame| data into |frame_|. Returns true on success.
|
// Copies |frame| data into |frame_|. Returns true on success.
|
||||||
bool Init(const uint8* frame, uint64 length);
|
bool Init(const uint8* frame, uint64 length);
|
||||||
|
|
||||||
// Copies |additional| data into |additional_|. Returns true on success.
|
// Copies |additional| data into |additional_|. Returns true on success.
|
||||||
bool AddAdditionalData(const uint8* additional, uint64 length, uint64 add_id);
|
bool AddAdditionalData(const uint8* additional, uint64 length, uint64 add_id);
|
||||||
|
|
||||||
|
// Returns true if the frame has valid parameters.
|
||||||
|
bool IsValid() const;
|
||||||
|
|
||||||
|
// Returns true if the frame can be written as a SimpleBlock based on current
|
||||||
|
// parameters.
|
||||||
|
bool CanBeSimpleBlock() const;
|
||||||
|
|
||||||
uint64 add_id() const { return add_id_; }
|
uint64 add_id() const { return add_id_; }
|
||||||
const uint8* additional() const { return additional_; }
|
const uint8* additional() const { return additional_; }
|
||||||
uint64 additional_length() const { return additional_length_; }
|
uint64 additional_length() const { return additional_length_; }
|
||||||
@@ -89,10 +106,15 @@ class Frame {
|
|||||||
uint64 track_number() const { return track_number_; }
|
uint64 track_number() const { return track_number_; }
|
||||||
void set_timestamp(uint64 timestamp) { timestamp_ = timestamp; }
|
void set_timestamp(uint64 timestamp) { timestamp_ = timestamp; }
|
||||||
uint64 timestamp() const { return timestamp_; }
|
uint64 timestamp() const { return timestamp_; }
|
||||||
void set_discard_padding(uint64 discard_padding) {
|
void set_discard_padding(int64 discard_padding) {
|
||||||
discard_padding_ = discard_padding;
|
discard_padding_ = discard_padding;
|
||||||
}
|
}
|
||||||
uint64 discard_padding() const { return discard_padding_; }
|
int64 discard_padding() const { return discard_padding_; }
|
||||||
|
void set_reference_block_timestamp(int64 reference_block_timestamp);
|
||||||
|
int64 reference_block_timestamp() const { return reference_block_timestamp_; }
|
||||||
|
bool reference_block_timestamp_set() const {
|
||||||
|
return reference_block_timestamp_set_;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Id of the Additional data.
|
// Id of the Additional data.
|
||||||
@@ -124,6 +146,14 @@ class Frame {
|
|||||||
|
|
||||||
// Discard padding for the frame.
|
// Discard padding for the frame.
|
||||||
int64 discard_padding_;
|
int64 discard_padding_;
|
||||||
|
|
||||||
|
// Reference block timestamp.
|
||||||
|
int64 reference_block_timestamp_;
|
||||||
|
|
||||||
|
// Flag indicating if |reference_block_timestamp_| has been set.
|
||||||
|
bool reference_block_timestamp_set_;
|
||||||
|
|
||||||
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(Frame);
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
@@ -422,6 +452,16 @@ class VideoTrack : public Track {
|
|||||||
uint64 display_height() const { return display_height_; }
|
uint64 display_height() const { return display_height_; }
|
||||||
void set_display_width(uint64 width) { display_width_ = width; }
|
void set_display_width(uint64 width) { display_width_ = width; }
|
||||||
uint64 display_width() const { return display_width_; }
|
uint64 display_width() const { return display_width_; }
|
||||||
|
|
||||||
|
void set_crop_left(uint64 crop_left) { crop_left_ = crop_left; }
|
||||||
|
uint64 crop_left() const { return crop_left_; }
|
||||||
|
void set_crop_right(uint64 crop_right) { crop_right_ = crop_right; }
|
||||||
|
uint64 crop_right() const { return crop_right_; }
|
||||||
|
void set_crop_top(uint64 crop_top) { crop_top_ = crop_top; }
|
||||||
|
uint64 crop_top() const { return crop_top_; }
|
||||||
|
void set_crop_bottom(uint64 crop_bottom) { crop_bottom_ = crop_bottom; }
|
||||||
|
uint64 crop_bottom() const { return crop_bottom_; }
|
||||||
|
|
||||||
void set_frame_rate(double frame_rate) { frame_rate_ = frame_rate; }
|
void set_frame_rate(double frame_rate) { frame_rate_ = frame_rate; }
|
||||||
double frame_rate() const { return frame_rate_; }
|
double frame_rate() const { return frame_rate_; }
|
||||||
void set_height(uint64 height) { height_ = height; }
|
void set_height(uint64 height) { height_ = height; }
|
||||||
@@ -438,6 +478,10 @@ class VideoTrack : public Track {
|
|||||||
// Video track element names.
|
// Video track element names.
|
||||||
uint64 display_height_;
|
uint64 display_height_;
|
||||||
uint64 display_width_;
|
uint64 display_width_;
|
||||||
|
uint64 crop_left_;
|
||||||
|
uint64 crop_right_;
|
||||||
|
uint64 crop_top_;
|
||||||
|
uint64 crop_bottom_;
|
||||||
double frame_rate_;
|
double frame_rate_;
|
||||||
uint64 height_;
|
uint64 height_;
|
||||||
uint64 stereo_mode_;
|
uint64 stereo_mode_;
|
||||||
@@ -484,11 +528,12 @@ class Tracks {
|
|||||||
public:
|
public:
|
||||||
// Audio and video type defined by the Matroska specs.
|
// Audio and video type defined by the Matroska specs.
|
||||||
enum { kVideo = 0x1, kAudio = 0x2 };
|
enum { kVideo = 0x1, kAudio = 0x2 };
|
||||||
// Opus, Vorbis, VP8, and VP9 codec ids defined by the Matroska specs.
|
|
||||||
static const char kOpusCodecId[];
|
static const char kOpusCodecId[];
|
||||||
static const char kVorbisCodecId[];
|
static const char kVorbisCodecId[];
|
||||||
static const char kVp8CodecId[];
|
static const char kVp8CodecId[];
|
||||||
static const char kVp9CodecId[];
|
static const char kVp9CodecId[];
|
||||||
|
static const char kVp10CodecId[];
|
||||||
|
|
||||||
Tracks();
|
Tracks();
|
||||||
~Tracks();
|
~Tracks();
|
||||||
@@ -692,6 +737,112 @@ class Chapters {
|
|||||||
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(Chapters);
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(Chapters);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
// Tag element
|
||||||
|
//
|
||||||
|
class Tag {
|
||||||
|
public:
|
||||||
|
bool add_simple_tag(const char* tag_name, const char* tag_string);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Tags calls Clear and the destructor of Tag
|
||||||
|
friend class Tags;
|
||||||
|
|
||||||
|
// For storage of simple tags
|
||||||
|
class SimpleTag {
|
||||||
|
public:
|
||||||
|
// Establish representation invariant for new SimpleTag object.
|
||||||
|
void Init();
|
||||||
|
|
||||||
|
// Reclaim resources, in anticipation of destruction.
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
// Copies the title to the |tag_name_| member. Returns false on
|
||||||
|
// error.
|
||||||
|
bool set_tag_name(const char* tag_name);
|
||||||
|
|
||||||
|
// Copies the language to the |tag_string_| member. Returns false
|
||||||
|
// on error.
|
||||||
|
bool set_tag_string(const char* tag_string);
|
||||||
|
|
||||||
|
// If |writer| is non-NULL, serialize the SimpleTag sub-element of
|
||||||
|
// the Atom into the stream. Returns the SimpleTag element size on
|
||||||
|
// success, 0 if error.
|
||||||
|
uint64 Write(IMkvWriter* writer) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
char* tag_name_;
|
||||||
|
char* tag_string_;
|
||||||
|
};
|
||||||
|
|
||||||
|
Tag();
|
||||||
|
~Tag();
|
||||||
|
|
||||||
|
// Copies this Tag object to a different one. This is used when
|
||||||
|
// expanding a plain array of Tag objects (see Tags).
|
||||||
|
void ShallowCopy(Tag* dst) const;
|
||||||
|
|
||||||
|
// Reclaim resources used by this Tag object, pending its
|
||||||
|
// destruction.
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
// If there is no storage remaining on the |simple_tags_| array for a
|
||||||
|
// new display object, creates a new, longer array and copies the
|
||||||
|
// existing SimpleTag objects to the new array. Returns false if the
|
||||||
|
// array cannot be expanded.
|
||||||
|
bool ExpandSimpleTagsArray();
|
||||||
|
|
||||||
|
// If |writer| is non-NULL, serialize the Tag sub-element into the
|
||||||
|
// stream. Returns the total size of the element on success, 0 if
|
||||||
|
// error.
|
||||||
|
uint64 Write(IMkvWriter* writer) const;
|
||||||
|
|
||||||
|
// The Atom element can contain multiple SimpleTag sub-elements
|
||||||
|
SimpleTag* simple_tags_;
|
||||||
|
|
||||||
|
// The physical length (total size) of the |simple_tags_| array.
|
||||||
|
int simple_tags_size_;
|
||||||
|
|
||||||
|
// The logical length (number of active elements) on the |simple_tags_|
|
||||||
|
// array.
|
||||||
|
int simple_tags_count_;
|
||||||
|
|
||||||
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(Tag);
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
// Tags element
|
||||||
|
//
|
||||||
|
class Tags {
|
||||||
|
public:
|
||||||
|
Tags();
|
||||||
|
~Tags();
|
||||||
|
|
||||||
|
Tag* AddTag();
|
||||||
|
|
||||||
|
// Returns the number of tags that have been added.
|
||||||
|
int Count() const;
|
||||||
|
|
||||||
|
// Output the Tags element to the writer. Returns true on success.
|
||||||
|
bool Write(IMkvWriter* writer) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Expands the tags_ array if there is not enough space to contain
|
||||||
|
// another tag object. Returns true on success.
|
||||||
|
bool ExpandTagsArray();
|
||||||
|
|
||||||
|
// Total length of the tags_ array.
|
||||||
|
int tags_size_;
|
||||||
|
|
||||||
|
// Number of active tags on the tags_ array.
|
||||||
|
int tags_count_;
|
||||||
|
|
||||||
|
// Array for storage of tag objects.
|
||||||
|
Tag* tags_;
|
||||||
|
|
||||||
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(Tags);
|
||||||
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
// Cluster element
|
// Cluster element
|
||||||
//
|
//
|
||||||
@@ -699,32 +850,36 @@ class Chapters {
|
|||||||
// |Init| must be called before any other method in this class.
|
// |Init| must be called before any other method in this class.
|
||||||
class Cluster {
|
class Cluster {
|
||||||
public:
|
public:
|
||||||
Cluster(uint64 timecode, int64 cues_pos);
|
|
||||||
~Cluster();
|
|
||||||
|
|
||||||
// |timecode| is the absolute timecode of the cluster. |cues_pos| is the
|
// |timecode| is the absolute timecode of the cluster. |cues_pos| is the
|
||||||
// position for the cluster within the segment that should be written in
|
// position for the cluster within the segment that should be written in
|
||||||
// the cues element.
|
// the cues element. |timecode_scale| is the timecode scale of the segment.
|
||||||
|
Cluster(uint64 timecode, int64 cues_pos, uint64 timecode_scale);
|
||||||
|
~Cluster();
|
||||||
|
|
||||||
bool Init(IMkvWriter* ptr_writer);
|
bool Init(IMkvWriter* ptr_writer);
|
||||||
|
|
||||||
|
// Adds a frame to be output in the file. The frame is written out through
|
||||||
|
// |writer_| if successful. Returns true on success.
|
||||||
|
bool AddFrame(const Frame* frame);
|
||||||
|
|
||||||
// Adds a frame to be output in the file. The frame is written out through
|
// Adds a frame to be output in the file. The frame is written out through
|
||||||
// |writer_| if successful. Returns true on success.
|
// |writer_| if successful. Returns true on success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data
|
// data: Pointer to the data
|
||||||
// length: Length of the data
|
// length: Length of the data
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
// functions. The range of allowed values is [1, 126].
|
// functions. The range of allowed values is [1, 126].
|
||||||
// timecode: Absolute (not relative to cluster) timestamp of the
|
// timecode: Absolute (not relative to cluster) timestamp of the
|
||||||
// frame, expressed in timecode units.
|
// frame, expressed in timecode units.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrame(const uint8* frame, uint64 length, uint64 track_number,
|
bool AddFrame(const uint8* data, uint64 length, uint64 track_number,
|
||||||
uint64 timecode, // timecode units (absolute)
|
uint64 timecode, // timecode units (absolute)
|
||||||
bool is_key);
|
bool is_key);
|
||||||
|
|
||||||
// Adds a frame to be output in the file. The frame is written out through
|
// Adds a frame to be output in the file. The frame is written out through
|
||||||
// |writer_| if successful. Returns true on success.
|
// |writer_| if successful. Returns true on success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data
|
// data: Pointer to the data
|
||||||
// length: Length of the data
|
// length: Length of the data
|
||||||
// additional: Pointer to the additional data
|
// additional: Pointer to the additional data
|
||||||
// additional_length: Length of the additional data
|
// additional_length: Length of the additional data
|
||||||
@@ -734,7 +889,7 @@ class Cluster {
|
|||||||
// abs_timecode: Absolute (not relative to cluster) timestamp of the
|
// abs_timecode: Absolute (not relative to cluster) timestamp of the
|
||||||
// frame, expressed in timecode units.
|
// frame, expressed in timecode units.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrameWithAdditional(const uint8* frame, uint64 length,
|
bool AddFrameWithAdditional(const uint8* data, uint64 length,
|
||||||
const uint8* additional, uint64 additional_length,
|
const uint8* additional, uint64 additional_length,
|
||||||
uint64 add_id, uint64 track_number,
|
uint64 add_id, uint64 track_number,
|
||||||
uint64 abs_timecode, bool is_key);
|
uint64 abs_timecode, bool is_key);
|
||||||
@@ -742,7 +897,7 @@ class Cluster {
|
|||||||
// Adds a frame to be output in the file. The frame is written out through
|
// Adds a frame to be output in the file. The frame is written out through
|
||||||
// |writer_| if successful. Returns true on success.
|
// |writer_| if successful. Returns true on success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data.
|
// data: Pointer to the data.
|
||||||
// length: Length of the data.
|
// length: Length of the data.
|
||||||
// discard_padding: DiscardPadding element value.
|
// discard_padding: DiscardPadding element value.
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
@@ -750,14 +905,14 @@ class Cluster {
|
|||||||
// abs_timecode: Absolute (not relative to cluster) timestamp of the
|
// abs_timecode: Absolute (not relative to cluster) timestamp of the
|
||||||
// frame, expressed in timecode units.
|
// frame, expressed in timecode units.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrameWithDiscardPadding(const uint8* frame, uint64 length,
|
bool AddFrameWithDiscardPadding(const uint8* data, uint64 length,
|
||||||
int64 discard_padding, uint64 track_number,
|
int64 discard_padding, uint64 track_number,
|
||||||
uint64 abs_timecode, bool is_key);
|
uint64 abs_timecode, bool is_key);
|
||||||
|
|
||||||
// Writes a frame of metadata to the output medium; returns true on
|
// Writes a frame of metadata to the output medium; returns true on
|
||||||
// success.
|
// success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data
|
// data: Pointer to the data
|
||||||
// length: Length of the data
|
// length: Length of the data
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
// functions. The range of allowed values is [1, 126].
|
// functions. The range of allowed values is [1, 126].
|
||||||
@@ -768,7 +923,7 @@ class Cluster {
|
|||||||
// The metadata frame is written as a block group, with a duration
|
// The metadata frame is written as a block group, with a duration
|
||||||
// sub-element but no reference time sub-elements (indicating that
|
// sub-element but no reference time sub-elements (indicating that
|
||||||
// it is considered a keyframe, per Matroska semantics).
|
// it is considered a keyframe, per Matroska semantics).
|
||||||
bool AddMetadata(const uint8* frame, uint64 length, uint64 track_number,
|
bool AddMetadata(const uint8* data, uint64 length, uint64 track_number,
|
||||||
uint64 timecode, uint64 duration);
|
uint64 timecode, uint64 duration);
|
||||||
|
|
||||||
// Increments the size of the cluster's data in bytes.
|
// Increments the size of the cluster's data in bytes.
|
||||||
@@ -781,75 +936,29 @@ class Cluster {
|
|||||||
// Returns the size in bytes for the entire Cluster element.
|
// Returns the size in bytes for the entire Cluster element.
|
||||||
uint64 Size() const;
|
uint64 Size() const;
|
||||||
|
|
||||||
|
// Given |abs_timecode|, calculates timecode relative to most recent timecode.
|
||||||
|
// Returns -1 on failure, or a relative timecode.
|
||||||
|
int64 GetRelativeTimecode(int64 abs_timecode) const;
|
||||||
|
|
||||||
int64 size_position() const { return size_position_; }
|
int64 size_position() const { return size_position_; }
|
||||||
int32 blocks_added() const { return blocks_added_; }
|
int32 blocks_added() const { return blocks_added_; }
|
||||||
uint64 payload_size() const { return payload_size_; }
|
uint64 payload_size() const { return payload_size_; }
|
||||||
int64 position_for_cues() const { return position_for_cues_; }
|
int64 position_for_cues() const { return position_for_cues_; }
|
||||||
uint64 timecode() const { return timecode_; }
|
uint64 timecode() const { return timecode_; }
|
||||||
|
uint64 timecode_scale() const { return timecode_scale_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Signature that matches either of WriteSimpleBlock or WriteMetadataBlock
|
|
||||||
// in the muxer utilities package.
|
|
||||||
typedef uint64 (*WriteBlock)(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, uint64 track_number,
|
|
||||||
int64 timecode, uint64 generic_arg);
|
|
||||||
|
|
||||||
// Signature that matches WriteBlockWithAdditional
|
|
||||||
// in the muxer utilities package.
|
|
||||||
typedef uint64 (*WriteBlockAdditional)(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, const uint8* additional,
|
|
||||||
uint64 add_id,
|
|
||||||
uint64 additional_length,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 is_key);
|
|
||||||
|
|
||||||
// Signature that matches WriteBlockWithDiscardPadding
|
|
||||||
// in the muxer utilities package.
|
|
||||||
typedef uint64 (*WriteBlockDiscardPadding)(IMkvWriter* writer,
|
|
||||||
const uint8* data, uint64 length,
|
|
||||||
int64 discard_padding,
|
|
||||||
uint64 track_number,
|
|
||||||
int64 timecode, uint64 is_key);
|
|
||||||
|
|
||||||
// Utility method that confirms that blocks can still be added, and that the
|
// Utility method that confirms that blocks can still be added, and that the
|
||||||
// cluster header has been written. Used by |DoWriteBlock*|. Returns true
|
// cluster header has been written. Used by |DoWriteFrame*|. Returns true
|
||||||
// when successful.
|
// when successful.
|
||||||
template <typename Type>
|
bool PreWriteBlock();
|
||||||
bool PreWriteBlock(Type* write_function);
|
|
||||||
|
|
||||||
// Utility method used by the |DoWriteBlock*| methods that handles the book
|
// Utility method used by the |DoWriteFrame*| methods that handles the book
|
||||||
// keeping required after each block is written.
|
// keeping required after each block is written.
|
||||||
void PostWriteBlock(uint64 element_size);
|
void PostWriteBlock(uint64 element_size);
|
||||||
|
|
||||||
// To simplify things, we require that there be fewer than 127
|
// Does some verification and calls WriteFrame.
|
||||||
// tracks -- this allows us to serialize the track number value for
|
bool DoWriteFrame(const Frame* const frame);
|
||||||
// a stream using a single byte, per the Matroska encoding.
|
|
||||||
bool IsValidTrackNumber(uint64 track_number) const;
|
|
||||||
|
|
||||||
// Given |abs_timecode|, calculates timecode relative to most recent timecode.
|
|
||||||
// Returns -1 on failure, or a relative timecode.
|
|
||||||
int64 GetRelativeTimecode(int64 abs_timecode) const;
|
|
||||||
|
|
||||||
// Used to implement AddFrame and AddMetadata.
|
|
||||||
bool DoWriteBlock(const uint8* frame, uint64 length, uint64 track_number,
|
|
||||||
uint64 absolute_timecode, uint64 generic_arg,
|
|
||||||
WriteBlock write_block);
|
|
||||||
|
|
||||||
// Used to implement AddFrameWithAdditional
|
|
||||||
bool DoWriteBlockWithAdditional(const uint8* frame, uint64 length,
|
|
||||||
const uint8* additional,
|
|
||||||
uint64 additional_length, uint64 add_id,
|
|
||||||
uint64 track_number, uint64 absolute_timecode,
|
|
||||||
uint64 generic_arg,
|
|
||||||
WriteBlockAdditional write_block);
|
|
||||||
|
|
||||||
// Used to implement AddFrameWithDiscardPadding
|
|
||||||
bool DoWriteBlockWithDiscardPadding(const uint8* frame, uint64 length,
|
|
||||||
int64 discard_padding,
|
|
||||||
uint64 track_number,
|
|
||||||
uint64 absolute_timecode,
|
|
||||||
uint64 generic_arg,
|
|
||||||
WriteBlockDiscardPadding write_block);
|
|
||||||
|
|
||||||
// Outputs the Cluster header to |writer_|. Returns true on success.
|
// Outputs the Cluster header to |writer_|. Returns true on success.
|
||||||
bool WriteClusterHeader();
|
bool WriteClusterHeader();
|
||||||
@@ -875,6 +984,9 @@ class Cluster {
|
|||||||
// The absolute timecode of the cluster.
|
// The absolute timecode of the cluster.
|
||||||
const uint64 timecode_;
|
const uint64 timecode_;
|
||||||
|
|
||||||
|
// The timecode scale of the Segment containing the cluster.
|
||||||
|
const uint64 timecode_scale_;
|
||||||
|
|
||||||
// Pointer to the writer object. Not owned by this class.
|
// Pointer to the writer object. Not owned by this class.
|
||||||
IMkvWriter* writer_;
|
IMkvWriter* writer_;
|
||||||
|
|
||||||
@@ -996,6 +1108,7 @@ class Segment {
|
|||||||
kBeforeClusters = 0x1 // Position Cues before Clusters
|
kBeforeClusters = 0x1 // Position Cues before Clusters
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const static uint32 kDefaultDocTypeVersion = 2;
|
||||||
const static uint64 kDefaultMaxClusterDuration = 30000000000ULL;
|
const static uint64 kDefaultMaxClusterDuration = 30000000000ULL;
|
||||||
|
|
||||||
Segment();
|
Segment();
|
||||||
@@ -1023,6 +1136,11 @@ class Segment {
|
|||||||
// populate its fields via the Chapter member functions.
|
// populate its fields via the Chapter member functions.
|
||||||
Chapter* AddChapter();
|
Chapter* AddChapter();
|
||||||
|
|
||||||
|
// Adds an empty tag to the tags of this segment. Returns
|
||||||
|
// non-NULL on success. After adding the tag, the caller should
|
||||||
|
// populate its fields via the Tag member functions.
|
||||||
|
Tag* AddTag();
|
||||||
|
|
||||||
// Adds a cue point to the Cues element. |timestamp| is the time in
|
// Adds a cue point to the Cues element. |timestamp| is the time in
|
||||||
// nanoseconds of the cue's time. |track| is the Track of the Cue. This
|
// nanoseconds of the cue's time. |track| is the Track of the Cue. This
|
||||||
// function must be called after AddFrame to calculate the correct
|
// function must be called after AddFrame to calculate the correct
|
||||||
@@ -1031,19 +1149,19 @@ class Segment {
|
|||||||
|
|
||||||
// Adds a frame to be output in the file. Returns true on success.
|
// Adds a frame to be output in the file. Returns true on success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data
|
// data: Pointer to the data
|
||||||
// length: Length of the data
|
// length: Length of the data
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
// functions.
|
// functions.
|
||||||
// timestamp: Timestamp of the frame in nanoseconds from 0.
|
// timestamp: Timestamp of the frame in nanoseconds from 0.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrame(const uint8* frame, uint64 length, uint64 track_number,
|
bool AddFrame(const uint8* data, uint64 length, uint64 track_number,
|
||||||
uint64 timestamp_ns, bool is_key);
|
uint64 timestamp_ns, bool is_key);
|
||||||
|
|
||||||
// Writes a frame of metadata to the output medium; returns true on
|
// Writes a frame of metadata to the output medium; returns true on
|
||||||
// success.
|
// success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data
|
// data: Pointer to the data
|
||||||
// length: Length of the data
|
// length: Length of the data
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
// functions.
|
// functions.
|
||||||
@@ -1054,13 +1172,13 @@ class Segment {
|
|||||||
// The metadata frame is written as a block group, with a duration
|
// The metadata frame is written as a block group, with a duration
|
||||||
// sub-element but no reference time sub-elements (indicating that
|
// sub-element but no reference time sub-elements (indicating that
|
||||||
// it is considered a keyframe, per Matroska semantics).
|
// it is considered a keyframe, per Matroska semantics).
|
||||||
bool AddMetadata(const uint8* frame, uint64 length, uint64 track_number,
|
bool AddMetadata(const uint8* data, uint64 length, uint64 track_number,
|
||||||
uint64 timestamp_ns, uint64 duration_ns);
|
uint64 timestamp_ns, uint64 duration_ns);
|
||||||
|
|
||||||
// Writes a frame with additional data to the output medium; returns true on
|
// Writes a frame with additional data to the output medium; returns true on
|
||||||
// success.
|
// success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data.
|
// data: Pointer to the data.
|
||||||
// length: Length of the data.
|
// length: Length of the data.
|
||||||
// additional: Pointer to additional data.
|
// additional: Pointer to additional data.
|
||||||
// additional_length: Length of additional data.
|
// additional_length: Length of additional data.
|
||||||
@@ -1070,7 +1188,7 @@ class Segment {
|
|||||||
// timestamp: Absolute timestamp of the frame, expressed in nanosecond
|
// timestamp: Absolute timestamp of the frame, expressed in nanosecond
|
||||||
// units.
|
// units.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrameWithAdditional(const uint8* frame, uint64 length,
|
bool AddFrameWithAdditional(const uint8* data, uint64 length,
|
||||||
const uint8* additional, uint64 additional_length,
|
const uint8* additional, uint64 additional_length,
|
||||||
uint64 add_id, uint64 track_number,
|
uint64 add_id, uint64 track_number,
|
||||||
uint64 timestamp, bool is_key);
|
uint64 timestamp, bool is_key);
|
||||||
@@ -1078,7 +1196,7 @@ class Segment {
|
|||||||
// Writes a frame with DiscardPadding to the output medium; returns true on
|
// Writes a frame with DiscardPadding to the output medium; returns true on
|
||||||
// success.
|
// success.
|
||||||
// Inputs:
|
// Inputs:
|
||||||
// frame: Pointer to the data.
|
// data: Pointer to the data.
|
||||||
// length: Length of the data.
|
// length: Length of the data.
|
||||||
// discard_padding: DiscardPadding element value.
|
// discard_padding: DiscardPadding element value.
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
// track_number: Track to add the data to. Value returned by Add track
|
||||||
@@ -1086,7 +1204,7 @@ class Segment {
|
|||||||
// timestamp: Absolute timestamp of the frame, expressed in nanosecond
|
// timestamp: Absolute timestamp of the frame, expressed in nanosecond
|
||||||
// units.
|
// units.
|
||||||
// is_key: Flag telling whether or not this frame is a key frame.
|
// is_key: Flag telling whether or not this frame is a key frame.
|
||||||
bool AddFrameWithDiscardPadding(const uint8* frame, uint64 length,
|
bool AddFrameWithDiscardPadding(const uint8* data, uint64 length,
|
||||||
int64 discard_padding, uint64 track_number,
|
int64 discard_padding, uint64 track_number,
|
||||||
uint64 timestamp, bool is_key);
|
uint64 timestamp, bool is_key);
|
||||||
|
|
||||||
@@ -1177,6 +1295,9 @@ class Segment {
|
|||||||
// Cues elements.
|
// Cues elements.
|
||||||
bool CheckHeaderInfo();
|
bool CheckHeaderInfo();
|
||||||
|
|
||||||
|
// Sets |doc_type_version_| based on the current element requirements.
|
||||||
|
void UpdateDocTypeVersion();
|
||||||
|
|
||||||
// Sets |name| according to how many chunks have been written. |ext| is the
|
// Sets |name| according to how many chunks have been written. |ext| is the
|
||||||
// file extension. |name| must be deleted by the calling app. Returns true
|
// file extension. |name| must be deleted by the calling app. Returns true
|
||||||
// on success.
|
// on success.
|
||||||
@@ -1233,7 +1354,7 @@ class Segment {
|
|||||||
// diff - indicates the difference in size of the Cues element that needs to
|
// diff - indicates the difference in size of the Cues element that needs to
|
||||||
// accounted for.
|
// accounted for.
|
||||||
// index - index in the list of Cues which is currently being adjusted.
|
// index - index in the list of Cues which is currently being adjusted.
|
||||||
// cue_size - size of the Cues element.
|
// cue_size - sum of size of all the CuePoint elements.
|
||||||
void MoveCuesBeforeClustersHelper(uint64 diff, int index, uint64* cue_size);
|
void MoveCuesBeforeClustersHelper(uint64 diff, int index, uint64* cue_size);
|
||||||
|
|
||||||
// Seeds the random number generator used to make UIDs.
|
// Seeds the random number generator used to make UIDs.
|
||||||
@@ -1245,6 +1366,7 @@ class Segment {
|
|||||||
SegmentInfo segment_info_;
|
SegmentInfo segment_info_;
|
||||||
Tracks tracks_;
|
Tracks tracks_;
|
||||||
Chapters chapters_;
|
Chapters chapters_;
|
||||||
|
Tags tags_;
|
||||||
|
|
||||||
// Number of chunks written.
|
// Number of chunks written.
|
||||||
int chunk_count_;
|
int chunk_count_;
|
||||||
@@ -1316,6 +1438,9 @@ class Segment {
|
|||||||
// Last timestamp in nanoseconds added to a cluster.
|
// Last timestamp in nanoseconds added to a cluster.
|
||||||
uint64 last_timestamp_;
|
uint64 last_timestamp_;
|
||||||
|
|
||||||
|
// Last timestamp in nanoseconds by track number added to a cluster.
|
||||||
|
uint64 last_track_timestamp_[kMaxTrackNumber];
|
||||||
|
|
||||||
// Maximum time in nanoseconds for a cluster duration. This variable is a
|
// Maximum time in nanoseconds for a cluster duration. This variable is a
|
||||||
// guideline and some clusters may have a longer duration. Default is 30
|
// guideline and some clusters may have a longer duration. Default is 30
|
||||||
// seconds.
|
// seconds.
|
||||||
@@ -1337,12 +1462,23 @@ class Segment {
|
|||||||
// Flag whether or not the muxer should output a Cues element.
|
// Flag whether or not the muxer should output a Cues element.
|
||||||
bool output_cues_;
|
bool output_cues_;
|
||||||
|
|
||||||
|
// The size of the EBML header, used to validate the header if
|
||||||
|
// WriteEbmlHeader() is called more than once.
|
||||||
|
int32 ebml_header_size_;
|
||||||
|
|
||||||
// The file position of the segment's payload.
|
// The file position of the segment's payload.
|
||||||
int64 payload_pos_;
|
int64 payload_pos_;
|
||||||
|
|
||||||
// The file position of the element's size.
|
// The file position of the element's size.
|
||||||
int64 size_position_;
|
int64 size_position_;
|
||||||
|
|
||||||
|
// Current DocTypeVersion (|doc_type_version_|) and that written in
|
||||||
|
// WriteSegmentHeader().
|
||||||
|
// WriteEbmlHeader() will be called from Finalize() if |doc_type_version_|
|
||||||
|
// differs from |doc_type_version_written_|.
|
||||||
|
uint32 doc_type_version_;
|
||||||
|
uint32 doc_type_version_written_;
|
||||||
|
|
||||||
// Pointer to the writer objects. Not owned by this class.
|
// Pointer to the writer objects. Not owned by this class.
|
||||||
IMkvWriter* writer_cluster_;
|
IMkvWriter* writer_cluster_;
|
||||||
IMkvWriter* writer_cues_;
|
IMkvWriter* writer_cues_;
|
||||||
|
|||||||
483
third_party/libwebm/mkvmuxerutil.cpp
vendored
483
third_party/libwebm/mkvmuxerutil.cpp
vendored
@@ -15,18 +15,19 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define _CRT_RAND_S
|
|
||||||
#endif
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include "mkvwriter.hpp"
|
#include "mkvwriter.hpp"
|
||||||
#include "webmids.hpp"
|
#include "webmids.hpp"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
|
#pragma warning(disable : 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace mkvmuxer {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -34,6 +35,144 @@ namespace {
|
|||||||
// Date elements are always 8 octets in size.
|
// Date elements are always 8 octets in size.
|
||||||
const int kDateElementSize = 8;
|
const int kDateElementSize = 8;
|
||||||
|
|
||||||
|
uint64 WriteBlock(IMkvWriter* writer, const Frame* const frame, int64 timecode,
|
||||||
|
uint64 timecode_scale) {
|
||||||
|
uint64 block_additional_elem_size = 0;
|
||||||
|
uint64 block_addid_elem_size = 0;
|
||||||
|
uint64 block_more_payload_size = 0;
|
||||||
|
uint64 block_more_elem_size = 0;
|
||||||
|
uint64 block_additions_payload_size = 0;
|
||||||
|
uint64 block_additions_elem_size = 0;
|
||||||
|
if (frame->additional()) {
|
||||||
|
block_additional_elem_size = EbmlElementSize(
|
||||||
|
kMkvBlockAdditional, frame->additional(), frame->additional_length());
|
||||||
|
block_addid_elem_size = EbmlElementSize(kMkvBlockAddID, frame->add_id());
|
||||||
|
|
||||||
|
block_more_payload_size =
|
||||||
|
block_addid_elem_size + block_additional_elem_size;
|
||||||
|
block_more_elem_size =
|
||||||
|
EbmlMasterElementSize(kMkvBlockMore, block_more_payload_size) +
|
||||||
|
block_more_payload_size;
|
||||||
|
block_additions_payload_size = block_more_elem_size;
|
||||||
|
block_additions_elem_size =
|
||||||
|
EbmlMasterElementSize(kMkvBlockAdditions,
|
||||||
|
block_additions_payload_size) +
|
||||||
|
block_additions_payload_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64 discard_padding_elem_size = 0;
|
||||||
|
if (frame->discard_padding() != 0) {
|
||||||
|
discard_padding_elem_size =
|
||||||
|
EbmlElementSize(kMkvDiscardPadding, frame->discard_padding());
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint64 reference_block_timestamp =
|
||||||
|
frame->reference_block_timestamp() / timecode_scale;
|
||||||
|
uint64 reference_block_elem_size = 0;
|
||||||
|
if (!frame->is_key()) {
|
||||||
|
reference_block_elem_size =
|
||||||
|
EbmlElementSize(kMkvReferenceBlock, reference_block_timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint64 duration = frame->duration() / timecode_scale;
|
||||||
|
uint64 block_duration_elem_size = 0;
|
||||||
|
if (duration > 0)
|
||||||
|
block_duration_elem_size = EbmlElementSize(kMkvBlockDuration, duration);
|
||||||
|
|
||||||
|
const uint64 block_payload_size = 4 + frame->length();
|
||||||
|
const uint64 block_elem_size =
|
||||||
|
EbmlMasterElementSize(kMkvBlock, block_payload_size) + block_payload_size;
|
||||||
|
|
||||||
|
const uint64 block_group_payload_size =
|
||||||
|
block_elem_size + block_additions_elem_size + block_duration_elem_size +
|
||||||
|
discard_padding_elem_size + reference_block_elem_size;
|
||||||
|
|
||||||
|
if (!WriteEbmlMasterElement(writer, kMkvBlockGroup,
|
||||||
|
block_group_payload_size)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!WriteEbmlMasterElement(writer, kMkvBlock, block_payload_size))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (WriteUInt(writer, frame->track_number()))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (SerializeInt(writer, timecode, 2))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// For a Block, flags is always 0.
|
||||||
|
if (SerializeInt(writer, 0, 1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (writer->Write(frame->frame(), static_cast<uint32>(frame->length())))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (frame->additional()) {
|
||||||
|
if (!WriteEbmlMasterElement(writer, kMkvBlockAdditions,
|
||||||
|
block_additions_payload_size)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!WriteEbmlMasterElement(writer, kMkvBlockMore, block_more_payload_size))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!WriteEbmlElement(writer, kMkvBlockAddID, frame->add_id()))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!WriteEbmlElement(writer, kMkvBlockAdditional, frame->additional(),
|
||||||
|
frame->additional_length())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frame->discard_padding() != 0 &&
|
||||||
|
!WriteEbmlElement(writer, kMkvDiscardPadding, frame->discard_padding())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!frame->is_key() &&
|
||||||
|
!WriteEbmlElement(writer, kMkvReferenceBlock,
|
||||||
|
reference_block_timestamp)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (duration > 0 && !WriteEbmlElement(writer, kMkvBlockDuration, duration)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return EbmlMasterElementSize(kMkvBlockGroup, block_group_payload_size) +
|
||||||
|
block_group_payload_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64 WriteSimpleBlock(IMkvWriter* writer, const Frame* const frame,
|
||||||
|
int64 timecode) {
|
||||||
|
if (WriteID(writer, kMkvSimpleBlock))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const int32 size = static_cast<int32>(frame->length()) + 4;
|
||||||
|
if (WriteUInt(writer, size))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (WriteUInt(writer, static_cast<uint64>(frame->track_number())))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (SerializeInt(writer, timecode, 2))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
uint64 flags = 0;
|
||||||
|
if (frame->is_key())
|
||||||
|
flags |= 0x80;
|
||||||
|
|
||||||
|
if (SerializeInt(writer, flags, 1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (writer->Write(frame->frame(), static_cast<uint32>(frame->length())))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return GetUIntSize(kMkvSimpleBlock) + GetCodedUIntSize(size) + 4 +
|
||||||
|
frame->length();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int32 GetCodedUIntSize(uint64 value) {
|
int32 GetCodedUIntSize(uint64 value) {
|
||||||
@@ -72,6 +211,13 @@ int32 GetUIntSize(uint64 value) {
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32 GetIntSize(int64 value) {
|
||||||
|
// Doubling the requested value ensures positive values with their high bit
|
||||||
|
// set are written with 0-padding to avoid flipping the signedness.
|
||||||
|
const uint64 v = (value < 0) ? value ^ -1LL : value;
|
||||||
|
return GetUIntSize(2 * v);
|
||||||
|
}
|
||||||
|
|
||||||
uint64 EbmlMasterElementSize(uint64 type, uint64 value) {
|
uint64 EbmlMasterElementSize(uint64 type, uint64 value) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
int32 ebml_size = GetUIntSize(type);
|
int32 ebml_size = GetUIntSize(type);
|
||||||
@@ -83,7 +229,16 @@ uint64 EbmlMasterElementSize(uint64 type, uint64 value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, int64 value) {
|
uint64 EbmlElementSize(uint64 type, int64 value) {
|
||||||
return EbmlElementSize(type, static_cast<uint64>(value));
|
// Size of EBML ID
|
||||||
|
int32 ebml_size = GetUIntSize(type);
|
||||||
|
|
||||||
|
// Datasize
|
||||||
|
ebml_size += GetIntSize(value);
|
||||||
|
|
||||||
|
// Size of Datasize
|
||||||
|
ebml_size++;
|
||||||
|
|
||||||
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, uint64 value) {
|
uint64 EbmlElementSize(uint64 type, uint64 value) {
|
||||||
@@ -144,7 +299,7 @@ uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlDateElementSize(uint64 type, int64 value) {
|
uint64 EbmlDateElementSize(uint64 type) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
uint64 ebml_size = GetUIntSize(type);
|
uint64 ebml_size = GetUIntSize(type);
|
||||||
|
|
||||||
@@ -289,6 +444,23 @@ bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value) {
|
||||||
|
if (!writer)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (WriteID(writer, type))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const uint64 size = GetIntSize(value);
|
||||||
|
if (WriteUInt(writer, size))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (SerializeInt(writer, value, static_cast<int32>(size)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value) {
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
@@ -355,289 +527,25 @@ bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 WriteSimpleBlock(IMkvWriter* writer, const uint8* data, uint64 length,
|
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||||
uint64 track_number, int64 timecode, uint64 is_key) {
|
Cluster* cluster) {
|
||||||
if (!writer)
|
if (!writer || !frame || !frame->IsValid() || !cluster ||
|
||||||
return false;
|
!cluster->timecode_scale())
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!data || length < 1)
|
// Technically the timecode for a block can be less than the
|
||||||
return false;
|
// timecode for the cluster itself (remember that block timecode
|
||||||
|
|
||||||
// Here we only permit track number values to be no greater than
|
|
||||||
// 126, which the largest value we can store having a Matroska
|
|
||||||
// integer representation of only 1 byte.
|
|
||||||
|
|
||||||
if (track_number < 1 || track_number > 126)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Technically the timestamp for a block can be less than the
|
|
||||||
// timestamp for the cluster itself (remember that block timestamp
|
|
||||||
// is a signed, 16-bit integer). However, as a simplification we
|
// is a signed, 16-bit integer). However, as a simplification we
|
||||||
// only permit non-negative cluster-relative timestamps for blocks.
|
// only permit non-negative cluster-relative timecodes for blocks.
|
||||||
|
const int64 relative_timecode = cluster->GetRelativeTimecode(
|
||||||
if (timecode < 0 || timecode > kMaxBlockTimecode)
|
frame->timestamp() / cluster->timecode_scale());
|
||||||
return false;
|
if (relative_timecode < 0 || relative_timecode > kMaxBlockTimecode)
|
||||||
|
|
||||||
if (WriteID(writer, kMkvSimpleBlock))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const int32 size = static_cast<int32>(length) + 4;
|
return frame->CanBeSimpleBlock() ?
|
||||||
if (WriteUInt(writer, size))
|
WriteSimpleBlock(writer, frame, relative_timecode) :
|
||||||
return 0;
|
WriteBlock(writer, frame, relative_timecode,
|
||||||
|
cluster->timecode_scale());
|
||||||
if (WriteUInt(writer, static_cast<uint64>(track_number)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, timecode, 2))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
uint64 flags = 0;
|
|
||||||
if (is_key)
|
|
||||||
flags |= 0x80;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, flags, 1))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (writer->Write(data, static_cast<uint32>(length)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
const uint64 element_size =
|
|
||||||
GetUIntSize(kMkvSimpleBlock) + GetCodedUIntSize(size) + 4 + length;
|
|
||||||
|
|
||||||
return element_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We must write the metadata (key)frame as a BlockGroup element,
|
|
||||||
// because we need to specify a duration for the frame. The
|
|
||||||
// BlockGroup element comprises the frame itself and its duration,
|
|
||||||
// and is laid out as follows:
|
|
||||||
//
|
|
||||||
// BlockGroup tag
|
|
||||||
// BlockGroup size
|
|
||||||
// Block tag
|
|
||||||
// Block size
|
|
||||||
// (the frame is the block payload)
|
|
||||||
// Duration tag
|
|
||||||
// Duration size
|
|
||||||
// (duration payload)
|
|
||||||
//
|
|
||||||
uint64 WriteMetadataBlock(IMkvWriter* writer, const uint8* data, uint64 length,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 duration) {
|
|
||||||
// We don't backtrack when writing to the stream, so we must
|
|
||||||
// pre-compute the BlockGroup size, by summing the sizes of each
|
|
||||||
// sub-element (the block and the duration).
|
|
||||||
|
|
||||||
// We use a single byte for the track number of the block, which
|
|
||||||
// means the block header is exactly 4 bytes.
|
|
||||||
|
|
||||||
// TODO(matthewjheaney): use EbmlMasterElementSize and WriteEbmlMasterElement
|
|
||||||
|
|
||||||
const uint64 block_payload_size = 4 + length;
|
|
||||||
const int32 block_size = GetCodedUIntSize(block_payload_size);
|
|
||||||
const uint64 block_elem_size = 1 + block_size + block_payload_size;
|
|
||||||
|
|
||||||
const int32 duration_payload_size = GetUIntSize(duration);
|
|
||||||
const int32 duration_size = GetCodedUIntSize(duration_payload_size);
|
|
||||||
const uint64 duration_elem_size = 1 + duration_size + duration_payload_size;
|
|
||||||
|
|
||||||
const uint64 blockg_payload_size = block_elem_size + duration_elem_size;
|
|
||||||
const int32 blockg_size = GetCodedUIntSize(blockg_payload_size);
|
|
||||||
const uint64 blockg_elem_size = 1 + blockg_size + blockg_payload_size;
|
|
||||||
|
|
||||||
if (WriteID(writer, kMkvBlockGroup)) // 1-byte ID size
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteUInt(writer, blockg_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Write Block element
|
|
||||||
|
|
||||||
if (WriteID(writer, kMkvBlock)) // 1-byte ID size
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteUInt(writer, block_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Byte 1 of 4
|
|
||||||
|
|
||||||
if (WriteUInt(writer, track_number))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Bytes 2 & 3 of 4
|
|
||||||
|
|
||||||
if (SerializeInt(writer, timecode, 2))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Byte 4 of 4
|
|
||||||
|
|
||||||
const uint64 flags = 0;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, flags, 1))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Now write the actual frame (of metadata)
|
|
||||||
|
|
||||||
if (writer->Write(data, static_cast<uint32>(length)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Write Duration element
|
|
||||||
|
|
||||||
if (WriteID(writer, kMkvBlockDuration)) // 1-byte ID size
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteUInt(writer, duration_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, duration, duration_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// Note that we don't write a reference time as part of the block
|
|
||||||
// group; no reference time(s) indicates that this block is a
|
|
||||||
// keyframe. (Unlike the case for a SimpleBlock element, the header
|
|
||||||
// bits of the Block sub-element of a BlockGroup element do not
|
|
||||||
// indicate keyframe status. The keyframe status is inferred from
|
|
||||||
// the absence of reference time sub-elements.)
|
|
||||||
|
|
||||||
return blockg_elem_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Writes a WebM BlockGroup with BlockAdditional data. The structure is as
|
|
||||||
// follows:
|
|
||||||
// Indentation shows sub-levels
|
|
||||||
// BlockGroup
|
|
||||||
// Block
|
|
||||||
// Data
|
|
||||||
// BlockAdditions
|
|
||||||
// BlockMore
|
|
||||||
// BlockAddID
|
|
||||||
// 1 (Denotes Alpha)
|
|
||||||
// BlockAdditional
|
|
||||||
// Data
|
|
||||||
uint64 WriteBlockWithAdditional(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, const uint8* additional,
|
|
||||||
uint64 additional_length, uint64 add_id,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 is_key) {
|
|
||||||
if (!data || !additional || length < 1 || additional_length < 1)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
const uint64 block_payload_size = 4 + length;
|
|
||||||
const uint64 block_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlock, block_payload_size) + block_payload_size;
|
|
||||||
const uint64 block_additional_elem_size =
|
|
||||||
EbmlElementSize(kMkvBlockAdditional, additional, additional_length);
|
|
||||||
const uint64 block_addid_elem_size = EbmlElementSize(kMkvBlockAddID, add_id);
|
|
||||||
|
|
||||||
const uint64 block_more_payload_size =
|
|
||||||
block_addid_elem_size + block_additional_elem_size;
|
|
||||||
const uint64 block_more_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlockMore, block_more_payload_size) +
|
|
||||||
block_more_payload_size;
|
|
||||||
const uint64 block_additions_payload_size = block_more_elem_size;
|
|
||||||
const uint64 block_additions_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlockAdditions, block_additions_payload_size) +
|
|
||||||
block_additions_payload_size;
|
|
||||||
const uint64 block_group_payload_size =
|
|
||||||
block_elem_size + block_additions_elem_size;
|
|
||||||
const uint64 block_group_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlockGroup, block_group_payload_size) +
|
|
||||||
block_group_payload_size;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockGroup, block_group_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlock, block_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteUInt(writer, track_number))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, timecode, 2))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
uint64 flags = 0;
|
|
||||||
if (is_key)
|
|
||||||
flags |= 0x80;
|
|
||||||
if (SerializeInt(writer, flags, 1))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (writer->Write(data, static_cast<uint32>(length)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockAdditions,
|
|
||||||
block_additions_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockMore, block_more_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlElement(writer, kMkvBlockAddID, add_id))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlElement(writer, kMkvBlockAdditional, additional,
|
|
||||||
additional_length))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return block_group_elem_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Writes a WebM BlockGroup with DiscardPadding. The structure is as follows:
|
|
||||||
// Indentation shows sub-levels
|
|
||||||
// BlockGroup
|
|
||||||
// Block
|
|
||||||
// Data
|
|
||||||
// DiscardPadding
|
|
||||||
uint64 WriteBlockWithDiscardPadding(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, int64 discard_padding,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 is_key) {
|
|
||||||
if (!data || length < 1 || discard_padding <= 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
const uint64 block_payload_size = 4 + length;
|
|
||||||
const uint64 block_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlock, block_payload_size) + block_payload_size;
|
|
||||||
const uint64 discard_padding_elem_size =
|
|
||||||
EbmlElementSize(kMkvDiscardPadding, discard_padding);
|
|
||||||
const uint64 block_group_payload_size =
|
|
||||||
block_elem_size + discard_padding_elem_size;
|
|
||||||
const uint64 block_group_elem_size =
|
|
||||||
EbmlMasterElementSize(kMkvBlockGroup, block_group_payload_size) +
|
|
||||||
block_group_payload_size;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockGroup, block_group_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlock, block_payload_size))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteUInt(writer, track_number))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, timecode, 2))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
uint64 flags = 0;
|
|
||||||
if (is_key)
|
|
||||||
flags |= 0x80;
|
|
||||||
if (SerializeInt(writer, flags, 1))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (writer->Write(data, static_cast<uint32>(length)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (WriteID(writer, kMkvDiscardPadding))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
const uint64 size = GetUIntSize(discard_padding);
|
|
||||||
if (WriteUInt(writer, size))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (SerializeInt(writer, discard_padding, static_cast<int32>(size)))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return block_group_elem_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 WriteVoidElement(IMkvWriter* writer, uint64 size) {
|
uint64 WriteVoidElement(IMkvWriter* writer, uint64 size) {
|
||||||
@@ -698,10 +606,7 @@ mkvmuxer::uint64 mkvmuxer::MakeUID(unsigned int* seed) {
|
|||||||
// TODO(fgalligan): Move random number generation to platform specific code.
|
// TODO(fgalligan): Move random number generation to platform specific code.
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
(void)seed;
|
(void)seed;
|
||||||
unsigned int random_value;
|
const int32 nn = rand();
|
||||||
const errno_t e = rand_s(&random_value);
|
|
||||||
(void)e;
|
|
||||||
const int32 nn = random_value;
|
|
||||||
#elif __ANDROID__
|
#elif __ANDROID__
|
||||||
int32 temp_num = 1;
|
int32 temp_num = 1;
|
||||||
int fd = open("/dev/urandom", O_RDONLY);
|
int fd = open("/dev/urandom", O_RDONLY);
|
||||||
|
|||||||
70
third_party/libwebm/mkvmuxerutil.hpp
vendored
70
third_party/libwebm/mkvmuxerutil.hpp
vendored
@@ -9,6 +9,7 @@
|
|||||||
#ifndef MKVMUXERUTIL_HPP
|
#ifndef MKVMUXERUTIL_HPP
|
||||||
#define MKVMUXERUTIL_HPP
|
#define MKVMUXERUTIL_HPP
|
||||||
|
|
||||||
|
#include "mkvmuxer.hpp"
|
||||||
#include "mkvmuxertypes.hpp"
|
#include "mkvmuxertypes.hpp"
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace mkvmuxer {
|
||||||
@@ -23,6 +24,7 @@ int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);
|
|||||||
|
|
||||||
// Returns the size in bytes of the element.
|
// Returns the size in bytes of the element.
|
||||||
int32 GetUIntSize(uint64 value);
|
int32 GetUIntSize(uint64 value);
|
||||||
|
int32 GetIntSize(int64 value);
|
||||||
int32 GetCodedUIntSize(uint64 value);
|
int32 GetCodedUIntSize(uint64 value);
|
||||||
uint64 EbmlMasterElementSize(uint64 type, uint64 value);
|
uint64 EbmlMasterElementSize(uint64 type, uint64 value);
|
||||||
uint64 EbmlElementSize(uint64 type, int64 value);
|
uint64 EbmlElementSize(uint64 type, int64 value);
|
||||||
@@ -30,7 +32,7 @@ uint64 EbmlElementSize(uint64 type, uint64 value);
|
|||||||
uint64 EbmlElementSize(uint64 type, float value);
|
uint64 EbmlElementSize(uint64 type, float value);
|
||||||
uint64 EbmlElementSize(uint64 type, const char* value);
|
uint64 EbmlElementSize(uint64 type, const char* value);
|
||||||
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size);
|
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size);
|
||||||
uint64 EbmlDateElementSize(uint64 type, int64 value);
|
uint64 EbmlDateElementSize(uint64 type);
|
||||||
|
|
||||||
// Creates an EBML coded number from |value| and writes it out. The size of
|
// Creates an EBML coded number from |value| and writes it out. The size of
|
||||||
// the coded number is determined by the value of |value|. |value| must not
|
// the coded number is determined by the value of |value|. |value| must not
|
||||||
@@ -51,73 +53,17 @@ int32 WriteID(IMkvWriter* writer, uint64 type);
|
|||||||
|
|
||||||
// Output an Mkv non-master element. Returns true if the element was written.
|
// Output an Mkv non-master element. Returns true if the element was written.
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value);
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value);
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value);
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value);
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value);
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value);
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value);
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
||||||
uint64 size);
|
uint64 size);
|
||||||
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value);
|
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value);
|
||||||
|
|
||||||
// Output an Mkv Simple Block.
|
// Output a Mkv Frame. It decides the correct element to write (Block vs
|
||||||
// Inputs:
|
// SimpleBlock) based on the parameters of the Frame.
|
||||||
// data: Pointer to the data.
|
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||||
// length: Length of the data.
|
Cluster* cluster);
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
|
||||||
// functions. Only values in the range [1, 126] are
|
|
||||||
// permitted.
|
|
||||||
// timecode: Relative timecode of the Block. Only values in the
|
|
||||||
// range [0, 2^15) are permitted.
|
|
||||||
// is_key: Non-zero value specifies that frame is a key frame.
|
|
||||||
uint64 WriteSimpleBlock(IMkvWriter* writer, const uint8* data, uint64 length,
|
|
||||||
uint64 track_number, int64 timecode, uint64 is_key);
|
|
||||||
|
|
||||||
// Output a metadata keyframe, using a Block Group element.
|
|
||||||
// Inputs:
|
|
||||||
// data: Pointer to the (meta)data.
|
|
||||||
// length: Length of the (meta)data.
|
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
|
||||||
// functions. Only values in the range [1, 126] are
|
|
||||||
// permitted.
|
|
||||||
// timecode Timecode of frame, relative to cluster timecode. Only
|
|
||||||
// values in the range [0, 2^15) are permitted.
|
|
||||||
// duration_timecode Duration of frame, using timecode units.
|
|
||||||
uint64 WriteMetadataBlock(IMkvWriter* writer, const uint8* data, uint64 length,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 duration_timecode);
|
|
||||||
|
|
||||||
// Output an Mkv Block with BlockAdditional data.
|
|
||||||
// Inputs:
|
|
||||||
// data: Pointer to the data.
|
|
||||||
// length: Length of the data.
|
|
||||||
// additional: Pointer to the additional data
|
|
||||||
// additional_length: Length of the additional data.
|
|
||||||
// add_id: Value of BlockAddID element.
|
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
|
||||||
// functions. Only values in the range [1, 126] are
|
|
||||||
// permitted.
|
|
||||||
// timecode: Relative timecode of the Block. Only values in the
|
|
||||||
// range [0, 2^15) are permitted.
|
|
||||||
// is_key: Non-zero value specifies that frame is a key frame.
|
|
||||||
uint64 WriteBlockWithAdditional(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, const uint8* additional,
|
|
||||||
uint64 additional_length, uint64 add_id,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 is_key);
|
|
||||||
|
|
||||||
// Output an Mkv Block with a DiscardPadding element.
|
|
||||||
// Inputs:
|
|
||||||
// data: Pointer to the data.
|
|
||||||
// length: Length of the data.
|
|
||||||
// discard_padding: DiscardPadding value.
|
|
||||||
// track_number: Track to add the data to. Value returned by Add track
|
|
||||||
// functions. Only values in the range [1, 126] are
|
|
||||||
// permitted.
|
|
||||||
// timecode: Relative timecode of the Block. Only values in the
|
|
||||||
// range [0, 2^15) are permitted.
|
|
||||||
// is_key: Non-zero value specifies that frame is a key frame.
|
|
||||||
uint64 WriteBlockWithDiscardPadding(IMkvWriter* writer, const uint8* data,
|
|
||||||
uint64 length, int64 discard_padding,
|
|
||||||
uint64 track_number, int64 timecode,
|
|
||||||
uint64 is_key);
|
|
||||||
|
|
||||||
// Output a void element. |size| must be the entire size in bytes that will be
|
// Output a void element. |size| must be the entire size in bytes that will be
|
||||||
// void. The function will calculate the size of the void header and subtract
|
// void. The function will calculate the size of the void header and subtract
|
||||||
|
|||||||
3250
third_party/libwebm/mkvparser.cpp
vendored
3250
third_party/libwebm/mkvparser.cpp
vendored
File diff suppressed because it is too large
Load Diff
128
third_party/libwebm/mkvparser.hpp
vendored
128
third_party/libwebm/mkvparser.hpp
vendored
@@ -9,12 +9,13 @@
|
|||||||
#ifndef MKVPARSER_HPP
|
#ifndef MKVPARSER_HPP
|
||||||
#define MKVPARSER_HPP
|
#define MKVPARSER_HPP
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace mkvparser {
|
namespace mkvparser {
|
||||||
|
|
||||||
|
const int E_PARSE_FAILED = -1;
|
||||||
const int E_FILE_FORMAT_INVALID = -2;
|
const int E_FILE_FORMAT_INVALID = -2;
|
||||||
const int E_BUFFER_NOT_FULL = -3;
|
const int E_BUFFER_NOT_FULL = -3;
|
||||||
|
|
||||||
@@ -27,12 +28,16 @@ class IMkvReader {
|
|||||||
virtual ~IMkvReader();
|
virtual ~IMkvReader();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename Type> Type* SafeArrayAlloc(unsigned long long num_elements,
|
||||||
|
unsigned long long element_size);
|
||||||
long long GetUIntLength(IMkvReader*, long long, long&);
|
long long GetUIntLength(IMkvReader*, long long, long&);
|
||||||
long long ReadUInt(IMkvReader*, long long, long&);
|
long long ReadUInt(IMkvReader*, long long, long&);
|
||||||
|
long long ReadID(IMkvReader* pReader, long long pos, long& len);
|
||||||
long long UnserializeUInt(IMkvReader*, long long pos, long long size);
|
long long UnserializeUInt(IMkvReader*, long long pos, long long size);
|
||||||
|
|
||||||
long UnserializeFloat(IMkvReader*, long long pos, long long size, double&);
|
long UnserializeFloat(IMkvReader*, long long pos, long long size, double&);
|
||||||
long UnserializeInt(IMkvReader*, long long pos, long len, long long& result);
|
long UnserializeInt(IMkvReader*, long long pos, long long size,
|
||||||
|
long long& result);
|
||||||
|
|
||||||
long UnserializeString(IMkvReader*, long long pos, long long size, char*& str);
|
long UnserializeString(IMkvReader*, long long pos, long long size, char*& str);
|
||||||
|
|
||||||
@@ -398,6 +403,10 @@ class VideoTrack : public Track {
|
|||||||
|
|
||||||
long long GetWidth() const;
|
long long GetWidth() const;
|
||||||
long long GetHeight() const;
|
long long GetHeight() const;
|
||||||
|
long long GetDisplayWidth() const;
|
||||||
|
long long GetDisplayHeight() const;
|
||||||
|
long long GetDisplayUnit() const;
|
||||||
|
long long GetStereoMode() const;
|
||||||
double GetFrameRate() const;
|
double GetFrameRate() const;
|
||||||
|
|
||||||
bool VetEntry(const BlockEntry*) const;
|
bool VetEntry(const BlockEntry*) const;
|
||||||
@@ -406,6 +415,11 @@ class VideoTrack : public Track {
|
|||||||
private:
|
private:
|
||||||
long long m_width;
|
long long m_width;
|
||||||
long long m_height;
|
long long m_height;
|
||||||
|
long long m_display_width;
|
||||||
|
long long m_display_height;
|
||||||
|
long long m_display_unit;
|
||||||
|
long long m_stereo_mode;
|
||||||
|
|
||||||
double m_rate;
|
double m_rate;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -582,6 +596,85 @@ class Chapters {
|
|||||||
int m_editions_count;
|
int m_editions_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Tags {
|
||||||
|
Tags(const Tags&);
|
||||||
|
Tags& operator=(const Tags&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
Segment* const m_pSegment;
|
||||||
|
const long long m_start;
|
||||||
|
const long long m_size;
|
||||||
|
const long long m_element_start;
|
||||||
|
const long long m_element_size;
|
||||||
|
|
||||||
|
Tags(Segment*, long long payload_start, long long payload_size,
|
||||||
|
long long element_start, long long element_size);
|
||||||
|
|
||||||
|
~Tags();
|
||||||
|
|
||||||
|
long Parse();
|
||||||
|
|
||||||
|
class Tag;
|
||||||
|
class SimpleTag;
|
||||||
|
|
||||||
|
class SimpleTag {
|
||||||
|
friend class Tag;
|
||||||
|
SimpleTag();
|
||||||
|
SimpleTag(const SimpleTag&);
|
||||||
|
~SimpleTag();
|
||||||
|
SimpleTag& operator=(const SimpleTag&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
const char* GetTagName() const;
|
||||||
|
const char* GetTagString() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Init();
|
||||||
|
void ShallowCopy(SimpleTag&) const;
|
||||||
|
void Clear();
|
||||||
|
long Parse(IMkvReader*, long long pos, long long size);
|
||||||
|
|
||||||
|
char* m_tag_name;
|
||||||
|
char* m_tag_string;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Tag {
|
||||||
|
friend class Tags;
|
||||||
|
Tag();
|
||||||
|
Tag(const Tag&);
|
||||||
|
~Tag();
|
||||||
|
Tag& operator=(const Tag&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
int GetSimpleTagCount() const;
|
||||||
|
const SimpleTag* GetSimpleTag(int index) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Init();
|
||||||
|
void ShallowCopy(Tag&) const;
|
||||||
|
void Clear();
|
||||||
|
long Parse(IMkvReader*, long long pos, long long size);
|
||||||
|
|
||||||
|
long ParseSimpleTag(IMkvReader*, long long pos, long long size);
|
||||||
|
bool ExpandSimpleTagsArray();
|
||||||
|
|
||||||
|
SimpleTag* m_simple_tags;
|
||||||
|
int m_simple_tags_size;
|
||||||
|
int m_simple_tags_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
int GetTagCount() const;
|
||||||
|
const Tag* GetTag(int index) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
long ParseTag(long long pos, long long size);
|
||||||
|
bool ExpandTagsArray();
|
||||||
|
|
||||||
|
Tag* m_tags;
|
||||||
|
int m_tags_size;
|
||||||
|
int m_tags_count;
|
||||||
|
};
|
||||||
|
|
||||||
class SegmentInfo {
|
class SegmentInfo {
|
||||||
SegmentInfo(const SegmentInfo&);
|
SegmentInfo(const SegmentInfo&);
|
||||||
SegmentInfo& operator=(const SegmentInfo&);
|
SegmentInfo& operator=(const SegmentInfo&);
|
||||||
@@ -684,7 +777,7 @@ class CuePoint {
|
|||||||
long long m_element_start;
|
long long m_element_start;
|
||||||
long long m_element_size;
|
long long m_element_size;
|
||||||
|
|
||||||
void Load(IMkvReader*);
|
bool Load(IMkvReader*);
|
||||||
|
|
||||||
long long GetTimeCode() const; // absolute but unscaled
|
long long GetTimeCode() const; // absolute but unscaled
|
||||||
long long GetTime(const Segment*) const; // absolute and scaled (ns units)
|
long long GetTime(const Segment*) const; // absolute and scaled (ns units)
|
||||||
@@ -697,7 +790,7 @@ class CuePoint {
|
|||||||
// reference = clusters containing req'd referenced blocks
|
// reference = clusters containing req'd referenced blocks
|
||||||
// reftime = timecode of the referenced block
|
// reftime = timecode of the referenced block
|
||||||
|
|
||||||
void Parse(IMkvReader*, long long, long long);
|
bool Parse(IMkvReader*, long long, long long);
|
||||||
};
|
};
|
||||||
|
|
||||||
const TrackPosition* Find(const Track*) const;
|
const TrackPosition* Find(const Track*) const;
|
||||||
@@ -730,14 +823,6 @@ class Cues {
|
|||||||
long long time_ns, const Track*, const CuePoint*&,
|
long long time_ns, const Track*, const CuePoint*&,
|
||||||
const CuePoint::TrackPosition*&) const;
|
const CuePoint::TrackPosition*&) const;
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool FindNext( //upper_bound of time_ns
|
|
||||||
long long time_ns,
|
|
||||||
const Track*,
|
|
||||||
const CuePoint*&,
|
|
||||||
const CuePoint::TrackPosition*&) const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const CuePoint* GetFirst() const;
|
const CuePoint* GetFirst() const;
|
||||||
const CuePoint* GetLast() const;
|
const CuePoint* GetLast() const;
|
||||||
const CuePoint* GetNext(const CuePoint*) const;
|
const CuePoint* GetNext(const CuePoint*) const;
|
||||||
@@ -751,8 +836,8 @@ class Cues {
|
|||||||
bool DoneParsing() const;
|
bool DoneParsing() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init() const;
|
bool Init() const;
|
||||||
void PreloadCuePoint(long&, long long) const;
|
bool PreloadCuePoint(long&, long long) const;
|
||||||
|
|
||||||
mutable CuePoint** m_cue_points;
|
mutable CuePoint** m_cue_points;
|
||||||
mutable long m_count;
|
mutable long m_count;
|
||||||
@@ -877,18 +962,12 @@ class Segment {
|
|||||||
long ParseNext(const Cluster* pCurr, const Cluster*& pNext, long long& pos,
|
long ParseNext(const Cluster* pCurr, const Cluster*& pNext, long long& pos,
|
||||||
long& size);
|
long& size);
|
||||||
|
|
||||||
#if 0
|
|
||||||
//This pair parses one cluster, but only changes the state of the
|
|
||||||
//segment object when the cluster is actually added to the index.
|
|
||||||
long ParseCluster(long long& cluster_pos, long long& new_pos) const;
|
|
||||||
bool AddCluster(long long cluster_pos, long long new_pos);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const SeekHead* GetSeekHead() const;
|
const SeekHead* GetSeekHead() const;
|
||||||
const Tracks* GetTracks() const;
|
const Tracks* GetTracks() const;
|
||||||
const SegmentInfo* GetInfo() const;
|
const SegmentInfo* GetInfo() const;
|
||||||
const Cues* GetCues() const;
|
const Cues* GetCues() const;
|
||||||
const Chapters* GetChapters() const;
|
const Chapters* GetChapters() const;
|
||||||
|
const Tags* GetTags() const;
|
||||||
|
|
||||||
long long GetDuration() const;
|
long long GetDuration() const;
|
||||||
|
|
||||||
@@ -914,6 +993,7 @@ class Segment {
|
|||||||
Tracks* m_pTracks;
|
Tracks* m_pTracks;
|
||||||
Cues* m_pCues;
|
Cues* m_pCues;
|
||||||
Chapters* m_pChapters;
|
Chapters* m_pChapters;
|
||||||
|
Tags* m_pTags;
|
||||||
Cluster** m_clusters;
|
Cluster** m_clusters;
|
||||||
long m_clusterCount; // number of entries for which m_index >= 0
|
long m_clusterCount; // number of entries for which m_index >= 0
|
||||||
long m_clusterPreloadCount; // number of entries for which m_index < 0
|
long m_clusterPreloadCount; // number of entries for which m_index < 0
|
||||||
@@ -923,8 +1003,8 @@ class Segment {
|
|||||||
long DoLoadClusterUnknownSize(long long&, long&);
|
long DoLoadClusterUnknownSize(long long&, long&);
|
||||||
long DoParseNext(const Cluster*&, long long&, long&);
|
long DoParseNext(const Cluster*&, long long&, long&);
|
||||||
|
|
||||||
void AppendCluster(Cluster*);
|
bool AppendCluster(Cluster*);
|
||||||
void PreloadCluster(Cluster*, ptrdiff_t);
|
bool PreloadCluster(Cluster*, ptrdiff_t);
|
||||||
|
|
||||||
// void ParseSeekHead(long long pos, long long size);
|
// void ParseSeekHead(long long pos, long long size);
|
||||||
// void ParseSeekEntry(long long pos, long long size);
|
// void ParseSeekEntry(long long pos, long long size);
|
||||||
|
|||||||
16
third_party/libwebm/webmids.hpp
vendored
16
third_party/libwebm/webmids.hpp
vendored
@@ -41,6 +41,7 @@ enum MkvId {
|
|||||||
kMkvTimecodeScale = 0x2AD7B1,
|
kMkvTimecodeScale = 0x2AD7B1,
|
||||||
kMkvDuration = 0x4489,
|
kMkvDuration = 0x4489,
|
||||||
kMkvDateUTC = 0x4461,
|
kMkvDateUTC = 0x4461,
|
||||||
|
kMkvTitle = 0x7BA9,
|
||||||
kMkvMuxingApp = 0x4D80,
|
kMkvMuxingApp = 0x4D80,
|
||||||
kMkvWritingApp = 0x5741,
|
kMkvWritingApp = 0x5741,
|
||||||
// Cluster
|
// Cluster
|
||||||
@@ -107,9 +108,16 @@ enum MkvId {
|
|||||||
kMkvContentEncodingOrder = 0x5031,
|
kMkvContentEncodingOrder = 0x5031,
|
||||||
kMkvContentEncodingScope = 0x5032,
|
kMkvContentEncodingScope = 0x5032,
|
||||||
kMkvContentEncodingType = 0x5033,
|
kMkvContentEncodingType = 0x5033,
|
||||||
|
kMkvContentCompression = 0x5034,
|
||||||
|
kMkvContentCompAlgo = 0x4254,
|
||||||
|
kMkvContentCompSettings = 0x4255,
|
||||||
kMkvContentEncryption = 0x5035,
|
kMkvContentEncryption = 0x5035,
|
||||||
kMkvContentEncAlgo = 0x47E1,
|
kMkvContentEncAlgo = 0x47E1,
|
||||||
kMkvContentEncKeyID = 0x47E2,
|
kMkvContentEncKeyID = 0x47E2,
|
||||||
|
kMkvContentSignature = 0x47E3,
|
||||||
|
kMkvContentSigKeyID = 0x47E4,
|
||||||
|
kMkvContentSigAlgo = 0x47E5,
|
||||||
|
kMkvContentSigHashAlgo = 0x47E6,
|
||||||
kMkvContentEncAESSettings = 0x47E7,
|
kMkvContentEncAESSettings = 0x47E7,
|
||||||
kMkvAESSettingsCipherMode = 0x47E8,
|
kMkvAESSettingsCipherMode = 0x47E8,
|
||||||
kMkvAESSettingsCipherInitData = 0x47E9,
|
kMkvAESSettingsCipherInitData = 0x47E9,
|
||||||
@@ -133,7 +141,13 @@ enum MkvId {
|
|||||||
kMkvChapterDisplay = 0x80,
|
kMkvChapterDisplay = 0x80,
|
||||||
kMkvChapString = 0x85,
|
kMkvChapString = 0x85,
|
||||||
kMkvChapLanguage = 0x437C,
|
kMkvChapLanguage = 0x437C,
|
||||||
kMkvChapCountry = 0x437E
|
kMkvChapCountry = 0x437E,
|
||||||
|
// Tags
|
||||||
|
kMkvTags = 0x1254C367,
|
||||||
|
kMkvTag = 0x7373,
|
||||||
|
kMkvSimpleTag = 0x67C8,
|
||||||
|
kMkvTagName = 0x45A3,
|
||||||
|
kMkvTagString = 0x4487
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace mkvmuxer
|
} // end namespace mkvmuxer
|
||||||
|
|||||||
3
third_party/libyuv/README.libvpx
vendored
3
third_party/libyuv/README.libvpx
vendored
@@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1305
|
Version: 1456
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
@@ -13,4 +13,3 @@ which down-samples the original input video (f.g. 1280x720) a number of times
|
|||||||
in order to encode multiple resolution bit streams.
|
in order to encode multiple resolution bit streams.
|
||||||
|
|
||||||
Local Modifications:
|
Local Modifications:
|
||||||
cherry pick r1311 'disable nv12 avx2 for vs9/10 that dont support avx2 instructions.'
|
|
||||||
|
|||||||
2
third_party/libyuv/include/libyuv/convert.h
vendored
2
third_party/libyuv/include/libyuv/convert.h
vendored
@@ -71,6 +71,8 @@ int I400ToI420(const uint8* src_y, int src_stride_y,
|
|||||||
uint8* dst_v, int dst_stride_v,
|
uint8* dst_v, int dst_stride_v,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
#define J400ToJ420 I400ToI420
|
||||||
|
|
||||||
// Convert NV12 to I420.
|
// Convert NV12 to I420.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int NV12ToI420(const uint8* src_y, int src_stride_y,
|
int NV12ToI420(const uint8* src_y, int src_stride_y,
|
||||||
|
|||||||
16
third_party/libyuv/include/libyuv/convert_argb.h
vendored
16
third_party/libyuv/include/libyuv/convert_argb.h
vendored
@@ -68,20 +68,20 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
|
|||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
// Convert I400 (grey) to ARGB.
|
// Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int I400ToARGB(const uint8* src_y, int src_stride_y,
|
int I400ToARGB(const uint8* src_y, int src_stride_y,
|
||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
// Alias.
|
// Convert J400 (jpeg grey) to ARGB.
|
||||||
#define YToARGB I400ToARGB_Reference
|
|
||||||
|
|
||||||
// Convert I400 to ARGB. Reverse of ARGBToI400.
|
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int I400ToARGB_Reference(const uint8* src_y, int src_stride_y,
|
int J400ToARGB(const uint8* src_y, int src_stride_y,
|
||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
// Alias.
|
||||||
|
#define YToARGB I400ToARGB
|
||||||
|
|
||||||
// Convert NV12 to ARGB.
|
// Convert NV12 to ARGB.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
|
|||||||
11
third_party/libyuv/include/libyuv/convert_from.h
vendored
11
third_party/libyuv/include/libyuv/convert_from.h
vendored
@@ -137,6 +137,17 @@ int I420ToRGB565(const uint8* src_y, int src_stride_y,
|
|||||||
uint8* dst_frame, int dst_stride_frame,
|
uint8* dst_frame, int dst_stride_frame,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
// Convert I420 To RGB565 with 4x4 dither matrix (16 bytes).
|
||||||
|
// Values in dither matrix from 0 to 7 recommended.
|
||||||
|
// The order of the dither matrix is first byte is upper left.
|
||||||
|
|
||||||
|
LIBYUV_API
|
||||||
|
int I420ToRGB565Dither(const uint8* src_y, int src_stride_y,
|
||||||
|
const uint8* src_u, int src_stride_u,
|
||||||
|
const uint8* src_v, int src_stride_v,
|
||||||
|
uint8* dst_frame, int dst_stride_frame,
|
||||||
|
const uint8* dither4x4, int width, int height);
|
||||||
|
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int I420ToARGB1555(const uint8* src_y, int src_stride_y,
|
int I420ToARGB1555(const uint8* src_y, int src_stride_y,
|
||||||
const uint8* src_u, int src_stride_u,
|
const uint8* src_u, int src_stride_u,
|
||||||
|
|||||||
@@ -61,12 +61,15 @@ int ARGBToRGB565(const uint8* src_argb, int src_stride_argb,
|
|||||||
uint8* dst_rgb565, int dst_stride_rgb565,
|
uint8* dst_rgb565, int dst_stride_rgb565,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
// Convert ARGB To RGB565 with 8x8 dither matrix (64 bytes).
|
// Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes).
|
||||||
// Values in dither matrix from 0 to 255. 128 is best for no dither.
|
// Values in dither matrix from 0 to 7 recommended.
|
||||||
|
// The order of the dither matrix is first byte is upper left.
|
||||||
|
// TODO(fbarchard): Consider pointer to 2d array for dither4x4.
|
||||||
|
// const uint8(*dither)[4][4];
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb,
|
int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb,
|
||||||
uint8* dst_rgb565, int dst_stride_rgb565,
|
uint8* dst_rgb565, int dst_stride_rgb565,
|
||||||
const uint8* dither8x8, int width, int height);
|
const uint8* dither4x4, int width, int height);
|
||||||
|
|
||||||
// Convert ARGB To ARGB1555.
|
// Convert ARGB To ARGB1555.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
@@ -140,6 +143,12 @@ int ARGBToI400(const uint8* src_argb, int src_stride_argb,
|
|||||||
uint8* dst_y, int dst_stride_y,
|
uint8* dst_y, int dst_stride_y,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB)
|
||||||
|
LIBYUV_API
|
||||||
|
int ARGBToG(const uint8* src_argb, int src_stride_argb,
|
||||||
|
uint8* dst_g, int dst_stride_g,
|
||||||
|
int width, int height);
|
||||||
|
|
||||||
// Convert ARGB To NV12.
|
// Convert ARGB To NV12.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int ARGBToNV12(const uint8* src_argb, int src_stride_argb,
|
int ARGBToNV12(const uint8* src_argb, int src_stride_argb,
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ int I400ToI400(const uint8* src_y, int src_stride_y,
|
|||||||
uint8* dst_y, int dst_stride_y,
|
uint8* dst_y, int dst_stride_y,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
#define J400ToJ400 I400ToI400
|
||||||
|
|
||||||
// Copy I422 to I422.
|
// Copy I422 to I422.
|
||||||
#define I422ToI422 I422Copy
|
#define I422ToI422 I422Copy
|
||||||
@@ -84,6 +85,18 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
|
|||||||
uint8* dst_v, int dst_stride_v,
|
uint8* dst_v, int dst_stride_v,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
|
LIBYUV_API
|
||||||
|
int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2,
|
||||||
|
uint8* dst_y, int dst_stride_y,
|
||||||
|
uint8* dst_uv, int dst_stride_uv,
|
||||||
|
int width, int height);
|
||||||
|
|
||||||
|
LIBYUV_API
|
||||||
|
int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy,
|
||||||
|
uint8* dst_y, int dst_stride_y,
|
||||||
|
uint8* dst_uv, int dst_stride_uv,
|
||||||
|
int width, int height);
|
||||||
|
|
||||||
// Convert I420 to I400. (calls CopyPlane ignoring u/v).
|
// Convert I420 to I400. (calls CopyPlane ignoring u/v).
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
int I420ToI400(const uint8* src_y, int src_stride_y,
|
int I420ToI400(const uint8* src_y, int src_stride_y,
|
||||||
@@ -93,6 +106,7 @@ int I420ToI400(const uint8* src_y, int src_stride_y,
|
|||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
// Alias
|
// Alias
|
||||||
|
#define J420ToJ400 I420ToI400
|
||||||
#define I420ToI420Mirror I420Mirror
|
#define I420ToI420Mirror I420Mirror
|
||||||
|
|
||||||
// I420 mirror.
|
// I420 mirror.
|
||||||
@@ -387,24 +401,24 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
|||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
int width, int height, int interpolation);
|
int width, int height, int interpolation);
|
||||||
|
|
||||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
#if defined(__pnacl__) || defined(__CLR_VER) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR)
|
(defined(__i386__) && !defined(__SSE2__))
|
||||||
#define LIBYUV_DISABLE_X86
|
#define LIBYUV_DISABLE_X86
|
||||||
#endif
|
#endif
|
||||||
|
// The following are available on all x86 platforms:
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
|
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
||||||
|
#define HAS_ARGBAFFINEROW_SSE2
|
||||||
|
#endif
|
||||||
|
|
||||||
// Row functions for copying a pixels from a source with a slope to a row
|
// Row function for copying pixels from a source with a slope to a row
|
||||||
// of destination. Useful for scaling, rotation, mirror, texture mapping.
|
// of destination. Useful for scaling, rotation, mirror, texture mapping.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
|
void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
|
||||||
uint8* dst_argb, const float* uv_dudv, int width);
|
uint8* dst_argb, const float* uv_dudv, int width);
|
||||||
// The following are available on all x86 platforms:
|
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
|
||||||
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
|
void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
|
||||||
uint8* dst_argb, const float* uv_dudv, int width);
|
uint8* dst_argb, const float* uv_dudv, int width);
|
||||||
#define HAS_ARGBAFFINEROW_SSE2
|
|
||||||
#endif // LIBYUV_DISABLE_X86
|
|
||||||
|
|
||||||
// Shuffle ARGB channel order. e.g. BGRA to ARGB.
|
// Shuffle ARGB channel order. e.g. BGRA to ARGB.
|
||||||
// shuffler is 16 bytes and must be aligned.
|
// shuffler is 16 bytes and must be aligned.
|
||||||
|
|||||||
138
third_party/libyuv/include/libyuv/rotate_row.h
vendored
Normal file
138
third_party/libyuv/include/libyuv/rotate_row.h
vendored
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013 The LibYuv Project Authors. All rights reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ // NOLINT
|
||||||
|
#define INCLUDE_LIBYUV_ROTATE_ROW_H_
|
||||||
|
|
||||||
|
#include "libyuv/basic_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace libyuv {
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__pnacl__) || defined(__CLR_VER) || \
|
||||||
|
(defined(__i386__) && !defined(__SSE2__))
|
||||||
|
#define LIBYUV_DISABLE_X86
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Visual C 2012 required for AVX2.
|
||||||
|
#if defined(_M_IX86) && !defined(__clang__) && \
|
||||||
|
defined(_MSC_VER) && _MSC_VER >= 1700
|
||||||
|
#define VISUALC_HAS_AVX2 1
|
||||||
|
#endif // VisualStudio >= 2012
|
||||||
|
|
||||||
|
// TODO(fbarchard): switch to standard form of inline; fails on clangcl.
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
|
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
||||||
|
#if defined(__APPLE__) && defined(__i386__)
|
||||||
|
#define DECLARE_FUNCTION(name) \
|
||||||
|
".text \n" \
|
||||||
|
".private_extern _" #name " \n" \
|
||||||
|
".align 4,0x90 \n" \
|
||||||
|
"_" #name ": \n"
|
||||||
|
#elif defined(__MINGW32__) || defined(__CYGWIN__) && defined(__i386__)
|
||||||
|
#define DECLARE_FUNCTION(name) \
|
||||||
|
".text \n" \
|
||||||
|
".align 4,0x90 \n" \
|
||||||
|
"_" #name ": \n"
|
||||||
|
#else
|
||||||
|
#define DECLARE_FUNCTION(name) \
|
||||||
|
".text \n" \
|
||||||
|
".align 4,0x90 \n" \
|
||||||
|
#name ": \n"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// The following are available for Visual C:
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
|
||||||
|
defined(_MSC_VER) && !defined(__clang__)
|
||||||
|
#define HAS_TRANSPOSEWX8_SSSE3
|
||||||
|
#define HAS_TRANSPOSEUVWX8_SSE2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// The following are available for GCC but not NaCL:
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
|
(defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__)))
|
||||||
|
#define HAS_TRANSPOSEWX8_SSSE3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// The following are available for 32 bit GCC:
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && defined(__i386__) && !defined(__clang__)
|
||||||
|
#define HAS_TRANSPOSEUVWX8_SSE2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// The following are available for 64 bit GCC but not NaCL:
|
||||||
|
#if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \
|
||||||
|
defined(__x86_64__)
|
||||||
|
#define HAS_TRANSPOSEWX8_FAST_SSSE3
|
||||||
|
#define HAS_TRANSPOSEUVWX8_SSE2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
|
||||||
|
(defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
|
||||||
|
#define HAS_TRANSPOSEWX8_NEON
|
||||||
|
#define HAS_TRANSPOSEUVWX8_NEON
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
|
||||||
|
defined(__mips__) && \
|
||||||
|
defined(__mips_dsp) && (__mips_dsp_rev >= 2)
|
||||||
|
#define HAS_TRANSPOSEWX8_MIPS_DSPR2
|
||||||
|
#define HAS_TRANSPOSEUVWx8_MIPS_DSPR2
|
||||||
|
#endif // defined(__mips__)
|
||||||
|
|
||||||
|
void TransposeWxH_C(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width, int height);
|
||||||
|
|
||||||
|
void TransposeWx8_C(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_NEON(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_SSSE3(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
|
||||||
|
void TransposeWx8_Any_NEON(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
void TransposeWx8_Any_MIPS_DSPR2(const uint8* src, int src_stride,
|
||||||
|
uint8* dst, int dst_stride, int width);
|
||||||
|
|
||||||
|
void TransposeUVWxH_C(const uint8* src, int src_stride,
|
||||||
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
uint8* dst_b, int dst_stride_b,
|
||||||
|
int width, int height);
|
||||||
|
|
||||||
|
void TransposeUVWx8_C(const uint8* src, int src_stride,
|
||||||
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
uint8* dst_b, int dst_stride_b, int width);
|
||||||
|
void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
|
||||||
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
uint8* dst_b, int dst_stride_b, int width);
|
||||||
|
void TransposeUVWx8_NEON(const uint8* src, int src_stride,
|
||||||
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
uint8* dst_b, int dst_stride_b, int width);
|
||||||
|
void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride,
|
||||||
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
uint8* dst_b, int dst_stride_b, int width);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
} // namespace libyuv
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ NOLINT
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user