Compare commits
973 Commits
sandbox/ji
...
v1.5.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cbecf57f3e | ||
![]() |
bc98bf65e8 | ||
![]() |
8f9c9ab5c9 | ||
![]() |
dc9d36c0a6 | ||
![]() |
cce3982c48 | ||
![]() |
26abc15e04 | ||
![]() |
f2845ed83c | ||
![]() |
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/example_xma
|
||||
/examples/postproc
|
||||
/examples/resize_util
|
||||
/examples/set_maps
|
||||
/examples/simple_decoder
|
||||
/examples/simple_encoder
|
||||
/examples/twopass_encoder
|
||||
/examples/vp8_multi_resolution_encoder
|
||||
/examples/vp8cx_set_ref
|
||||
/examples/vp9_lossless_encoder
|
||||
/examples/vp9_spatial_scalable_encoder
|
||||
/examples/vpx_temporal_scalable_patterns
|
||||
/examples/vpx_temporal_svc_encoder
|
||||
/ivfdec
|
||||
/ivfdec.dox
|
||||
/ivfenc
|
||||
@@ -45,12 +48,14 @@
|
||||
/libvpx.so*
|
||||
/libvpx.ver
|
||||
/samples.dox
|
||||
/test_intra_pred_speed
|
||||
/test_libvpx
|
||||
/vp8_api1_migration.dox
|
||||
/vp[89x]_rtcd.h
|
||||
/vpx.pc
|
||||
/vpx_config.c
|
||||
/vpx_config.h
|
||||
/vpx_dsp_rtcd.h
|
||||
/vpx_scale_rtcd.h
|
||||
/vpx_version.h
|
||||
/vpxdec
|
||||
|
12
.mailmap
12
.mailmap
@@ -1,14 +1,21 @@
|
||||
Adrian Grange <agrange@google.com>
|
||||
Alex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
||||
Adrian Grange <agrange@google.com> <agrange@agrange-macbookpro.roam.corp.google.com>
|
||||
Aℓex Converse <aconverse@google.com>
|
||||
Aℓex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
||||
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
||||
Deb Mukherjee <debargha@google.com>
|
||||
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
||||
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
||||
Hangyu Kuang <hkuang@google.com>
|
||||
Hangyu Kuang <hkuang@google.com> <hkuang@hkuang-macbookpro.roam.corp.google.com>
|
||||
Hui Su <huisu@google.com>
|
||||
Jacky Chen <jackychen@google.com>
|
||||
Jim Bankoski <jimbankoski@google.com>
|
||||
Johann Koenig <johannkoenig@google.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johannkoenig@dhcp-172-19-7-52.mtv.corp.google.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@gmail.com>
|
||||
John Koleszar <jkoleszar@google.com>
|
||||
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
||||
Marco Paniconi <marpan@google.com>
|
||||
@@ -17,10 +24,13 @@ Pascal Massimino <pascal.massimino@gmail.com>
|
||||
Paul Wilkins <paulwilkins@google.com>
|
||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
||||
Ronald S. Bultje <rsbultje@gmail.com> <rbultje@google.com>
|
||||
Sami Pietilä <samipietila@google.com>
|
||||
Tamar Levy <tamar.levy@intel.com>
|
||||
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
||||
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
||||
Timothy B. Terriberry <tterribe@xiph.org> Tim Terriberry <tterriberry@mozilla.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@YAOWU2-W.ad.corp.google.com>
|
||||
|
15
AUTHORS
15
AUTHORS
@@ -5,9 +5,9 @@ Aaron Watry <awatry@gmail.com>
|
||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
||||
Adam Xu <adam@xuyaowu.com>
|
||||
Adrian Grange <agrange@google.com>
|
||||
Aℓex Converse <aconverse@google.com>
|
||||
Ahmad Sharif <asharif@google.com>
|
||||
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
||||
Alex Converse <aconverse@google.com>
|
||||
Alexis Ballier <aballier@gentoo.org>
|
||||
Alok Ahuja <waveletcoeff@gmail.com>
|
||||
Alpha Lam <hclam@google.com>
|
||||
@@ -16,8 +16,10 @@ Ami Fischman <fischman@chromium.org>
|
||||
Andoni Morales Alastruey <ylatuya@gmail.com>
|
||||
Andres Mejia <mcitadel@gmail.com>
|
||||
Andrew Russell <anrussell@google.com>
|
||||
Angie Chiang <angiebird@google.com>
|
||||
Aron Rosenberg <arosenberg@logitech.com>
|
||||
Attila Nagy <attilanagy@google.com>
|
||||
Brion Vibber <bvibber@wikimedia.org>
|
||||
changjun.yang <changjun.yang@intel.com>
|
||||
Charles 'Buck' Krasic <ckrasic@google.com>
|
||||
chm <chm@rock-chips.com>
|
||||
@@ -27,6 +29,7 @@ Deb Mukherjee <debargha@google.com>
|
||||
Dim Temp <dimtemp0@gmail.com>
|
||||
Dmitry Kovalev <dkovalev@google.com>
|
||||
Dragan Mrdjan <dmrdjan@mips.com>
|
||||
Ed Baker <edward.baker@intel.com>
|
||||
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
||||
Fabio Pedretti <fabio.ped@libero.it>
|
||||
@@ -34,6 +37,8 @@ Frank Galligan <fgalligan@google.com>
|
||||
Fredrik Söderquist <fs@opera.com>
|
||||
Fritz Koenig <frkoenig@google.com>
|
||||
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
|
||||
Geza Lore <gezalore@gmail.com>
|
||||
Ghislain MARY <ghislainmary2@gmail.com>
|
||||
Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
|
||||
Guillaume Martres <gmartres@google.com>
|
||||
@@ -44,7 +49,7 @@ Henrik Lundin <hlundin@google.com>
|
||||
Hui Su <huisu@google.com>
|
||||
Ivan Maltz <ivanmaltz@google.com>
|
||||
Jacek Caban <cjacek@gmail.com>
|
||||
JackyChen <jackychen@google.com>
|
||||
Jacky Chen <jackychen@google.com>
|
||||
James Berry <jamesberry@google.com>
|
||||
James Yu <james.yu@linaro.org>
|
||||
James Zern <jzern@google.com>
|
||||
@@ -60,9 +65,11 @@ Jingning Han <jingning@google.com>
|
||||
Joey Parrish <joeyparrish@google.com>
|
||||
Johann Koenig <johannkoenig@google.com>
|
||||
John Koleszar <jkoleszar@google.com>
|
||||
Johnny Klonaris <google@jawknee.com>
|
||||
John Stark <jhnstrk@gmail.com>
|
||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
||||
Joshua Litt <joshualitt@google.com>
|
||||
Julia Robson <juliamrobson@gmail.com>
|
||||
Justin Clift <justin@salasaga.org>
|
||||
Justin Lebar <justin.lebar@gmail.com>
|
||||
KO Myung-Hun <komh@chollian.net>
|
||||
@@ -82,6 +89,7 @@ Mike Hommey <mhommey@mozilla.com>
|
||||
Mikhal Shemer <mikhal@google.com>
|
||||
Minghai Shang <minghai@google.com>
|
||||
Morton Jonuschat <yabawock@gmail.com>
|
||||
Nico Weber <thakis@chromium.org>
|
||||
Parag Salasakar <img.mips1@gmail.com>
|
||||
Pascal Massimino <pascal.massimino@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>
|
||||
Ralph Giles <giles@xiph.org>
|
||||
Rob Bradford <rob@linux.intel.com>
|
||||
Ronald S. Bultje <rbultje@google.com>
|
||||
Ronald S. Bultje <rsbultje@gmail.com>
|
||||
Rui Ueyama <ruiu@google.com>
|
||||
Sami Pietilä <samipietila@google.com>
|
||||
Scott Graham <scottmg@chromium.org>
|
||||
@@ -104,6 +112,7 @@ Scott LaVarnway <slavarnway@google.com>
|
||||
Sean McGovern <gseanmcg@gmail.com>
|
||||
Sergey Ulanov <sergeyu@chromium.org>
|
||||
Shimon Doodkin <helpmepro1@gmail.com>
|
||||
Shunyao Li <shunyaoli@google.com>
|
||||
Stefan Holmer <holmer@google.com>
|
||||
Suman Sunkara <sunkaras@google.com>
|
||||
Taekhyun Kim <takim@nvidia.com>
|
||||
|
20
CHANGELOG
20
CHANGELOG
@@ -1,7 +1,19 @@
|
||||
xxxx-yy-zz v1.4.0 "Changes for next release"
|
||||
vpxenc is changed to use VP9 by default.
|
||||
Encoder controls added for 1 pass SVC.
|
||||
Decoder control to toggle on/off loopfilter.
|
||||
2015-11-09 v1.5.0 "Javan Whistling Duck"
|
||||
This release improves upon the VP9 encoder and speeds up the encoding and
|
||||
decoding processes.
|
||||
|
||||
- Upgrading:
|
||||
This release is ABI incompatible with 1.4.0. It drops deprecated VP8
|
||||
controls and adds a variety of VP9 controls for testing.
|
||||
|
||||
The vpxenc utility now prefers VP9 by default.
|
||||
|
||||
- Enhancements:
|
||||
Faster VP9 encoding and decoding
|
||||
Smaller library size by combining functions used by VP8 and VP9
|
||||
|
||||
- Bug Fixes:
|
||||
A variety of fuzzing issues
|
||||
|
||||
2015-04-03 v1.4.0 "Indian Runner Duck"
|
||||
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-win32-vs11
|
||||
armv7-win32-vs12
|
||||
armv7-win32-vs14
|
||||
armv7s-darwin-gcc
|
||||
mips32-linux-gcc
|
||||
mips64-linux-gcc
|
||||
@@ -85,6 +86,8 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
x86-win32-vs10
|
||||
x86-win32-vs11
|
||||
x86-win32-vs12
|
||||
x86-win32-vs14
|
||||
x86_64-android-gcc
|
||||
x86_64-darwin9-gcc
|
||||
x86_64-darwin10-gcc
|
||||
x86_64-darwin11-gcc
|
||||
@@ -101,6 +104,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
x86_64-win64-vs10
|
||||
x86_64-win64-vs11
|
||||
x86_64-win64-vs12
|
||||
x86_64-win64-vs14
|
||||
generic-gnu
|
||||
|
||||
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
|
||||
else ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
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)
|
||||
include $(CONFIG_DIR)libs-mips-android-gcc.mk
|
||||
else
|
||||
@@ -164,17 +166,22 @@ endif
|
||||
|
||||
# Add a dependency to force generation of the RTCD files.
|
||||
define rtcd_dep_template
|
||||
rtcd_dep_template_SRCS := $(addprefix $(LOCAL_PATH)/, $(LOCAL_SRC_FILES))
|
||||
rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=)
|
||||
ifeq ($(CONFIG_VP8), yes)
|
||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp8_rtcd.h
|
||||
$$(rtcd_dep_template_SRCS): vp8_rtcd.h
|
||||
endif
|
||||
ifeq ($(CONFIG_VP9), yes)
|
||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vp9_rtcd.h
|
||||
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
|
||||
endif
|
||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_scale_rtcd.h
|
||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_dsp_rtcd.h
|
||||
ifeq ($(CONFIG_VP10), yes)
|
||||
$$(rtcd_dep_template_SRCS): vp10_rtcd.h
|
||||
endif
|
||||
$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h
|
||||
$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
$(foreach file, $(LOCAL_SRC_FILES), $(LOCAL_PATH)/$(file)): vpx_config.asm
|
||||
ifneq ($(findstring $(TARGET_ARCH_ABI),x86 x86_64),)
|
||||
$$(rtcd_dep_template_SRCS): vpx_config.asm
|
||||
endif
|
||||
endef
|
||||
|
||||
|
@@ -140,6 +140,8 @@ $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN)
|
||||
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
|
||||
$(BUILD_PFX)%_avx2.c.d: 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
|
||||
$(if $(quiet),@echo " [DEP] $@")
|
||||
@@ -285,7 +287,7 @@ define archive_template
|
||||
# for creating them.
|
||||
$(1):
|
||||
$(if $(quiet),@echo " [AR] $$@")
|
||||
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$?
|
||||
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
|
||||
endef
|
||||
|
||||
define so_template
|
||||
|
@@ -73,6 +73,7 @@ Build options:
|
||||
--target=TARGET target platform tuple [generic-gnu]
|
||||
--cpu=CPU optimize for a specific cpu rather than a family
|
||||
--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_werror} treat warnings as errors, if possible
|
||||
(not available with all compilers)
|
||||
@@ -200,6 +201,10 @@ disabled(){
|
||||
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() {
|
||||
for var in $*; do
|
||||
if ! disabled $var; then
|
||||
@@ -209,6 +214,10 @@ soft_enable() {
|
||||
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() {
|
||||
for var in $*; do
|
||||
if ! enabled $var; then
|
||||
@@ -337,6 +346,10 @@ check_add_cflags() {
|
||||
check_cflags "$@" && add_cflags_only "$@"
|
||||
}
|
||||
|
||||
check_add_cxxflags() {
|
||||
check_cxxflags "$@" && add_cxxflags_only "$@"
|
||||
}
|
||||
|
||||
check_add_asflags() {
|
||||
log add_asflags "$@"
|
||||
add_asflags "$@"
|
||||
@@ -428,7 +441,7 @@ NM=${NM}
|
||||
|
||||
CFLAGS = ${CFLAGS}
|
||||
CXXFLAGS = ${CXXFLAGS}
|
||||
ARFLAGS = -rus\$(if \$(quiet),c,v)
|
||||
ARFLAGS = -crs\$(if \$(quiet),,v)
|
||||
LDFLAGS = ${LDFLAGS}
|
||||
ASFLAGS = ${ASFLAGS}
|
||||
extralibs = ${extralibs}
|
||||
@@ -503,6 +516,9 @@ process_common_cmdline() {
|
||||
--extra-cflags=*)
|
||||
extra_cflags="${optval}"
|
||||
;;
|
||||
--extra-cxxflags=*)
|
||||
extra_cxxflags="${optval}"
|
||||
;;
|
||||
--enable-?*|--disable-?*)
|
||||
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
||||
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
|
||||
}
|
||||
|
||||
# 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() {
|
||||
if [ -z "$toolchain" ]; then
|
||||
gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
|
||||
@@ -729,13 +750,14 @@ process_common_toolchain() {
|
||||
# platforms, so use the newest one available.
|
||||
case ${toolchain} in
|
||||
arm*-darwin*)
|
||||
ios_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${ios_sdk_dir}" ]; then
|
||||
add_cflags "-isysroot ${ios_sdk_dir}"
|
||||
add_ldflags "-isysroot ${ios_sdk_dir}"
|
||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||
add_cflags "-isysroot ${iphoneos_sdk_dir}"
|
||||
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||
fi
|
||||
;;
|
||||
*-darwin*)
|
||||
x86*-darwin*)
|
||||
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
||||
if [ -d "${osx_sdk_dir}" ]; then
|
||||
add_cflags "-isysroot ${osx_sdk_dir}"
|
||||
@@ -811,16 +833,35 @@ process_common_toolchain() {
|
||||
die "Disabling neon while keeping neon-asm is not supported"
|
||||
fi
|
||||
case ${toolchain} in
|
||||
# Apple iOS SDKs no longer support armv6 as of the version 9
|
||||
# release (coincides with release of Xcode 7). Only enable media
|
||||
# when using earlier SDK releases.
|
||||
*-darwin*)
|
||||
# Neon is guaranteed on iOS 6+ devices, while old media extensions
|
||||
# no longer assemble with iOS 9 SDK
|
||||
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||
soft_enable media
|
||||
else
|
||||
soft_disable media
|
||||
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media "
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
soft_enable media
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
armv6)
|
||||
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
|
||||
|
||||
@@ -1003,6 +1044,12 @@ EOF
|
||||
done
|
||||
|
||||
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*)
|
||||
@@ -1081,7 +1128,9 @@ EOF
|
||||
CROSS=${CROSS:-g}
|
||||
;;
|
||||
os2)
|
||||
disable_feature pic
|
||||
AS=${AS:-nasm}
|
||||
add_ldflags -Zhigh-mem
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1171,7 +1220,8 @@ EOF
|
||||
&& AS=""
|
||||
fi
|
||||
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
||||
&& die "Neither yasm nor nasm have been found"
|
||||
&& die "Neither yasm nor nasm have been found." \
|
||||
"See the prerequisites section in the README for more info."
|
||||
;;
|
||||
esac
|
||||
log_echo " using $AS"
|
||||
@@ -1210,6 +1260,13 @@ EOF
|
||||
enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
|
||||
add_cflags ${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)
|
||||
add_asflags -f aout
|
||||
@@ -1323,12 +1380,6 @@ EOF
|
||||
add_cflags -D_LARGEFILE_SOURCE
|
||||
add_cflags -D_FILE_OFFSET_BITS=64
|
||||
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() {
|
||||
|
@@ -73,6 +73,10 @@ generate_filter() {
|
||||
open_tag File RelativePath="$f"
|
||||
|
||||
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 cfg in Debug Release; do
|
||||
open_tag FileConfiguration \
|
||||
|
@@ -19,13 +19,13 @@ show_help() {
|
||||
cat <<EOF
|
||||
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.
|
||||
|
||||
Options:
|
||||
--help Print this message
|
||||
--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
|
||||
EOF
|
||||
exit 1
|
||||
@@ -255,7 +255,7 @@ for opt in "$@"; do
|
||||
;;
|
||||
--ver=*) vs_ver="$optval"
|
||||
case $optval in
|
||||
[789]|10|11|12)
|
||||
[789]|10|11|12|14)
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@@ -300,12 +300,15 @@ case "${vs_ver:-8}" in
|
||||
12) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2013"
|
||||
;;
|
||||
14) sln_vers="14.00"
|
||||
sln_vers_str="Visual Studio 2015"
|
||||
;;
|
||||
esac
|
||||
case "${vs_ver:-8}" in
|
||||
[789])
|
||||
sfx=vcproj
|
||||
;;
|
||||
10|11|12)
|
||||
10|11|12|14)
|
||||
sfx=vcxproj
|
||||
;;
|
||||
esac
|
||||
|
@@ -34,7 +34,7 @@ Options:
|
||||
--name=project_name Name of the project (required)
|
||||
--proj-guid=GUID GUID to use for the project
|
||||
--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
|
||||
-Ipath/to/include Additional include directories
|
||||
-DFLAG[=value] Preprocessor macros to define
|
||||
@@ -168,7 +168,7 @@ for opt in "$@"; do
|
||||
--ver=*)
|
||||
vs_ver="$optval"
|
||||
case "$optval" in
|
||||
10|11|12)
|
||||
10|11|12|14)
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@@ -218,7 +218,7 @@ guid=${guid:-`generate_uuid`}
|
||||
asm_use_custom_step=false
|
||||
uses_asm=${uses_asm:-false}
|
||||
case "${vs_ver:-11}" in
|
||||
10|11|12)
|
||||
10|11|12|14)
|
||||
asm_use_custom_step=$uses_asm
|
||||
;;
|
||||
esac
|
||||
@@ -344,6 +344,9 @@ generate_vcxproj() {
|
||||
# has to enable AppContainerApplication as well.
|
||||
tag_content PlatformToolset v120
|
||||
fi
|
||||
if [ "$vs_ver" = "14" ]; then
|
||||
tag_content PlatformToolset v140
|
||||
fi
|
||||
tag_content CharacterSet Unicode
|
||||
if [ "$config" = "Release" ]; then
|
||||
tag_content WholeProgramOptimization true
|
||||
|
@@ -25,7 +25,6 @@ CONFIGURE_ARGS="--disable-docs
|
||||
DIST_DIR="_dist"
|
||||
FRAMEWORK_DIR="VPX.framework"
|
||||
HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx"
|
||||
MAKE_JOBS=1
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
LIBVPX_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd)
|
||||
LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo)
|
||||
@@ -41,15 +40,24 @@ TARGETS="arm64-darwin-gcc
|
||||
build_target() {
|
||||
local target="$1"
|
||||
local old_pwd="$(pwd)"
|
||||
local target_specific_flags=""
|
||||
|
||||
vlog "***Building target: ${target}***"
|
||||
|
||||
case "${target}" in
|
||||
x86-*)
|
||||
target_specific_flags="--enable-pic"
|
||||
vlog "Enabled PIC for ${target}"
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir "${target}"
|
||||
cd "${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
|
||||
eval make -j ${MAKE_JOBS} dist ${devnull}
|
||||
eval make dist ${devnull}
|
||||
cd "${old_pwd}"
|
||||
|
||||
vlog "***Done building target: ${target}***"
|
||||
@@ -194,11 +202,12 @@ cat << EOF
|
||||
Usage: ${0##*/} [arguments]
|
||||
--help: Display this message and exit.
|
||||
--extra-configure-args <args>: Extra args to pass when configuring libvpx.
|
||||
--jobs: Number of make jobs.
|
||||
--preserve-build-output: Do not delete the build directory.
|
||||
--show-build-output: Show output from each library build.
|
||||
--targets <targets>: Override default target list. Defaults:
|
||||
${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
|
||||
build.
|
||||
EOF
|
||||
@@ -227,16 +236,15 @@ while [ -n "$1" ]; do
|
||||
iosbuild_usage
|
||||
exit
|
||||
;;
|
||||
--jobs)
|
||||
MAKE_JOBS="$2"
|
||||
shift
|
||||
;;
|
||||
--preserve-build-output)
|
||||
PRESERVE_BUILD_OUTPUT=yes
|
||||
;;
|
||||
--show-build-output)
|
||||
devnull=
|
||||
;;
|
||||
--test-link)
|
||||
EXTRA_CONFIGURE_ARGS="${EXTRA_CONFIGURE_ARGS} --enable-examples"
|
||||
;;
|
||||
--targets)
|
||||
TARGETS="$2"
|
||||
shift
|
||||
@@ -260,11 +268,11 @@ cat << EOF
|
||||
EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS}
|
||||
FRAMEWORK_DIR=${FRAMEWORK_DIR}
|
||||
HEADER_DIR=${HEADER_DIR}
|
||||
MAKE_JOBS=${MAKE_JOBS}
|
||||
PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT}
|
||||
LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR}
|
||||
LIPO=${LIPO}
|
||||
MAKEFLAGS=${MAKEFLAGS}
|
||||
ORIG_PWD=${ORIG_PWD}
|
||||
PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT}
|
||||
TARGETS="${TARGETS}"
|
||||
EOF
|
||||
fi
|
||||
|
@@ -319,13 +319,14 @@ EOF
|
||||
|
||||
print <<EOF;
|
||||
#if HAVE_DSPR2
|
||||
void vpx_dsputil_static_init();
|
||||
#if CONFIG_VP8
|
||||
void dsputil_static_init();
|
||||
dsputil_static_init();
|
||||
#endif
|
||||
#if CONFIG_VP9
|
||||
void vp9_dsputil_static_init();
|
||||
vp9_dsputil_static_init();
|
||||
|
||||
vpx_dsputil_static_init();
|
||||
#if CONFIG_VP8
|
||||
dsputil_static_init();
|
||||
#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
|
27
configure
vendored
27
configure
vendored
@@ -37,6 +37,7 @@ Advanced options:
|
||||
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
|
||||
${toggle_vp8} VP8 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_postproc} postprocessing
|
||||
${toggle_vp9_postproc} vp9 specific postprocessing
|
||||
@@ -106,6 +107,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-win32-vs11"
|
||||
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} mips32-linux-gcc"
|
||||
all_platforms="${all_platforms} mips64-linux-gcc"
|
||||
@@ -132,6 +134,8 @@ all_platforms="${all_platforms} x86-win32-vs9"
|
||||
all_platforms="${all_platforms} x86-win32-vs10"
|
||||
all_platforms="${all_platforms} x86-win32-vs11"
|
||||
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-darwin10-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin11-gcc"
|
||||
@@ -148,6 +152,7 @@ all_platforms="${all_platforms} x86_64-win64-vs9"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs10"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs11"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs12"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs14"
|
||||
all_platforms="${all_platforms} generic-gnu"
|
||||
|
||||
# all_targets is a list of all targets that can be configured
|
||||
@@ -187,6 +192,10 @@ fi
|
||||
# disable codecs when their source directory does not exist
|
||||
[ -d "${source_path}/vp8" ] || disable_feature vp8
|
||||
[ -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
|
||||
# to be enabled when doing dist builds, since that's no longer a common
|
||||
@@ -208,10 +217,13 @@ CODECS="
|
||||
vp8_decoder
|
||||
vp9_encoder
|
||||
vp9_decoder
|
||||
vp10_encoder
|
||||
vp10_decoder
|
||||
"
|
||||
CODEC_FAMILIES="
|
||||
vp8
|
||||
vp9
|
||||
vp10
|
||||
"
|
||||
|
||||
ARCH_LIST="
|
||||
@@ -251,9 +263,8 @@ HAVE_LIST="
|
||||
EXPERIMENT_LIST="
|
||||
spatial_svc
|
||||
fp_mb_stats
|
||||
full_buffer_test
|
||||
internal_resize
|
||||
emulate_hardware
|
||||
misc_fixes
|
||||
"
|
||||
CONFIG_LIST="
|
||||
dependency_tracking
|
||||
@@ -640,7 +651,7 @@ process_toolchain() {
|
||||
VCPROJ_SFX=vcproj
|
||||
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
|
||||
;;
|
||||
10|11|12)
|
||||
10|11|12|14)
|
||||
VCPROJ_SFX=vcxproj
|
||||
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
|
||||
enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
|
||||
@@ -706,6 +717,16 @@ EOF
|
||||
esac
|
||||
# libwebm needs to be linked with C++ standard library
|
||||
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/row_any.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_neon.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/scale.cc \
|
||||
third_party/libyuv/source/scale_any.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_neon.cc \
|
||||
third_party/libyuv/source/scale_neon64.cc \
|
||||
third_party/libyuv/source/scale_posix.cc \
|
||||
third_party/libyuv/source/scale_win.cc \
|
||||
|
||||
LIBWEBM_COMMON_SRCS += third_party/libwebm/webmids.hpp
|
||||
|
||||
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
|
||||
third_party/libwebm/mkvmuxerutil.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/mkvmuxerutil.hpp \
|
||||
third_party/libwebm/mkvparser.hpp \
|
||||
third_party/libwebm/mkvwriter.hpp \
|
||||
third_party/libwebm/webmids.hpp
|
||||
third_party/libwebm/mkvwriter.hpp
|
||||
|
||||
LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \
|
||||
third_party/libwebm/mkvreader.cpp \
|
||||
@@ -67,6 +69,7 @@ ifeq ($(CONFIG_LIBYUV),yes)
|
||||
vpxdec.SRCS += $(LIBYUV_SRCS)
|
||||
endif
|
||||
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||
vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS)
|
||||
vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
|
||||
vpxdec.SRCS += webmdec.cc webmdec.h
|
||||
endif
|
||||
@@ -88,6 +91,7 @@ ifeq ($(CONFIG_LIBYUV),yes)
|
||||
vpxenc.SRCS += $(LIBYUV_SRCS)
|
||||
endif
|
||||
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||
vpxenc.SRCS += $(LIBWEBM_COMMON_SRCS)
|
||||
vpxenc.SRCS += $(LIBWEBM_MUXER_SRCS)
|
||||
vpxenc.SRCS += webmenc.cc webmenc.h
|
||||
endif
|
||||
@@ -324,8 +328,8 @@ endif
|
||||
# the makefiles). We may want to revisit this.
|
||||
define vcproj_template
|
||||
$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
|
||||
@echo " [vcproj] $$@"
|
||||
$$(GEN_VCPROJ)\
|
||||
$(if $(quiet),@echo " [vcproj] $$@")
|
||||
$(qexec)$$(GEN_VCPROJ)\
|
||||
--exe\
|
||||
--target=$$(TOOLCHAIN)\
|
||||
--name=$$(@:.$(VCPROJ_SFX)=)\
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "../tools_common.h"
|
||||
#include "../video_writer.h"
|
||||
|
||||
#include "../vpx_ports/vpx_timer.h"
|
||||
#include "vpx/svc_context.h"
|
||||
#include "vpx/vp8cx.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");
|
||||
static const arg_def_t speed_arg =
|
||||
ARG_DEF("sp", "speed", 1, "speed configuration");
|
||||
static const arg_def_t aqmode_arg =
|
||||
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on");
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
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,
|
||||
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_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
|
||||
&output_rc_stats_arg,
|
||||
#endif
|
||||
@@ -220,6 +223,8 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
#endif
|
||||
} else if (arg_match(&arg, &speed_arg, argi)) {
|
||||
svc_ctx->speed = arg_parse_uint(&arg);
|
||||
} else if (arg_match(&arg, &aqmode_arg, argi)) {
|
||||
svc_ctx->aqmode = arg_parse_uint(&arg);
|
||||
} else if (arg_match(&arg, &threads_arg, argi)) {
|
||||
svc_ctx->threads = arg_parse_uint(&arg);
|
||||
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
||||
@@ -539,6 +544,59 @@ vpx_codec_err_t parse_superframe_index(const uint8_t *data,
|
||||
}
|
||||
#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) {
|
||||
AppInput app_input = {0};
|
||||
VpxVideoWriter *writer = NULL;
|
||||
@@ -559,11 +617,14 @@ int main(int argc, const char **argv) {
|
||||
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
||||
struct RateControlStats rc;
|
||||
vpx_svc_layer_id_t layer_id;
|
||||
vpx_svc_ref_frame_config_t ref_frame_config;
|
||||
int sl, tl;
|
||||
double sum_bitrate = 0.0;
|
||||
double sum_bitrate2 = 0.0;
|
||||
double framerate = 30.0;
|
||||
#endif
|
||||
struct vpx_usec_timer timer;
|
||||
int64_t cx_time = 0;
|
||||
memset(&svc_ctx, 0, sizeof(svc_ctx));
|
||||
svc_ctx.log_print = 1;
|
||||
exec_name = argv[0];
|
||||
@@ -632,6 +693,9 @@ int main(int argc, const char **argv) {
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
||||
if (svc_ctx.threads)
|
||||
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
||||
if (svc_ctx.speed >= 5 && svc_ctx.aqmode == 1)
|
||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||
|
||||
|
||||
// Encode frames
|
||||
while (!end_of_stream) {
|
||||
@@ -643,9 +707,36 @@ int main(int argc, const char **argv) {
|
||||
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) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
vpx_usec_timer_start(&timer);
|
||||
res = vpx_svc_encode(&svc_ctx, &codec, (end_of_stream ? NULL : &raw),
|
||||
pts, frame_duration, svc_ctx.speed >= 5 ?
|
||||
VPX_DL_REALTIME : VPX_DL_GOOD_QUALITY);
|
||||
vpx_usec_timer_mark(&timer);
|
||||
cx_time += vpx_usec_timer_elapsed(&timer);
|
||||
|
||||
printf("%s", vpx_svc_get_message(&svc_ctx));
|
||||
if (res != VPX_CODEC_OK) {
|
||||
@@ -784,6 +875,10 @@ int main(int argc, const char **argv) {
|
||||
}
|
||||
}
|
||||
#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);
|
||||
// display average size, psnr
|
||||
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) {
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
||||
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) {
|
||||
vpx_svc_extra_cfg_t svc_params;
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
||||
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_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));
|
||||
if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1: 0))
|
||||
die_codec(&codec, "Failed to set SVC");
|
||||
|
43
libs.mk
43
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
|
||||
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/
|
||||
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
|
||||
endif
|
||||
@@ -73,7 +76,7 @@ ifeq ($(CONFIG_VP8_DECODER),yes)
|
||||
CODEC_DOC_SECTIONS += vp8 vp8_decoder
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
|
||||
ifeq ($(CONFIG_VP9),yes)
|
||||
VP9_PREFIX=vp9/
|
||||
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
|
||||
endif
|
||||
@@ -106,6 +109,40 @@ endif
|
||||
VP9_PREFIX=vp9/
|
||||
$(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)
|
||||
CODEC_DOC_SECTIONS += encoder
|
||||
endif
|
||||
@@ -223,7 +260,7 @@ OBJS-yes += $(LIBVPX_OBJS)
|
||||
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
||||
|
||||
SO_VERSION_MAJOR := 2
|
||||
SO_VERSION_MAJOR := 3
|
||||
SO_VERSION_MINOR := 0
|
||||
SO_VERSION_PATCH := 0
|
||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
||||
|
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,10 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#if CONFIG_VP9_ENCODER
|
||||
@@ -22,7 +23,6 @@
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
|
@@ -80,4 +80,7 @@ TEST_P(BordersTest, TestLowBitrate) {
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||
::libvpx_test::kTwoPassGood));
|
||||
|
||||
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||
::libvpx_test::kTwoPassGood));
|
||||
} // namespace
|
||||
|
@@ -13,10 +13,10 @@
|
||||
#include "./vpx_config.h"
|
||||
#include "vpx/vpx_decoder.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"
|
||||
#endif
|
||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
|
||||
#include "vpx/vp8dx.h"
|
||||
#endif
|
||||
|
||||
@@ -233,6 +233,8 @@ class VP9CodecFactory : public CodecFactory {
|
||||
int usage) const {
|
||||
#if CONFIG_VP9_ENCODER
|
||||
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
|
||||
return VPX_CODEC_INCAPABLE;
|
||||
#endif
|
||||
@@ -251,7 +253,96 @@ const libvpx_test::VP9CodecFactory kVP9;
|
||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
||||
#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
|
||||
|
||||
#endif // TEST_CODEC_FACTORY_H_
|
||||
|
@@ -8,10 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#if CONFIG_VP9_ENCODER
|
||||
@@ -22,12 +23,11 @@
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vp9/encoder/vp9_ssim.h"
|
||||
#include "vpx_dsp/ssim.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
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,
|
||||
int width, int height,
|
||||
Ssimv *sv2, Metrics *m,
|
||||
@@ -65,7 +65,7 @@ class ConsistencyTestBase : public ::testing::Test {
|
||||
vpx_free(reference_data_[1]);
|
||||
reference_data_[1] = NULL;
|
||||
|
||||
delete ssim_array_;
|
||||
delete[] ssim_array_;
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
@@ -144,7 +144,7 @@ class ConsistencyVP9Test
|
||||
double CheckConsistency(int frame) {
|
||||
EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
|
||||
return
|
||||
vp9_get_ssim_metrics(source_data_[frame], source_stride_,
|
||||
vpx_get_ssim_metrics(source_data_[frame], source_stride_,
|
||||
reference_data_[frame], reference_stride_,
|
||||
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,
|
||||
::libvpx_test::kRealTime),
|
||||
::testing::Range(0, 9));
|
||||
|
||||
VP10_INSTANTIATE_TEST_CASE(
|
||||
CpuSpeedTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||
::testing::Range(0, 3));
|
||||
} // namespace
|
||||
|
@@ -761,6 +761,8 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
||||
first_drop_ = 0;
|
||||
bits_total_ = 0;
|
||||
duration_ = 0.0;
|
||||
mismatch_psnr_ = 0.0;
|
||||
mismatch_nframes_ = 0;
|
||||
}
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
}
|
||||
@@ -781,6 +783,7 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
||||
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
|
||||
encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 300);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1));
|
||||
}
|
||||
const vpx_rational_t tb = video->timebase();
|
||||
timebase_ = static_cast<double>(tb.num) / tb.den;
|
||||
@@ -816,6 +819,18 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
||||
file_datarate_ = file_size_in_kb / duration_;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t *img1,
|
||||
const vpx_image_t *img2) {
|
||||
double mismatch_psnr = compute_psnr(img1, img2);
|
||||
mismatch_psnr_ += mismatch_psnr;
|
||||
++mismatch_nframes_;
|
||||
}
|
||||
|
||||
unsigned int GetMismatchFrames() {
|
||||
return mismatch_nframes_;
|
||||
}
|
||||
|
||||
vpx_codec_pts_t last_pts_;
|
||||
int64_t bits_in_buffer_model_;
|
||||
double timebase_;
|
||||
@@ -828,6 +843,8 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
||||
size_t bits_in_last_frame_;
|
||||
vpx_svc_extra_cfg_t svc_params_;
|
||||
int speed_setting_;
|
||||
double mismatch_psnr_;
|
||||
int mismatch_nframes_;
|
||||
};
|
||||
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
||||
const vpx_svc_extra_cfg_t *svc_params,
|
||||
@@ -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
|
||||
// 3 temporal layers.
|
||||
// 3 temporal layers. Run CIF clip with 1 thread.
|
||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
@@ -882,6 +899,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
||||
cfg_.ts_rate_decimator[1] = 2;
|
||||
cfg_.ts_rate_decimator[2] = 1;
|
||||
cfg_.g_error_resilient = 1;
|
||||
cfg_.g_threads = 1;
|
||||
cfg_.temporal_layering_mode = 3;
|
||||
svc_params_.scaling_factor_num[0] = 144;
|
||||
svc_params_.scaling_factor_den[0] = 288;
|
||||
@@ -905,9 +923,50 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
||||
<< " The datarate for the file exceeds the target by too much!";
|
||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||
<< " The datarate for the file is lower than the target by too much!";
|
||||
EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||
// 3 temporal layers. Run HD clip with 4 threads.
|
||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 63;
|
||||
cfg_.rc_end_usage = VPX_CBR;
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
cfg_.ss_number_layers = 2;
|
||||
cfg_.ts_number_layers = 3;
|
||||
cfg_.ts_rate_decimator[0] = 4;
|
||||
cfg_.ts_rate_decimator[1] = 2;
|
||||
cfg_.ts_rate_decimator[2] = 1;
|
||||
cfg_.g_error_resilient = 1;
|
||||
cfg_.g_threads = 4;
|
||||
cfg_.temporal_layering_mode = 3;
|
||||
svc_params_.scaling_factor_num[0] = 144;
|
||||
svc_params_.scaling_factor_den[0] = 288;
|
||||
svc_params_.scaling_factor_num[1] = 288;
|
||||
svc_params_.scaling_factor_den[1] = 288;
|
||||
// TODO(wonkap/marpan): No frame drop for now, we need to implement correct
|
||||
// frame dropping for SVC.
|
||||
cfg_.rc_dropframe_thresh = 0;
|
||||
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
||||
30, 1, 0, 300);
|
||||
cfg_.rc_target_bitrate = 800;
|
||||
ResetModel();
|
||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode,
|
||||
cfg_.rc_target_bitrate);
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.85)
|
||||
<< " The datarate for the file exceeds the target by too much!";
|
||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||
<< " The datarate for the file is lower than the target by too much!";
|
||||
EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
||||
::testing::Values(::libvpx_test::kOnePassGood,
|
||||
|
@@ -13,12 +13,13 @@
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vp9/common/vp9_scan.h"
|
||||
#include "vpx/vpx_codec.h"
|
||||
@@ -39,30 +40,6 @@ static int round(double x) {
|
||||
#endif
|
||||
|
||||
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 C2 = 0.98078528040323;
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
@@ -291,11 +268,11 @@ void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
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) {
|
||||
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,
|
||||
@@ -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) {
|
||||
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) {
|
||||
vp9_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
||||
vpx_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
||||
}
|
||||
|
||||
#if HAVE_SSE2
|
||||
void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
vp9_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
|
||||
vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
|
||||
}
|
||||
#endif // HAVE_SSE2
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -821,14 +798,14 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vp9_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_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans16x16DCT,
|
||||
::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
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -861,16 +838,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_neon, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct16x16_sse2,
|
||||
&vp9_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct16x16_sse2,
|
||||
&vpx_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans16x16HT,
|
||||
::testing::Values(
|
||||
@@ -888,27 +865,19 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fdct16x16_sse2,
|
||||
make_tuple(&vpx_highbd_fdct16x16_sse2,
|
||||
&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),
|
||||
make_tuple(&vp9_highbd_fdct16x16_sse2,
|
||||
make_tuple(&vpx_highbd_fdct16x16_sse2,
|
||||
&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),
|
||||
make_tuple(&vp9_fdct16x16_sse2,
|
||||
&vp9_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct16x16_sse2,
|
||||
&vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans16x16HT,
|
||||
::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, 1, 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(
|
||||
MSA, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct16x16_msa,
|
||||
&vp9_idct16x16_256_add_msa, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct16x16_msa,
|
||||
&vpx_idct16x16_256_add_msa, 0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, Trans16x16HT,
|
||||
::testing::Values(
|
||||
|
@@ -13,13 +13,14 @@
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vpx/vpx_codec.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
|
||||
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) {
|
||||
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) {
|
||||
vp9_highbd_idct32x32_1024_add_c(in, out, stride, 12);
|
||||
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12);
|
||||
}
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
@@ -194,7 +195,7 @@ TEST_P(Trans32x32Test, CoeffCheck) {
|
||||
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
|
||||
|
||||
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));
|
||||
|
||||
if (version_ == 0) {
|
||||
@@ -231,7 +232,7 @@ TEST_P(Trans32x32Test, MemCheck) {
|
||||
}
|
||||
|
||||
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(
|
||||
fwd_txfm_(input_extreme_block, output_block, stride));
|
||||
|
||||
@@ -314,61 +315,61 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fdct32x32_c,
|
||||
make_tuple(&vpx_highbd_fdct32x32_c,
|
||||
&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),
|
||||
make_tuple(&vp9_highbd_fdct32x32_c,
|
||||
make_tuple(&vpx_highbd_fdct32x32_c,
|
||||
&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),
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_c,
|
||||
&vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_c,
|
||||
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_c,
|
||||
&vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_c,
|
||||
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_c,
|
||||
&vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_c,
|
||||
&vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_sse2,
|
||||
&vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_sse2,
|
||||
&vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_sse2,
|
||||
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_sse2,
|
||||
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
|
||||
make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
|
||||
VPX_BITS_10),
|
||||
make_tuple(&vp9_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
|
||||
make_tuple(&vp9_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
|
||||
make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
|
||||
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),
|
||||
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)));
|
||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
@@ -376,19 +377,19 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_avx2,
|
||||
&vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_avx2,
|
||||
&vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_avx2,
|
||||
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_avx2,
|
||||
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_msa,
|
||||
&vp9_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_fdct32x32_rd_msa,
|
||||
&vp9_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct32x32_msa,
|
||||
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_msa,
|
||||
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
} // namespace
|
||||
|
@@ -7,10 +7,11 @@
|
||||
* 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/ivf_video_source.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "test/ivf_video_source.h"
|
||||
#include "vpx/vp8dx.h"
|
||||
#include "vpx/vpx_decoder.h"
|
||||
|
||||
@@ -25,6 +26,9 @@ TEST(DecodeAPI, InvalidParams) {
|
||||
#endif
|
||||
#if CONFIG_VP9_DECODER
|
||||
&vpx_codec_vp9_dx_algo,
|
||||
#endif
|
||||
#if CONFIG_VP10_DECODER
|
||||
&vpx_codec_vp10_dx_algo,
|
||||
#endif
|
||||
};
|
||||
uint8_t buf[1] = {0};
|
||||
@@ -129,8 +133,13 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
|
||||
vpx_codec_ctx_t dec;
|
||||
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());
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
|
||||
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;
|
||||
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||
|
||||
|
@@ -7,9 +7,11 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/video_source.h"
|
||||
|
||||
|
@@ -10,13 +10,14 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/decode_test_driver.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/video_source.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
namespace libvpx_test {
|
||||
void Encoder::InitEncoder(VideoSource *video) {
|
||||
@@ -41,6 +42,15 @@ void Encoder::InitEncoder(VideoSource *video) {
|
||||
log2_tile_columns);
|
||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||
} 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
|
||||
{
|
||||
#if CONFIG_VP8_ENCODER
|
||||
@@ -185,6 +195,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
|
||||
|
||||
video->Begin();
|
||||
encoder->InitEncoder(video);
|
||||
ASSERT_FALSE(::testing::Test::HasFatalFailure());
|
||||
|
||||
unsigned long dec_init_flags = 0; // NOLINT
|
||||
// Use fragment decoder if encoder outputs partitions.
|
||||
|
@@ -13,12 +13,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "./vpx_config.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"
|
||||
#endif
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
namespace libvpx_test {
|
||||
|
||||
@@ -123,6 +124,11 @@ class Encoder {
|
||||
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) {
|
||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||
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);
|
||||
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) {
|
||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||
|
@@ -20,10 +20,11 @@ const int kMaxErrorFrames = 12;
|
||||
const int kMaxDroppableFrames = 12;
|
||||
|
||||
class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, bool> {
|
||||
protected:
|
||||
ErrorResilienceTestLarge()
|
||||
: EncoderTest(GET_PARAM(0)),
|
||||
svc_support_(GET_PARAM(2)),
|
||||
psnr_(0.0),
|
||||
nframes_(0),
|
||||
mismatch_psnr_(0.0),
|
||||
@@ -193,6 +194,8 @@ class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
||||
pattern_switch_ = frame_switch;
|
||||
}
|
||||
|
||||
bool svc_support_;
|
||||
|
||||
private:
|
||||
double psnr_;
|
||||
unsigned int nframes_;
|
||||
@@ -302,6 +305,10 @@ TEST_P(ErrorResilienceTestLarge, DropFramesWithoutRecovery) {
|
||||
// two layer temporal pattern. The base layer does not predict from the top
|
||||
// layer, so successful decoding is expected.
|
||||
TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) {
|
||||
// This test doesn't run if SVC is not supported.
|
||||
if (!svc_support_)
|
||||
return;
|
||||
|
||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
||||
cfg_.g_timebase = timebase;
|
||||
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
|
||||
// sequence, the LAST ref is not used anymore.
|
||||
TEST_P(ErrorResilienceTestLarge, 2LayersNoRefLast) {
|
||||
// This test doesn't run if SVC is not supported.
|
||||
if (!svc_support_)
|
||||
return;
|
||||
|
||||
const vpx_rational timebase = { 33333333, 1000000000 };
|
||||
cfg_.g_timebase = timebase;
|
||||
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,
|
||||
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
|
||||
|
@@ -13,12 +13,13 @@
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vpx/vpx_codec.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,
|
||||
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) {
|
||||
@@ -54,11 +55,11 @@ void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
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) {
|
||||
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) {
|
||||
@@ -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) {
|
||||
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) {
|
||||
vp9_highbd_iwht4x4_16_add_c(in, out, stride, 12);
|
||||
vpx_highbd_iwht4x4_16_add_c(in, out, stride, 12);
|
||||
}
|
||||
|
||||
#if HAVE_SSE2
|
||||
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) {
|
||||
vp9_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
|
||||
vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
|
||||
}
|
||||
#endif // HAVE_SSE2
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -418,14 +419,14 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vp9_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_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4DCT,
|
||||
::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
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -460,20 +461,20 @@ INSTANTIATE_TEST_CASE_P(
|
||||
::testing::Values(
|
||||
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_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
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, Trans4x4WHT,
|
||||
::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
|
||||
|
||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct4x4_c,
|
||||
&vp9_idct4x4_16_add_neon, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct4x4_c,
|
||||
&vpx_idct4x4_16_add_neon, 0, VPX_BITS_8)));
|
||||
#endif // HAVE_NEON_ASM && !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(
|
||||
MMX, Trans4x4WHT,
|
||||
::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
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct4x4_sse2,
|
||||
&vp9_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||
make_tuple(&vpx_fdct4x4_sse2,
|
||||
&vpx_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans4x4HT,
|
||||
::testing::Values(
|
||||
@@ -513,24 +522,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans4x4DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_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(&vp9_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(&vp9_fdct4x4_sse2, &vp9_idct4x4_16_add_c, 0,
|
||||
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_fdct4x4_sse2, &vpx_idct4x4_16_add_c, 0,
|
||||
VPX_BITS_8)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Trans4x4HT,
|
||||
::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, 1, 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(
|
||||
MSA, Trans4x4DCT,
|
||||
::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(
|
||||
MSA, Trans4x4HT,
|
||||
::testing::Values(
|
||||
|
@@ -13,12 +13,13 @@
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vp9/common/vp9_scan.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) {
|
||||
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) {
|
||||
@@ -91,11 +92,11 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
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) {
|
||||
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) {
|
||||
@@ -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) {
|
||||
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) {
|
||||
vp9_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
||||
vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
||||
}
|
||||
|
||||
#if HAVE_SSE2
|
||||
void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
|
||||
vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
|
||||
}
|
||||
#endif // HAVE_SSE2
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -657,14 +658,14 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
|
||||
make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, FwdTrans8x8DCT,
|
||||
::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
|
||||
|
||||
#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, 3, VPX_BITS_8)));
|
||||
#else
|
||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
|
||||
// returned from Rand16().
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, FwdTrans8x8HT,
|
||||
::testing::Values(
|
||||
@@ -696,12 +695,10 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#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(
|
||||
NEON, FwdTrans8x8DCT,
|
||||
::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)));
|
||||
#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
|
||||
|
||||
#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(
|
||||
SSE2, FwdTrans8x8DCT,
|
||||
::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)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, FwdTrans8x8HT,
|
||||
@@ -736,18 +731,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, FwdTrans8x8DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vp9_highbd_fdct8x8_c,
|
||||
make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_highbd_fdct8x8_c,
|
||||
&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),
|
||||
make_tuple(&vp9_highbd_fdct8x8_c,
|
||||
make_tuple(&vpx_highbd_fdct8x8_c,
|
||||
&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)));
|
||||
|
||||
// TODO(jingning): re-enable after these handle the expanded range [0, 65535]
|
||||
// returned from Rand16().
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, FwdTrans8x8HT,
|
||||
::testing::Values(
|
||||
@@ -771,14 +764,12 @@ INSTANTIATE_TEST_CASE_P(
|
||||
&idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
|
||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
|
||||
!CONFIG_EMULATE_HARDWARE
|
||||
// TODO(jingning): re-enable after this handles the expanded range [0, 65535]
|
||||
// returned from Rand16().
|
||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
|
||||
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3, FwdTrans8x8DCT,
|
||||
::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)));
|
||||
#endif
|
||||
|
||||
@@ -786,7 +777,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, FwdTrans8x8DCT,
|
||||
::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(
|
||||
MSA, FwdTrans8x8HT,
|
||||
::testing::Values(
|
||||
|
@@ -74,7 +74,7 @@ TEST_F(VP9FrameSizeTestsLarge, ValidSizes) {
|
||||
// size or almost 1 gig of memory.
|
||||
// In total the allocations will exceed 2GiB which may cause a failure with
|
||||
// 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);
|
||||
#else
|
||||
video.SetSize(4096, 4096);
|
||||
|
@@ -14,8 +14,7 @@
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vp9_rtcd.h"
|
||||
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
@@ -68,43 +67,6 @@ void reference_dct_2d(int16_t input[64], double output[64]) {
|
||||
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) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
const int count_test_block = 10000;
|
||||
@@ -125,7 +87,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
|
||||
reference_dct_2d(input, output_r);
|
||||
for (int j = 0; j < 64; ++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) {
|
||||
const int diff = dst[j] - src[j];
|
||||
const int error = diff * diff;
|
||||
|
@@ -10,10 +10,11 @@
|
||||
|
||||
#include "./vpx_config.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 "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
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,
|
||||
::testing::Values(vp8_short_idct4x4llm_mmx));
|
||||
#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";
|
||||
|
||||
// Check results match.
|
||||
const DecodeParam input = GET_PARAM(1);
|
||||
if (input.threads > 1) {
|
||||
// The serial decode check is too strict for tile-threaded decoding as
|
||||
// there is no guarantee on the decode order nor which specific error
|
||||
// will take precedence. Currently a tile-level error is not forwarded so
|
||||
// the frame will simply be marked corrupt.
|
||||
EXPECT_TRUE(res_dec == expected_res_dec ||
|
||||
res_dec == VPX_CODEC_CORRUPT_FRAME)
|
||||
<< "Results don't match: frame number = " << video.frame_number()
|
||||
<< ". (" << decoder->DecodeError() << "). Expected: "
|
||||
<< expected_res_dec << " or " << VPX_CODEC_CORRUPT_FRAME;
|
||||
} else {
|
||||
EXPECT_EQ(expected_res_dec, res_dec)
|
||||
<< "Results don't match: frame number = " << video.frame_number()
|
||||
<< ". (" << decoder->DecodeError() << ")";
|
||||
}
|
||||
|
||||
return !HasFailure();
|
||||
}
|
||||
@@ -112,7 +125,9 @@ TEST_P(InvalidFileTest, ReturnCode) {
|
||||
|
||||
const DecodeParam kVP9InvalidFileTests[] = {
|
||||
{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"},
|
||||
#endif
|
||||
{1, "invalid-vp90-03-v3.webm"},
|
||||
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"},
|
||||
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
|
||||
@@ -143,7 +158,7 @@ TEST_P(InvalidFileInvalidPeekTest, ReturnCode) {
|
||||
}
|
||||
|
||||
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
|
||||
{1, "invalid-vp90-01-v2.webm"},
|
||||
{1, "invalid-vp90-01-v3.webm"},
|
||||
};
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
|
||||
|
@@ -13,13 +13,13 @@
|
||||
#include <string>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vp9/common/vp9_loopfilter.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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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
|
||||
void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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 // 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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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 // 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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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,
|
||||
const uint8_t *limit, const uint8_t *thresh,
|
||||
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)
|
||||
|
||||
@@ -534,46 +534,46 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Loop8Test6Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_c, 8, 1),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_c, 8, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_c, 8, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_c, 8, 1),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_c, 8, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_c, 8, 1),
|
||||
make_tuple(&wrapper_vertical_16_sse2,
|
||||
&wrapper_vertical_16_c, 8, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_c, 10, 1),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_c, 10, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_c, 10, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 10, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 10, 2),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_c, 10, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_c, 10, 1),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_c, 10, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_c, 10, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 10, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 10, 2),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_c, 10, 1),
|
||||
make_tuple(&wrapper_vertical_16_sse2,
|
||||
&wrapper_vertical_16_c, 10, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_c, 12, 1),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_c, 12, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_c, 12, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 12, 1),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_16_sse2,
|
||||
&vp9_highbd_lpf_horizontal_16_c, 12, 2),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_c, 12, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_c, 12, 1),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_c, 12, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_c, 12, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 12, 1),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
||||
&vpx_highbd_lpf_horizontal_16_c, 12, 2),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_c, 12, 1),
|
||||
make_tuple(&wrapper_vertical_16_sse2,
|
||||
&wrapper_vertical_16_c, 12, 1),
|
||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
||||
@@ -586,11 +586,13 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Loop8Test6Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_lpf_horizontal_8_sse2, &vp9_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8, 1),
|
||||
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1)));
|
||||
make_tuple(&vpx_lpf_horizontal_8_sse2, &vpx_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||
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_dual_sse2,
|
||||
&wrapper_vertical_16_dual_c, 8, 1)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif
|
||||
|
||||
@@ -598,8 +600,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
AVX2, Loop8Test6Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_lpf_horizontal_16_avx2, &vp9_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, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8,
|
||||
2)));
|
||||
#endif
|
||||
|
||||
@@ -608,42 +610,42 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Loop8Test9Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_dual_c, 8),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_dual_c, 10),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_dual_c, 10),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_dual_c, 10),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_dual_c, 10),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_4_dual_c, 12),
|
||||
make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vp9_highbd_lpf_horizontal_8_dual_c, 12),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_4_dual_c, 12),
|
||||
make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vp9_highbd_lpf_vertical_8_dual_c, 12)));
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_dual_c, 8),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_dual_c, 10),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_dual_c, 10),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_dual_c, 10),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_dual_c, 10),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_4_dual_c, 12),
|
||||
make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2,
|
||||
&vpx_highbd_lpf_horizontal_8_dual_c, 12),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_4_dual_c, 12),
|
||||
make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2,
|
||||
&vpx_highbd_lpf_vertical_8_dual_c, 12)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, Loop8Test9Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_lpf_horizontal_4_dual_sse2,
|
||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_horizontal_8_dual_sse2,
|
||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_4_dual_sse2,
|
||||
&vp9_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_8_dual_sse2,
|
||||
&vp9_lpf_vertical_8_dual_c, 8)));
|
||||
make_tuple(&vpx_lpf_horizontal_4_dual_sse2,
|
||||
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_horizontal_8_dual_sse2,
|
||||
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_4_dual_sse2,
|
||||
&vpx_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_8_dual_sse2,
|
||||
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif
|
||||
|
||||
@@ -657,36 +659,36 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#if HAVE_NEON_ASM
|
||||
// Using #if inside the macro is unsupported on MSVS but the tests are not
|
||||
// currently built for MSVS with ARM and NEON.
|
||||
make_tuple(&vp9_lpf_horizontal_16_neon,
|
||||
&vp9_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_horizontal_16_neon,
|
||||
&vp9_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vpx_lpf_horizontal_16_neon,
|
||||
&vpx_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_neon,
|
||||
&vpx_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&wrapper_vertical_16_neon,
|
||||
&wrapper_vertical_16_c, 8, 1),
|
||||
make_tuple(&wrapper_vertical_16_dual_neon,
|
||||
&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
|
||||
make_tuple(&vp9_lpf_horizontal_4_neon,
|
||||
&vp9_lpf_horizontal_4_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_vertical_4_neon,
|
||||
&vp9_lpf_vertical_4_c, 8, 1)));
|
||||
make_tuple(&vpx_lpf_horizontal_8_neon,
|
||||
&vpx_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_vertical_8_neon,
|
||||
&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(
|
||||
NEON, Loop8Test9Param,
|
||||
::testing::Values(
|
||||
#if HAVE_NEON_ASM
|
||||
make_tuple(&vp9_lpf_horizontal_8_dual_neon,
|
||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_8_dual_neon,
|
||||
&vp9_lpf_vertical_8_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_horizontal_8_dual_neon,
|
||||
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_8_dual_neon,
|
||||
&vpx_lpf_vertical_8_dual_c, 8),
|
||||
#endif // HAVE_NEON_ASM
|
||||
make_tuple(&vp9_lpf_horizontal_4_dual_neon,
|
||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_4_dual_neon,
|
||||
&vp9_lpf_vertical_4_dual_c, 8)));
|
||||
make_tuple(&vpx_lpf_horizontal_4_dual_neon,
|
||||
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_4_dual_neon,
|
||||
&vpx_lpf_vertical_4_dual_c, 8)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif // HAVE_NEON
|
||||
|
||||
@@ -694,23 +696,23 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, Loop8Test6Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_lpf_horizontal_8_msa, &vp9_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_horizontal_16_msa, &vp9_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vp9_lpf_horizontal_16_msa, &vp9_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vp9_lpf_vertical_8_msa, &vp9_lpf_vertical_8_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
|
||||
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
|
||||
make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1),
|
||||
make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, Loop8Test9Param,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_lpf_horizontal_4_dual_msa,
|
||||
&vp9_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_horizontal_8_dual_msa,
|
||||
&vp9_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_4_dual_msa,
|
||||
&vp9_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vp9_lpf_vertical_8_dual_msa,
|
||||
&vp9_lpf_vertical_8_dual_c, 8)));
|
||||
make_tuple(&vpx_lpf_horizontal_4_dual_msa,
|
||||
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_horizontal_8_dual_msa,
|
||||
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_4_dual_msa,
|
||||
&vpx_lpf_vertical_4_dual_c, 8),
|
||||
make_tuple(&vpx_lpf_vertical_8_dual_msa,
|
||||
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
||||
|
||||
} // namespace
|
||||
|
@@ -13,12 +13,13 @@
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_blockd.h"
|
||||
#include "vp9/common/vp9_scan.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
@@ -201,62 +202,62 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
C, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_34_add_c,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_34_add_c,
|
||||
TX_32X32, 34),
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_1_add_c,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_1_add_c,
|
||||
TX_32X32, 1),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_10_add_c,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_10_add_c,
|
||||
TX_16X16, 10),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_1_add_c,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_1_add_c,
|
||||
TX_16X16, 1),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_12_add_c,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_12_add_c,
|
||||
TX_8X8, 12),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_1_add_c,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_1_add_c,
|
||||
TX_8X8, 1),
|
||||
make_tuple(&vp9_fdct4x4_c,
|
||||
&vp9_idct4x4_16_add_c,
|
||||
&vp9_idct4x4_1_add_c,
|
||||
make_tuple(&vpx_fdct4x4_c,
|
||||
&vpx_idct4x4_16_add_c,
|
||||
&vpx_idct4x4_1_add_c,
|
||||
TX_4X4, 1)));
|
||||
|
||||
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_1_add_neon,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_1_add_neon,
|
||||
TX_32X32, 1),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_10_add_neon,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_10_add_neon,
|
||||
TX_16X16, 10),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_1_add_neon,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_1_add_neon,
|
||||
TX_16X16, 1),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_12_add_neon,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_12_add_neon,
|
||||
TX_8X8, 12),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_1_add_neon,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_1_add_neon,
|
||||
TX_8X8, 1),
|
||||
make_tuple(&vp9_fdct4x4_c,
|
||||
&vp9_idct4x4_16_add_c,
|
||||
&vp9_idct4x4_1_add_neon,
|
||||
make_tuple(&vpx_fdct4x4_c,
|
||||
&vpx_idct4x4_16_add_c,
|
||||
&vpx_idct4x4_1_add_neon,
|
||||
TX_4X4, 1)));
|
||||
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
@@ -264,44 +265,44 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_34_add_sse2,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_34_add_sse2,
|
||||
TX_32X32, 34),
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_1_add_sse2,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_1_add_sse2,
|
||||
TX_32X32, 1),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_10_add_sse2,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_10_add_sse2,
|
||||
TX_16X16, 10),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_1_add_sse2,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_1_add_sse2,
|
||||
TX_16X16, 1),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_12_add_sse2,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_12_add_sse2,
|
||||
TX_8X8, 12),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_1_add_sse2,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_1_add_sse2,
|
||||
TX_8X8, 1),
|
||||
make_tuple(&vp9_fdct4x4_c,
|
||||
&vp9_idct4x4_16_add_c,
|
||||
&vp9_idct4x4_1_add_sse2,
|
||||
make_tuple(&vpx_fdct4x4_c,
|
||||
&vpx_idct4x4_16_add_c,
|
||||
&vpx_idct4x4_1_add_sse2,
|
||||
TX_4X4, 1)));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
|
||||
!CONFIG_EMULATE_HARDWARE
|
||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
|
||||
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSSE3_64, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_12_add_ssse3,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_12_add_ssse3,
|
||||
TX_8X8, 12)));
|
||||
#endif
|
||||
|
||||
@@ -309,33 +310,33 @@ INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, PartialIDctTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_34_add_msa,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_34_add_msa,
|
||||
TX_32X32, 34),
|
||||
make_tuple(&vp9_fdct32x32_c,
|
||||
&vp9_idct32x32_1024_add_c,
|
||||
&vp9_idct32x32_1_add_msa,
|
||||
make_tuple(&vpx_fdct32x32_c,
|
||||
&vpx_idct32x32_1024_add_c,
|
||||
&vpx_idct32x32_1_add_msa,
|
||||
TX_32X32, 1),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_10_add_msa,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_10_add_msa,
|
||||
TX_16X16, 10),
|
||||
make_tuple(&vp9_fdct16x16_c,
|
||||
&vp9_idct16x16_256_add_c,
|
||||
&vp9_idct16x16_1_add_msa,
|
||||
make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
&vpx_idct16x16_1_add_msa,
|
||||
TX_16X16, 1),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_12_add_msa,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_12_add_msa,
|
||||
TX_8X8, 10),
|
||||
make_tuple(&vp9_fdct8x8_c,
|
||||
&vp9_idct8x8_64_add_c,
|
||||
&vp9_idct8x8_1_add_msa,
|
||||
make_tuple(&vpx_fdct8x8_c,
|
||||
&vpx_idct8x8_64_add_c,
|
||||
&vpx_idct8x8_1_add_msa,
|
||||
TX_8X8, 1),
|
||||
make_tuple(&vp9_fdct4x4_c,
|
||||
&vp9_idct4x4_16_add_c,
|
||||
&vp9_idct4x4_1_add_msa,
|
||||
make_tuple(&vpx_fdct4x4_c,
|
||||
&vpx_idct4x4_16_add_c,
|
||||
&vpx_idct4x4_1_add_msa,
|
||||
TX_4X4, 1)));
|
||||
#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));
|
||||
#endif
|
||||
|
||||
#if HAVE_MSA
|
||||
INSTANTIATE_TEST_CASE_P(MSA, VP8PostProcessingFilterTest,
|
||||
::testing::Values(vp8_post_proc_down_and_across_mb_row_msa));
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
@@ -11,13 +11,13 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp8_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp8_rtcd.h"
|
||||
#include "vp8/common/blockd.h"
|
||||
#include "vp8/common/onyx.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,
|
||||
&vp8_fast_quantize_b_c)));
|
||||
#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
|
||||
|
@@ -30,7 +30,9 @@
|
||||
|
||||
#if defined(_WIN64)
|
||||
|
||||
#define _WIN32_LEAN_AND_MEAN
|
||||
#undef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <winnt.h>
|
||||
|
||||
@@ -96,7 +98,7 @@ class RegisterStateCheck {
|
||||
|
||||
extern "C" {
|
||||
// Save the d8-d15 registers into store.
|
||||
void vp9_push_neon(int64_t *store);
|
||||
void vpx_push_neon(int64_t *store);
|
||||
}
|
||||
|
||||
namespace libvpx_test {
|
||||
@@ -111,7 +113,7 @@ class RegisterStateCheck {
|
||||
|
||||
private:
|
||||
static bool StoreRegisters(int64_t store[8]) {
|
||||
vp9_push_neon(store);
|
||||
vpx_push_neon(store);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -119,7 +121,7 @@ class RegisterStateCheck {
|
||||
bool Check() const {
|
||||
if (!initialized_) return false;
|
||||
int64_t post_store[8];
|
||||
vp9_push_neon(post_store);
|
||||
vpx_push_neon(post_store);
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
EXPECT_EQ(pre_store_[i], post_store[i]) << "d"
|
||||
<< 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 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) {
|
||||
if (frame < 10)
|
||||
return val;
|
||||
@@ -120,15 +129,6 @@ class ResizeTest : public ::libvpx_test::EncoderTest,
|
||||
|
||||
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() {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
@@ -196,6 +196,19 @@ class ResizeInternalTest : public ResizeTest {
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
if (change_config_) {
|
||||
int new_q = 60;
|
||||
if (video->frame() == 0) {
|
||||
struct vpx_scaling_mode mode = {VP8E_ONETWO, VP8E_ONETWO};
|
||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||
}
|
||||
if (video->frame() == 1) {
|
||||
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = new_q;
|
||||
encoder->Config(&cfg_);
|
||||
}
|
||||
} else {
|
||||
if (video->frame() == kStepDownFrame) {
|
||||
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||
@@ -205,6 +218,7 @@ class ResizeInternalTest : public ResizeTest {
|
||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
if (!frame0_psnr_)
|
||||
@@ -227,6 +241,7 @@ class ResizeInternalTest : public ResizeTest {
|
||||
#endif
|
||||
|
||||
double frame0_psnr_;
|
||||
bool change_config_;
|
||||
#if WRITE_COMPRESSED_STREAM
|
||||
FILE *outfile_;
|
||||
unsigned int out_frames_;
|
||||
@@ -237,6 +252,7 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
|
||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 10);
|
||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||
change_config_ = false;
|
||||
|
||||
// q picked such that initial keyframe on this clip is ~30dB PSNR
|
||||
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
|
||||
@@ -261,6 +277,143 @@ 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 ResizeInternalRealtimeTest : public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
ResizeInternalRealtimeTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~ResizeInternalRealtimeTest() {}
|
||||
|
||||
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_.g_w = 352;
|
||||
cfg_.g_h = 288;
|
||||
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_;
|
||||
};
|
||||
|
||||
// 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(ResizeInternalRealtimeTest, TestInternalResizeDown) {
|
||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 299);
|
||||
DefaultConfig();
|
||||
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(ResizeInternalRealtimeTest, TestInternalResizeDownUpChangeBitRate) {
|
||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 299);
|
||||
DefaultConfig();
|
||||
change_bitrate_ = true;
|
||||
// Disable dropped frames.
|
||||
cfg_.rc_dropframe_thresh = 0;
|
||||
// Starting bitrate low.
|
||||
cfg_.rc_target_bitrate = 100;
|
||||
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(2, resize_count) << "Resizing should occur twice.";
|
||||
}
|
||||
|
||||
vpx_img_fmt_t CspForFrameNumber(int frame) {
|
||||
if (frame < 10)
|
||||
return VPX_IMG_FMT_I420;
|
||||
@@ -371,6 +524,9 @@ VP9_INSTANTIATE_TEST_CASE(ResizeTest,
|
||||
::testing::Values(::libvpx_test::kRealTime));
|
||||
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
||||
::testing::Values(::libvpx_test::kOnePassBest));
|
||||
VP9_INSTANTIATE_TEST_CASE(ResizeInternalRealtimeTest,
|
||||
::testing::Values(::libvpx_test::kRealTime),
|
||||
::testing::Range(5, 9));
|
||||
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
||||
::testing::Values(::libvpx_test::kRealTime));
|
||||
} // namespace
|
||||
|
103
test/sad_test.cc
103
test/sad_test.cc
@@ -13,18 +13,17 @@
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vpx_ports/mem.h"
|
||||
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vpx/vpx_codec.h"
|
||||
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vpx_ports/mem.h"
|
||||
|
||||
typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr,
|
||||
int src_stride,
|
||||
@@ -1114,4 +1113,98 @@ const SadMxNx4Param x4d_avx2_tests[] = {
|
||||
INSTANTIATE_TEST_CASE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests));
|
||||
#endif // HAVE_AVX2
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// MIPS functions
|
||||
#if HAVE_MSA
|
||||
const SadMxNFunc sad64x64_msa = vpx_sad64x64_msa;
|
||||
const SadMxNFunc sad64x32_msa = vpx_sad64x32_msa;
|
||||
const SadMxNFunc sad32x64_msa = vpx_sad32x64_msa;
|
||||
const SadMxNFunc sad32x32_msa = vpx_sad32x32_msa;
|
||||
const SadMxNFunc sad32x16_msa = vpx_sad32x16_msa;
|
||||
const SadMxNFunc sad16x32_msa = vpx_sad16x32_msa;
|
||||
const SadMxNFunc sad16x16_msa = vpx_sad16x16_msa;
|
||||
const SadMxNFunc sad16x8_msa = vpx_sad16x8_msa;
|
||||
const SadMxNFunc sad8x16_msa = vpx_sad8x16_msa;
|
||||
const SadMxNFunc sad8x8_msa = vpx_sad8x8_msa;
|
||||
const SadMxNFunc sad8x4_msa = vpx_sad8x4_msa;
|
||||
const SadMxNFunc sad4x8_msa = vpx_sad4x8_msa;
|
||||
const SadMxNFunc sad4x4_msa = vpx_sad4x4_msa;
|
||||
const SadMxNParam msa_tests[] = {
|
||||
make_tuple(64, 64, sad64x64_msa, -1),
|
||||
make_tuple(64, 32, sad64x32_msa, -1),
|
||||
make_tuple(32, 64, sad32x64_msa, -1),
|
||||
make_tuple(32, 32, sad32x32_msa, -1),
|
||||
make_tuple(32, 16, sad32x16_msa, -1),
|
||||
make_tuple(16, 32, sad16x32_msa, -1),
|
||||
make_tuple(16, 16, sad16x16_msa, -1),
|
||||
make_tuple(16, 8, sad16x8_msa, -1),
|
||||
make_tuple(8, 16, sad8x16_msa, -1),
|
||||
make_tuple(8, 8, sad8x8_msa, -1),
|
||||
make_tuple(8, 4, sad8x4_msa, -1),
|
||||
make_tuple(4, 8, sad4x8_msa, -1),
|
||||
make_tuple(4, 4, sad4x4_msa, -1),
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(MSA, SADTest, ::testing::ValuesIn(msa_tests));
|
||||
|
||||
const SadMxNAvgFunc sad64x64_avg_msa = vpx_sad64x64_avg_msa;
|
||||
const SadMxNAvgFunc sad64x32_avg_msa = vpx_sad64x32_avg_msa;
|
||||
const SadMxNAvgFunc sad32x64_avg_msa = vpx_sad32x64_avg_msa;
|
||||
const SadMxNAvgFunc sad32x32_avg_msa = vpx_sad32x32_avg_msa;
|
||||
const SadMxNAvgFunc sad32x16_avg_msa = vpx_sad32x16_avg_msa;
|
||||
const SadMxNAvgFunc sad16x32_avg_msa = vpx_sad16x32_avg_msa;
|
||||
const SadMxNAvgFunc sad16x16_avg_msa = vpx_sad16x16_avg_msa;
|
||||
const SadMxNAvgFunc sad16x8_avg_msa = vpx_sad16x8_avg_msa;
|
||||
const SadMxNAvgFunc sad8x16_avg_msa = vpx_sad8x16_avg_msa;
|
||||
const SadMxNAvgFunc sad8x8_avg_msa = vpx_sad8x8_avg_msa;
|
||||
const SadMxNAvgFunc sad8x4_avg_msa = vpx_sad8x4_avg_msa;
|
||||
const SadMxNAvgFunc sad4x8_avg_msa = vpx_sad4x8_avg_msa;
|
||||
const SadMxNAvgFunc sad4x4_avg_msa = vpx_sad4x4_avg_msa;
|
||||
const SadMxNAvgParam avg_msa_tests[] = {
|
||||
make_tuple(64, 64, sad64x64_avg_msa, -1),
|
||||
make_tuple(64, 32, sad64x32_avg_msa, -1),
|
||||
make_tuple(32, 64, sad32x64_avg_msa, -1),
|
||||
make_tuple(32, 32, sad32x32_avg_msa, -1),
|
||||
make_tuple(32, 16, sad32x16_avg_msa, -1),
|
||||
make_tuple(16, 32, sad16x32_avg_msa, -1),
|
||||
make_tuple(16, 16, sad16x16_avg_msa, -1),
|
||||
make_tuple(16, 8, sad16x8_avg_msa, -1),
|
||||
make_tuple(8, 16, sad8x16_avg_msa, -1),
|
||||
make_tuple(8, 8, sad8x8_avg_msa, -1),
|
||||
make_tuple(8, 4, sad8x4_avg_msa, -1),
|
||||
make_tuple(4, 8, sad4x8_avg_msa, -1),
|
||||
make_tuple(4, 4, sad4x4_avg_msa, -1),
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(MSA, SADavgTest, ::testing::ValuesIn(avg_msa_tests));
|
||||
|
||||
const SadMxNx4Func sad64x64x4d_msa = vpx_sad64x64x4d_msa;
|
||||
const SadMxNx4Func sad64x32x4d_msa = vpx_sad64x32x4d_msa;
|
||||
const SadMxNx4Func sad32x64x4d_msa = vpx_sad32x64x4d_msa;
|
||||
const SadMxNx4Func sad32x32x4d_msa = vpx_sad32x32x4d_msa;
|
||||
const SadMxNx4Func sad32x16x4d_msa = vpx_sad32x16x4d_msa;
|
||||
const SadMxNx4Func sad16x32x4d_msa = vpx_sad16x32x4d_msa;
|
||||
const SadMxNx4Func sad16x16x4d_msa = vpx_sad16x16x4d_msa;
|
||||
const SadMxNx4Func sad16x8x4d_msa = vpx_sad16x8x4d_msa;
|
||||
const SadMxNx4Func sad8x16x4d_msa = vpx_sad8x16x4d_msa;
|
||||
const SadMxNx4Func sad8x8x4d_msa = vpx_sad8x8x4d_msa;
|
||||
const SadMxNx4Func sad8x4x4d_msa = vpx_sad8x4x4d_msa;
|
||||
const SadMxNx4Func sad4x8x4d_msa = vpx_sad4x8x4d_msa;
|
||||
const SadMxNx4Func sad4x4x4d_msa = vpx_sad4x4x4d_msa;
|
||||
const SadMxNx4Param x4d_msa_tests[] = {
|
||||
make_tuple(64, 64, sad64x64x4d_msa, -1),
|
||||
make_tuple(64, 32, sad64x32x4d_msa, -1),
|
||||
make_tuple(32, 64, sad32x64x4d_msa, -1),
|
||||
make_tuple(32, 32, sad32x32x4d_msa, -1),
|
||||
make_tuple(32, 16, sad32x16x4d_msa, -1),
|
||||
make_tuple(16, 32, sad16x32x4d_msa, -1),
|
||||
make_tuple(16, 16, sad16x16x4d_msa, -1),
|
||||
make_tuple(16, 8, sad16x8x4d_msa, -1),
|
||||
make_tuple(8, 16, sad8x16x4d_msa, -1),
|
||||
make_tuple(8, 8, sad8x8x4d_msa, -1),
|
||||
make_tuple(8, 4, sad8x4x4d_msa, -1),
|
||||
make_tuple(4, 8, sad4x8x4d_msa, -1),
|
||||
make_tuple(4, 4, sad4x4x4d_msa, -1),
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(MSA, SADx4Test, ::testing::ValuesIn(x4d_msa_tests));
|
||||
#endif // HAVE_MSA
|
||||
|
||||
} // namespace
|
||||
|
@@ -11,13 +11,15 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp8_rtcd.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
@@ -199,7 +201,7 @@ const SixtapPredictFunc sixtap_16x16_neon = vp8_sixtap_predict16x16_neon;
|
||||
const SixtapPredictFunc sixtap_8x8_neon = vp8_sixtap_predict8x8_neon;
|
||||
const SixtapPredictFunc sixtap_8x4_neon = vp8_sixtap_predict8x4_neon;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_NEON, SixtapPredictTest, ::testing::Values(
|
||||
NEON, SixtapPredictTest, ::testing::Values(
|
||||
make_tuple(16, 16, sixtap_16x16_neon),
|
||||
make_tuple(8, 8, sixtap_8x8_neon),
|
||||
make_tuple(8, 4, sixtap_8x4_neon)));
|
||||
@@ -238,4 +240,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(8, 4, sixtap_8x4_ssse3),
|
||||
make_tuple(4, 4, sixtap_4x4_ssse3)));
|
||||
#endif
|
||||
#if HAVE_MSA
|
||||
const SixtapPredictFunc sixtap_16x16_msa = vp8_sixtap_predict16x16_msa;
|
||||
const SixtapPredictFunc sixtap_8x8_msa = vp8_sixtap_predict8x8_msa;
|
||||
const SixtapPredictFunc sixtap_8x4_msa = vp8_sixtap_predict8x4_msa;
|
||||
const SixtapPredictFunc sixtap_4x4_msa = vp8_sixtap_predict4x4_msa;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MSA, SixtapPredictTest, ::testing::Values(
|
||||
make_tuple(16, 16, sixtap_16x16_msa),
|
||||
make_tuple(8, 8, sixtap_8x8_msa),
|
||||
make_tuple(8, 4, sixtap_8x4_msa),
|
||||
make_tuple(4, 4, sixtap_4x4_msa)));
|
||||
#endif
|
||||
} // 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 {
|
||||
|
||||
const int kTestMode = 0;
|
||||
const int kSuperframeSyntax = 1;
|
||||
|
||||
typedef std::tr1::tuple<libvpx_test::TestMode,int> SuperframeTestParam;
|
||||
|
||||
class SuperframeTest : public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||
public ::libvpx_test::CodecTestWithParam<SuperframeTestParam> {
|
||||
protected:
|
||||
SuperframeTest() : EncoderTest(GET_PARAM(0)), modified_buf_(NULL),
|
||||
last_sf_pts_(0) {}
|
||||
@@ -25,9 +30,13 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
||||
|
||||
virtual void SetUp() {
|
||||
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_max_ = INT_MAX;
|
||||
is_vp10_style_superframe_ = syntax;
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
@@ -50,7 +59,8 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
||||
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
|
||||
const int frames = (marker & 0x7) + 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 &&
|
||||
pkt->data.frame.sz >= index_sz &&
|
||||
buffer[pkt->data.frame.sz - index_sz] == marker) {
|
||||
@@ -75,6 +85,7 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
||||
return pkt;
|
||||
}
|
||||
|
||||
int is_vp10_style_superframe_;
|
||||
int sf_count_;
|
||||
int sf_count_max_;
|
||||
vpx_codec_cx_pkt_t modified_pkt_;
|
||||
@@ -92,6 +103,11 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
|
||||
EXPECT_EQ(sf_count_, 1);
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
|
||||
::libvpx_test::kTwoPassGood));
|
||||
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
|
||||
::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
|
||||
|
@@ -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_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) += rush_hour_444.y4m
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
||||
@@ -687,8 +688,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
|
||||
endif # CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
# 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-v2.webm.res
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm
|
||||
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.res
|
||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm
|
||||
|
@@ -6,8 +6,8 @@ b87815bf86020c592ccc7a846ba2e28ec8043902 *hantro_odd.yuv
|
||||
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
|
||||
456d1493e52d32a5c30edf44a27debc1fa6b253a *invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf.res
|
||||
fe346136b9b8c1e6f6084cc106485706915795e4 *invalid-vp90-01-v2.webm
|
||||
25751f5d3b05ff03f0719ad42cd625348eb8961e *invalid-vp90-01-v2.webm.res
|
||||
fe346136b9b8c1e6f6084cc106485706915795e4 *invalid-vp90-01-v3.webm
|
||||
5d9474c0309b7ca09a182d888f73b37a8fe1362c *invalid-vp90-01-v3.webm.res
|
||||
d78e2fceba5ac942246503ec8366f879c4775ca5 *invalid-vp90-02-v2.webm
|
||||
8e2eff4af87d2b561cce2365713269e301457ef3 *invalid-vp90-02-v2.webm.res
|
||||
df1a1453feb3c00d7d89746c7003b4163523bff3 *invalid-vp90-03-v3.webm
|
||||
@@ -743,3 +743,4 @@ d06285d109ecbaef63b0cbcc44d70a129186f51c *invalid-vp90-2-03-size-224x196.webm.iv
|
||||
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
|
||||
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
|
||||
5b5763b388b1b52a81bb82b39f7ec25c4bd3d0e1 *desktop_credits.y4m
|
||||
|
13
test/test.mk
13
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) += user_priv_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) += borders_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
|
||||
@@ -91,6 +92,7 @@ endif
|
||||
## shared library builds don't make these functions accessible.
|
||||
##
|
||||
ifeq ($(CONFIG_SHARED),)
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += lpf_8_test.cc
|
||||
|
||||
## VP8
|
||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
||||
@@ -104,13 +106,11 @@ endif
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += subtract_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
|
||||
|
||||
LIBVPX_TEST_SRCS-yes += idct_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += intrapred_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
|
||||
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
|
||||
|
||||
@@ -143,7 +143,6 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_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) += 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_quantize_test.cc
|
||||
@@ -165,8 +164,12 @@ endif # VP9
|
||||
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
||||
|
||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9_DECODER) := test_intra_pred_speed.cc
|
||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9_DECODER) += ../md5_utils.h ../md5_utils.c
|
||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) := test_intra_pred_speed.cc
|
||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) += ../md5_utils.h ../md5_utils.c
|
||||
|
||||
## VP10
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_dct_test.cc
|
||||
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_inv_txfm_test.cc
|
||||
|
||||
endif # CONFIG_SHARED
|
||||
|
||||
|
@@ -7,14 +7,14 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
// Test and time VP9 intra-predictor functions
|
||||
// Test and time VPX intra-predictor functions
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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/clear_system_state.h"
|
||||
#include "test/md5_helper.h"
|
||||
@@ -170,215 +170,215 @@ void TestIntraPred32(VpxPredFunc const *pred_funcs) {
|
||||
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
|
||||
d45, d135, d117, d153, d207, d63, tm) \
|
||||
TEST(arch, test_func) { \
|
||||
static const VpxPredFunc vp9_intra_pred[] = { \
|
||||
static const VpxPredFunc vpx_intra_pred[] = { \
|
||||
dc, dc_left, dc_top, dc_128, v, h, d45, \
|
||||
d135, d117, d153, d207, d63, tm}; \
|
||||
test_func(vp9_intra_pred); \
|
||||
test_func(vpx_intra_pred); \
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// 4x4
|
||||
|
||||
INTRA_PRED_TEST(C, TestIntraPred4, vp9_dc_predictor_4x4_c,
|
||||
vp9_dc_left_predictor_4x4_c, vp9_dc_top_predictor_4x4_c,
|
||||
vp9_dc_128_predictor_4x4_c, vp9_v_predictor_4x4_c,
|
||||
vp9_h_predictor_4x4_c, vp9_d45_predictor_4x4_c,
|
||||
vp9_d135_predictor_4x4_c, vp9_d117_predictor_4x4_c,
|
||||
vp9_d153_predictor_4x4_c, vp9_d207_predictor_4x4_c,
|
||||
vp9_d63_predictor_4x4_c, vp9_tm_predictor_4x4_c)
|
||||
INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
|
||||
vpx_dc_left_predictor_4x4_c, vpx_dc_top_predictor_4x4_c,
|
||||
vpx_dc_128_predictor_4x4_c, vpx_v_predictor_4x4_c,
|
||||
vpx_h_predictor_4x4_c, vpx_d45_predictor_4x4_c,
|
||||
vpx_d135_predictor_4x4_c, vpx_d117_predictor_4x4_c,
|
||||
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
|
||||
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
|
||||
|
||||
#if HAVE_SSE
|
||||
INTRA_PRED_TEST(SSE, TestIntraPred4, vp9_dc_predictor_4x4_sse,
|
||||
vp9_dc_left_predictor_4x4_sse, vp9_dc_top_predictor_4x4_sse,
|
||||
vp9_dc_128_predictor_4x4_sse, vp9_v_predictor_4x4_sse, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, vp9_tm_predictor_4x4_sse)
|
||||
#endif // HAVE_SSE
|
||||
#if HAVE_SSE && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSE, TestIntraPred4, vpx_dc_predictor_4x4_sse,
|
||||
vpx_dc_left_predictor_4x4_sse, vpx_dc_top_predictor_4x4_sse,
|
||||
vpx_dc_128_predictor_4x4_sse, vpx_v_predictor_4x4_sse, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_4x4_sse)
|
||||
#endif // HAVE_SSE && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_SSSE3
|
||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_h_predictor_4x4_ssse3, vp9_d45_predictor_4x4_ssse3, NULL,
|
||||
NULL, vp9_d153_predictor_4x4_ssse3,
|
||||
vp9_d207_predictor_4x4_ssse3, vp9_d63_predictor_4x4_ssse3, NULL)
|
||||
#endif // HAVE_SSSE3
|
||||
vpx_h_predictor_4x4_ssse3, vpx_d45_predictor_4x4_ssse3, NULL,
|
||||
NULL, vpx_d153_predictor_4x4_ssse3,
|
||||
vpx_d207_predictor_4x4_ssse3, vpx_d63_predictor_4x4_ssse3, NULL)
|
||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_DSPR2
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vp9_dc_predictor_4x4_dspr2, NULL, NULL,
|
||||
NULL, NULL, vp9_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, vp9_tm_predictor_4x4_dspr2)
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL,
|
||||
NULL, NULL, vpx_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, vpx_tm_predictor_4x4_dspr2)
|
||||
#endif // HAVE_DSPR2
|
||||
|
||||
#if HAVE_NEON
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred4, vp9_dc_predictor_4x4_neon,
|
||||
vp9_dc_left_predictor_4x4_neon, vp9_dc_top_predictor_4x4_neon,
|
||||
vp9_dc_128_predictor_4x4_neon, vp9_v_predictor_4x4_neon,
|
||||
vp9_h_predictor_4x4_neon, vp9_d45_predictor_4x4_neon,
|
||||
vp9_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
|
||||
vp9_tm_predictor_4x4_neon)
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred4, vpx_dc_predictor_4x4_neon,
|
||||
vpx_dc_left_predictor_4x4_neon, vpx_dc_top_predictor_4x4_neon,
|
||||
vpx_dc_128_predictor_4x4_neon, vpx_v_predictor_4x4_neon,
|
||||
vpx_h_predictor_4x4_neon, vpx_d45_predictor_4x4_neon,
|
||||
vpx_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
|
||||
vpx_tm_predictor_4x4_neon)
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_MSA
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred4, vp9_dc_predictor_4x4_msa,
|
||||
vp9_dc_left_predictor_4x4_msa, vp9_dc_top_predictor_4x4_msa,
|
||||
vp9_dc_128_predictor_4x4_msa, vp9_v_predictor_4x4_msa,
|
||||
vp9_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vp9_tm_predictor_4x4_msa)
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred4, vpx_dc_predictor_4x4_msa,
|
||||
vpx_dc_left_predictor_4x4_msa, vpx_dc_top_predictor_4x4_msa,
|
||||
vpx_dc_128_predictor_4x4_msa, vpx_v_predictor_4x4_msa,
|
||||
vpx_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vpx_tm_predictor_4x4_msa)
|
||||
#endif // HAVE_MSA
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// 8x8
|
||||
|
||||
INTRA_PRED_TEST(C, TestIntraPred8, vp9_dc_predictor_8x8_c,
|
||||
vp9_dc_left_predictor_8x8_c, vp9_dc_top_predictor_8x8_c,
|
||||
vp9_dc_128_predictor_8x8_c, vp9_v_predictor_8x8_c,
|
||||
vp9_h_predictor_8x8_c, vp9_d45_predictor_8x8_c,
|
||||
vp9_d135_predictor_8x8_c, vp9_d117_predictor_8x8_c,
|
||||
vp9_d153_predictor_8x8_c, vp9_d207_predictor_8x8_c,
|
||||
vp9_d63_predictor_8x8_c, vp9_tm_predictor_8x8_c)
|
||||
INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
|
||||
vpx_dc_left_predictor_8x8_c, vpx_dc_top_predictor_8x8_c,
|
||||
vpx_dc_128_predictor_8x8_c, vpx_v_predictor_8x8_c,
|
||||
vpx_h_predictor_8x8_c, vpx_d45_predictor_8x8_c,
|
||||
vpx_d135_predictor_8x8_c, vpx_d117_predictor_8x8_c,
|
||||
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
|
||||
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
|
||||
|
||||
#if HAVE_SSE
|
||||
INTRA_PRED_TEST(SSE, TestIntraPred8, vp9_dc_predictor_8x8_sse,
|
||||
vp9_dc_left_predictor_8x8_sse, vp9_dc_top_predictor_8x8_sse,
|
||||
vp9_dc_128_predictor_8x8_sse, vp9_v_predictor_8x8_sse, NULL,
|
||||
#if HAVE_SSE && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSE, TestIntraPred8, vpx_dc_predictor_8x8_sse,
|
||||
vpx_dc_left_predictor_8x8_sse, vpx_dc_top_predictor_8x8_sse,
|
||||
vpx_dc_128_predictor_8x8_sse, vpx_v_predictor_8x8_sse, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
||||
#endif // HAVE_SSE
|
||||
#endif // HAVE_SSE && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_SSE2
|
||||
#if HAVE_SSE2 && 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
|
||||
NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_sse2)
|
||||
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_SSSE3
|
||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_h_predictor_8x8_ssse3, vp9_d45_predictor_8x8_ssse3, NULL,
|
||||
NULL, vp9_d153_predictor_8x8_ssse3,
|
||||
vp9_d207_predictor_8x8_ssse3, vp9_d63_predictor_8x8_ssse3, NULL)
|
||||
#endif // HAVE_SSSE3
|
||||
vpx_h_predictor_8x8_ssse3, vpx_d45_predictor_8x8_ssse3, NULL,
|
||||
NULL, vpx_d153_predictor_8x8_ssse3,
|
||||
vpx_d207_predictor_8x8_ssse3, vpx_d63_predictor_8x8_ssse3, NULL)
|
||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_DSPR2
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vp9_dc_predictor_8x8_dspr2, NULL, NULL,
|
||||
NULL, NULL, vp9_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, vp9_tm_predictor_8x8_c)
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL,
|
||||
NULL, NULL, vpx_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, vpx_tm_predictor_8x8_c)
|
||||
#endif // HAVE_DSPR2
|
||||
|
||||
#if HAVE_NEON
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred8, vp9_dc_predictor_8x8_neon,
|
||||
vp9_dc_left_predictor_8x8_neon, vp9_dc_top_predictor_8x8_neon,
|
||||
vp9_dc_128_predictor_8x8_neon, vp9_v_predictor_8x8_neon,
|
||||
vp9_h_predictor_8x8_neon, vp9_d45_predictor_8x8_neon, NULL,
|
||||
NULL, NULL, NULL, NULL, vp9_tm_predictor_8x8_neon)
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred8, vpx_dc_predictor_8x8_neon,
|
||||
vpx_dc_left_predictor_8x8_neon, vpx_dc_top_predictor_8x8_neon,
|
||||
vpx_dc_128_predictor_8x8_neon, vpx_v_predictor_8x8_neon,
|
||||
vpx_h_predictor_8x8_neon, vpx_d45_predictor_8x8_neon, NULL,
|
||||
NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_neon)
|
||||
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_MSA
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred8, vp9_dc_predictor_8x8_msa,
|
||||
vp9_dc_left_predictor_8x8_msa, vp9_dc_top_predictor_8x8_msa,
|
||||
vp9_dc_128_predictor_8x8_msa, vp9_v_predictor_8x8_msa,
|
||||
vp9_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vp9_tm_predictor_8x8_msa)
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred8, vpx_dc_predictor_8x8_msa,
|
||||
vpx_dc_left_predictor_8x8_msa, vpx_dc_top_predictor_8x8_msa,
|
||||
vpx_dc_128_predictor_8x8_msa, vpx_v_predictor_8x8_msa,
|
||||
vpx_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vpx_tm_predictor_8x8_msa)
|
||||
#endif // HAVE_MSA
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// 16x16
|
||||
|
||||
INTRA_PRED_TEST(C, TestIntraPred16, vp9_dc_predictor_16x16_c,
|
||||
vp9_dc_left_predictor_16x16_c, vp9_dc_top_predictor_16x16_c,
|
||||
vp9_dc_128_predictor_16x16_c, vp9_v_predictor_16x16_c,
|
||||
vp9_h_predictor_16x16_c, vp9_d45_predictor_16x16_c,
|
||||
vp9_d135_predictor_16x16_c, vp9_d117_predictor_16x16_c,
|
||||
vp9_d153_predictor_16x16_c, vp9_d207_predictor_16x16_c,
|
||||
vp9_d63_predictor_16x16_c, vp9_tm_predictor_16x16_c)
|
||||
INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c,
|
||||
vpx_dc_left_predictor_16x16_c, vpx_dc_top_predictor_16x16_c,
|
||||
vpx_dc_128_predictor_16x16_c, vpx_v_predictor_16x16_c,
|
||||
vpx_h_predictor_16x16_c, vpx_d45_predictor_16x16_c,
|
||||
vpx_d135_predictor_16x16_c, vpx_d117_predictor_16x16_c,
|
||||
vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c,
|
||||
vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c)
|
||||
|
||||
#if HAVE_SSE2
|
||||
INTRA_PRED_TEST(SSE2, TestIntraPred16, vp9_dc_predictor_16x16_sse2,
|
||||
vp9_dc_left_predictor_16x16_sse2,
|
||||
vp9_dc_top_predictor_16x16_sse2,
|
||||
vp9_dc_128_predictor_16x16_sse2, vp9_v_predictor_16x16_sse2,
|
||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
|
||||
vpx_dc_left_predictor_16x16_sse2,
|
||||
vpx_dc_top_predictor_16x16_sse2,
|
||||
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_tm_predictor_16x16_sse2)
|
||||
#endif // HAVE_SSE2
|
||||
vpx_tm_predictor_16x16_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,
|
||||
vp9_h_predictor_16x16_ssse3, vp9_d45_predictor_16x16_ssse3,
|
||||
NULL, NULL, vp9_d153_predictor_16x16_ssse3,
|
||||
vp9_d207_predictor_16x16_ssse3, vp9_d63_predictor_16x16_ssse3,
|
||||
vpx_h_predictor_16x16_ssse3, vpx_d45_predictor_16x16_ssse3,
|
||||
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
|
||||
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
|
||||
NULL)
|
||||
#endif // HAVE_SSSE3
|
||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_DSPR2
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vp9_dc_predictor_16x16_dspr2, NULL,
|
||||
NULL, NULL, NULL, vp9_h_predictor_16x16_dspr2, NULL, NULL, NULL,
|
||||
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL,
|
||||
NULL, NULL, NULL, vpx_h_predictor_16x16_dspr2, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL)
|
||||
#endif // HAVE_DSPR2
|
||||
|
||||
#if HAVE_NEON
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred16, vp9_dc_predictor_16x16_neon,
|
||||
vp9_dc_left_predictor_16x16_neon,
|
||||
vp9_dc_top_predictor_16x16_neon,
|
||||
vp9_dc_128_predictor_16x16_neon, vp9_v_predictor_16x16_neon,
|
||||
vp9_h_predictor_16x16_neon, vp9_d45_predictor_16x16_neon, NULL,
|
||||
NULL, NULL, NULL, NULL, vp9_tm_predictor_16x16_neon)
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred16, vpx_dc_predictor_16x16_neon,
|
||||
vpx_dc_left_predictor_16x16_neon,
|
||||
vpx_dc_top_predictor_16x16_neon,
|
||||
vpx_dc_128_predictor_16x16_neon, vpx_v_predictor_16x16_neon,
|
||||
vpx_h_predictor_16x16_neon, vpx_d45_predictor_16x16_neon, NULL,
|
||||
NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_neon)
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_MSA
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred16, vp9_dc_predictor_16x16_msa,
|
||||
vp9_dc_left_predictor_16x16_msa, vp9_dc_top_predictor_16x16_msa,
|
||||
vp9_dc_128_predictor_16x16_msa, vp9_v_predictor_16x16_msa,
|
||||
vp9_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vp9_tm_predictor_16x16_msa)
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred16, vpx_dc_predictor_16x16_msa,
|
||||
vpx_dc_left_predictor_16x16_msa, vpx_dc_top_predictor_16x16_msa,
|
||||
vpx_dc_128_predictor_16x16_msa, vpx_v_predictor_16x16_msa,
|
||||
vpx_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vpx_tm_predictor_16x16_msa)
|
||||
#endif // HAVE_MSA
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// 32x32
|
||||
|
||||
INTRA_PRED_TEST(C, TestIntraPred32, vp9_dc_predictor_32x32_c,
|
||||
vp9_dc_left_predictor_32x32_c, vp9_dc_top_predictor_32x32_c,
|
||||
vp9_dc_128_predictor_32x32_c, vp9_v_predictor_32x32_c,
|
||||
vp9_h_predictor_32x32_c, vp9_d45_predictor_32x32_c,
|
||||
vp9_d135_predictor_32x32_c, vp9_d117_predictor_32x32_c,
|
||||
vp9_d153_predictor_32x32_c, vp9_d207_predictor_32x32_c,
|
||||
vp9_d63_predictor_32x32_c, vp9_tm_predictor_32x32_c)
|
||||
INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
|
||||
vpx_dc_left_predictor_32x32_c, vpx_dc_top_predictor_32x32_c,
|
||||
vpx_dc_128_predictor_32x32_c, vpx_v_predictor_32x32_c,
|
||||
vpx_h_predictor_32x32_c, vpx_d45_predictor_32x32_c,
|
||||
vpx_d135_predictor_32x32_c, vpx_d117_predictor_32x32_c,
|
||||
vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c,
|
||||
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
|
||||
|
||||
#if HAVE_SSE2
|
||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
#if ARCH_X86_64
|
||||
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,
|
||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
||||
vpx_dc_left_predictor_32x32_sse2,
|
||||
vpx_dc_top_predictor_32x32_sse2,
|
||||
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_tm_predictor_32x32_sse2)
|
||||
vpx_tm_predictor_32x32_sse2)
|
||||
#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,
|
||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
||||
vpx_dc_left_predictor_32x32_sse2,
|
||||
vpx_dc_top_predictor_32x32_sse2,
|
||||
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
||||
#endif // ARCH_X86_64
|
||||
#endif // HAVE_SSE2
|
||||
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_SSSE3
|
||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_h_predictor_32x32_ssse3, vp9_d45_predictor_32x32_ssse3,
|
||||
NULL, NULL, vp9_d153_predictor_32x32_ssse3,
|
||||
vp9_d207_predictor_32x32_ssse3, vp9_d63_predictor_32x32_ssse3,
|
||||
vpx_h_predictor_32x32_ssse3, vpx_d45_predictor_32x32_ssse3,
|
||||
NULL, NULL, vpx_d153_predictor_32x32_ssse3,
|
||||
vpx_d207_predictor_32x32_ssse3, vpx_d63_predictor_32x32_ssse3,
|
||||
NULL)
|
||||
#endif // HAVE_SSSE3
|
||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||
|
||||
#if HAVE_NEON
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred32, vp9_dc_predictor_32x32_neon,
|
||||
vp9_dc_left_predictor_32x32_neon,
|
||||
vp9_dc_top_predictor_32x32_neon,
|
||||
vp9_dc_128_predictor_32x32_neon, vp9_v_predictor_32x32_neon,
|
||||
vp9_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
vp9_tm_predictor_32x32_neon)
|
||||
INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon,
|
||||
vpx_dc_left_predictor_32x32_neon,
|
||||
vpx_dc_top_predictor_32x32_neon,
|
||||
vpx_dc_128_predictor_32x32_neon, vpx_v_predictor_32x32_neon,
|
||||
vpx_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
vpx_tm_predictor_32x32_neon)
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_MSA
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred32, vp9_dc_predictor_32x32_msa,
|
||||
vp9_dc_left_predictor_32x32_msa, vp9_dc_top_predictor_32x32_msa,
|
||||
vp9_dc_128_predictor_32x32_msa, vp9_v_predictor_32x32_msa,
|
||||
vp9_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vp9_tm_predictor_32x32_msa)
|
||||
INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
|
||||
vpx_dc_left_predictor_32x32_msa, vpx_dc_top_predictor_32x32_msa,
|
||||
vpx_dc_128_predictor_32x32_msa, vpx_v_predictor_32x32_msa,
|
||||
vpx_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, vpx_tm_predictor_32x32_msa)
|
||||
#endif // HAVE_MSA
|
||||
|
||||
#include "test/test_libvpx.cc"
|
||||
|
@@ -8,6 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#include <string>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#include "vpx_ports/x86.h"
|
||||
@@ -22,8 +25,8 @@ extern void vp9_rtcd();
|
||||
extern void vpx_dsp_rtcd();
|
||||
extern void vpx_scale_rtcd();
|
||||
}
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
static void append_negative_gtest_filter(const char *str) {
|
||||
std::string filter = ::testing::FLAGS_gtest_filter;
|
||||
// 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;
|
||||
::testing::FLAGS_gtest_filter = filter;
|
||||
}
|
||||
#endif // ARCH_X86 || ARCH_X86_64
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
@@ -53,7 +57,7 @@ int main(int argc, char **argv) {
|
||||
append_negative_gtest_filter(":AVX.*:AVX/*");
|
||||
if (!(simd_caps & HAS_AVX2))
|
||||
append_negative_gtest_filter(":AVX2.*:AVX2/*");
|
||||
#endif
|
||||
#endif // ARCH_X86 || ARCH_X86_64
|
||||
|
||||
#if !CONFIG_SHARED
|
||||
// Shared library builds don't support whitebox tests
|
||||
|
@@ -144,7 +144,7 @@ VP8_INSTANTIATE_TEST_CASE(
|
||||
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
|
||||
libvpx_test::kVP8TestVectors +
|
||||
libvpx_test::kNumVP8TestVectors)));
|
||||
#endif
|
||||
#endif // CONFIG_VP8_DECODER
|
||||
|
||||
// Test VP9 decode in serial mode with single thread.
|
||||
#if CONFIG_VP9_DECODER
|
||||
|
@@ -104,4 +104,5 @@ TEST_P(TileIndependenceTest, MD5Match) {
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||
|
||||
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||
} // namespace
|
||||
|
@@ -19,8 +19,7 @@
|
||||
// Macros
|
||||
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
|
||||
|
||||
static double compute_psnr(const vpx_image_t *img1,
|
||||
const vpx_image_t *img2) {
|
||||
inline double compute_psnr(const vpx_image_t *img1, const vpx_image_t *img2) {
|
||||
assert((img1->fmt == img2->fmt) &&
|
||||
(img1->d_w == img2->d_w) &&
|
||||
(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_
|
||||
|
||||
#if defined(_WIN32)
|
||||
#undef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <cstdio>
|
||||
@@ -48,7 +51,7 @@ static std::string GetDataPath() {
|
||||
#undef TO_STRING
|
||||
#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;
|
||||
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 <sys/types.h>
|
||||
|
||||
#include "test/acm_random.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/encoder/boolhuff.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
namespace {
|
||||
const int num_tests = 10;
|
||||
|
@@ -15,10 +15,10 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "./vp8_rtcd.h"
|
||||
|
||||
#include "test/acm_random.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vp8_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
namespace {
|
||||
|
@@ -8,12 +8,13 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/util.h"
|
||||
#include "test/y4m_video_source.h"
|
||||
#include "test/yuv_video_source.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vp9/encoder/vp9_ratectrl.h"
|
||||
|
||||
namespace {
|
||||
@@ -108,7 +109,7 @@ class ArfFreqTest
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int) {
|
||||
min_arf_ = ARF_NOT_SEEN;
|
||||
min_run_ = ARF_NOT_SEEN;
|
||||
run_of_visible_frames_ = 0;
|
||||
}
|
||||
|
||||
@@ -137,15 +138,15 @@ class ArfFreqTest
|
||||
if (frames == 1) {
|
||||
run_of_visible_frames_++;
|
||||
} else if (frames == 2) {
|
||||
if (min_arf_ == ARF_NOT_SEEN) {
|
||||
min_arf_ = ARF_SEEN_ONCE;
|
||||
} else if (min_arf_ == ARF_SEEN_ONCE ||
|
||||
run_of_visible_frames_ < min_arf_) {
|
||||
min_arf_ = run_of_visible_frames_;
|
||||
if (min_run_ == ARF_NOT_SEEN) {
|
||||
min_run_ = ARF_SEEN_ONCE;
|
||||
} else if (min_run_ == ARF_SEEN_ONCE ||
|
||||
run_of_visible_frames_ < min_run_) {
|
||||
min_run_ = run_of_visible_frames_;
|
||||
}
|
||||
run_of_visible_frames_ = 1;
|
||||
} else {
|
||||
min_arf_ = 0;
|
||||
min_run_ = 0;
|
||||
run_of_visible_frames_ = 1;
|
||||
}
|
||||
}
|
||||
@@ -166,8 +167,8 @@ class ArfFreqTest
|
||||
}
|
||||
}
|
||||
|
||||
int GetMinArfDistance() const {
|
||||
return min_arf_;
|
||||
int GetMinVisibleRun() const {
|
||||
return min_run_;
|
||||
}
|
||||
|
||||
int GetMinArfDistanceRequested() const {
|
||||
@@ -185,7 +186,7 @@ class ArfFreqTest
|
||||
|
||||
private:
|
||||
int min_arf_requested_;
|
||||
int min_arf_;
|
||||
int min_run_;
|
||||
int run_of_visible_frames_;
|
||||
};
|
||||
|
||||
@@ -214,9 +215,10 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
|
||||
}
|
||||
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
const int min_arf_dist = GetMinArfDistance();
|
||||
const int min_run = GetMinVisibleRun();
|
||||
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);
|
||||
}
|
||||
delete(video);
|
||||
@@ -227,4 +229,24 @@ VP9_INSTANTIATE_TEST_CASE(
|
||||
::testing::ValuesIn(kTestVectors),
|
||||
::testing::ValuesIn(kEncodeVectors),
|
||||
::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
|
||||
|
@@ -8,22 +8,22 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#if CONFIG_VP9_ENCODER
|
||||
#include "./vp9_rtcd.h"
|
||||
#endif
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
using libvpx_test::ACMRandom;
|
||||
|
||||
@@ -286,6 +286,17 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_neon),
|
||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_neon)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, IntProRowTest, ::testing::Values(
|
||||
make_tuple(16, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
|
||||
make_tuple(32, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
|
||||
make_tuple(64, &vp9_int_pro_row_neon, &vp9_int_pro_row_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
NEON, IntProColTest, ::testing::Values(
|
||||
make_tuple(16, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
|
||||
make_tuple(32, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
|
||||
make_tuple(64, &vp9_int_pro_col_neon, &vp9_int_pro_col_c)));
|
||||
#endif
|
||||
|
||||
#if HAVE_MSA
|
||||
|
@@ -14,11 +14,10 @@
|
||||
|
||||
#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 "vpx/vpx_integer.h"
|
||||
#include "vpx_dsp/bitreader.h"
|
||||
#include "vpx_dsp/bitwriter.h"
|
||||
|
||||
using libvpx_test::ACMRandom;
|
||||
|
||||
@@ -50,9 +49,9 @@ TEST(VP9, TestBitIO) {
|
||||
const int random_seed = 6432;
|
||||
const int kBufferSize = 10000;
|
||||
ACMRandom bit_rnd(random_seed);
|
||||
vp9_writer bw;
|
||||
vpx_writer bw;
|
||||
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;
|
||||
for (int i = 0; i < kBitsToTest; ++i) {
|
||||
@@ -61,16 +60,16 @@ TEST(VP9, TestBitIO) {
|
||||
} else if (bit_method == 3) {
|
||||
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
|
||||
GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
|
||||
|
||||
vp9_reader br;
|
||||
vp9_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
|
||||
vpx_reader br;
|
||||
vpx_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
|
||||
bit_rnd.Reset(random_seed);
|
||||
for (int i = 0; i < kBitsToTest; ++i) {
|
||||
if (bit_method == 2) {
|
||||
@@ -78,7 +77,7 @@ TEST(VP9, TestBitIO) {
|
||||
} else if (bit_method == 3) {
|
||||
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
|
||||
<< " bit_method: " << bit_method
|
||||
<< " method: " << method;
|
||||
|
@@ -8,43 +8,16 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/y4m_video_source.h"
|
||||
#include "test/yuv_video_source.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "vp9/decoder/vp9_decoder.h"
|
||||
|
||||
typedef vpx_codec_stream_info_t vp9_stream_info_t;
|
||||
struct vpx_codec_alg_priv {
|
||||
vpx_codec_priv_t base;
|
||||
vpx_codec_dec_cfg_t cfg;
|
||||
vp9_stream_info_t si;
|
||||
struct VP9Decoder *pbi;
|
||||
int postproc_cfg_set;
|
||||
vp8_postproc_cfg_t postproc_cfg;
|
||||
vpx_decrypt_cb decrypt_cb;
|
||||
void *decrypt_state;
|
||||
vpx_image_t img;
|
||||
int img_avail;
|
||||
int flushed;
|
||||
int invert_tile_order;
|
||||
int frame_parallel_decode;
|
||||
|
||||
// External frame buffer info to save for VP9 common.
|
||||
void *ext_priv; // Private data associated with the external frame buffers.
|
||||
vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb;
|
||||
vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb;
|
||||
};
|
||||
|
||||
static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
|
||||
return (vpx_codec_alg_priv_t *)ctx->priv;
|
||||
}
|
||||
#include "test/y4m_video_source.h"
|
||||
#include "vp9/vp9_dx_iface.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const unsigned int kFramerate = 50;
|
||||
const int kCpuUsed = 2;
|
||||
|
||||
struct EncodePerfTestVideo {
|
||||
@@ -65,37 +38,29 @@ struct EncodeParameters {
|
||||
int32_t lossless;
|
||||
int32_t error_resilient;
|
||||
int32_t frame_parallel;
|
||||
vpx_color_range_t color_range;
|
||||
vpx_color_space_t cs;
|
||||
int render_size[2];
|
||||
// TODO(JBB): quantizers / bitrate
|
||||
};
|
||||
|
||||
const EncodeParameters kVP9EncodeParameterSet[] = {
|
||||
{0, 0, 0, 1, 0, VPX_CS_BT_601},
|
||||
{0, 0, 0, 0, 0, VPX_CS_BT_709},
|
||||
{0, 0, 1, 0, 0, VPX_CS_BT_2020},
|
||||
{0, 2, 0, 0, 1, VPX_CS_UNKNOWN},
|
||||
{0, 0, 0, 1, 0, VPX_CR_STUDIO_RANGE, VPX_CS_BT_601},
|
||||
{0, 0, 0, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_709},
|
||||
{0, 0, 1, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_2020},
|
||||
{0, 2, 0, 0, 1, VPX_CR_STUDIO_RANGE, VPX_CS_UNKNOWN, { 640, 480 }},
|
||||
// TODO(JBB): Test profiles (requires more work).
|
||||
};
|
||||
|
||||
int is_extension_y4m(const char *filename) {
|
||||
const char *dot = strrchr(filename, '.');
|
||||
if (!dot || dot == filename)
|
||||
return 0;
|
||||
else
|
||||
return !strcmp(dot, ".y4m");
|
||||
}
|
||||
|
||||
class Vp9EncoderParmsGetToDecoder
|
||||
class VpxEncoderParmsGetToDecoder
|
||||
: public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
|
||||
public ::libvpx_test::CodecTestWith2Params<EncodeParameters,
|
||||
EncodePerfTestVideo> {
|
||||
protected:
|
||||
Vp9EncoderParmsGetToDecoder()
|
||||
: EncoderTest(GET_PARAM(0)),
|
||||
encode_parms(GET_PARAM(1)) {
|
||||
}
|
||||
VpxEncoderParmsGetToDecoder()
|
||||
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
|
||||
|
||||
virtual ~Vp9EncoderParmsGetToDecoder() {}
|
||||
virtual ~VpxEncoderParmsGetToDecoder() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
@@ -111,6 +76,7 @@ class Vp9EncoderParmsGetToDecoder
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
||||
encoder->Control(VP9E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
||||
encode_parms.frame_parallel);
|
||||
@@ -121,37 +87,44 @@ class Vp9EncoderParmsGetToDecoder
|
||||
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0)
|
||||
encoder->Control(VP9E_SET_RENDER_SIZE, encode_parms.render_size);
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource& video,
|
||||
const libvpx_test::VideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
vpx_codec_ctx_t* vp9_decoder = decoder->GetDecoder();
|
||||
vpx_codec_alg_priv_t* priv =
|
||||
(vpx_codec_alg_priv_t*) get_alg_priv(vp9_decoder);
|
||||
|
||||
VP9Decoder* pbi = priv->pbi;
|
||||
VP9_COMMON* common = &pbi->common;
|
||||
vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder();
|
||||
vpx_codec_alg_priv_t *const priv =
|
||||
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
|
||||
FrameWorkerData *const worker_data =
|
||||
reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1);
|
||||
VP9_COMMON *const common = &worker_data->pbi->common;
|
||||
|
||||
if (encode_parms.lossless) {
|
||||
EXPECT_EQ(common->base_qindex, 0);
|
||||
EXPECT_EQ(common->y_dc_delta_q, 0);
|
||||
EXPECT_EQ(common->uv_dc_delta_q, 0);
|
||||
EXPECT_EQ(common->uv_ac_delta_q, 0);
|
||||
EXPECT_EQ(common->tx_mode, ONLY_4X4);
|
||||
EXPECT_EQ(0, common->base_qindex);
|
||||
EXPECT_EQ(0, common->y_dc_delta_q);
|
||||
EXPECT_EQ(0, common->uv_dc_delta_q);
|
||||
EXPECT_EQ(0, common->uv_ac_delta_q);
|
||||
EXPECT_EQ(ONLY_4X4, common->tx_mode);
|
||||
}
|
||||
EXPECT_EQ(common->error_resilient_mode, encode_parms.error_resilient);
|
||||
EXPECT_EQ(encode_parms.error_resilient, common->error_resilient_mode);
|
||||
if (encode_parms.error_resilient) {
|
||||
EXPECT_EQ(common->frame_parallel_decoding_mode, 1);
|
||||
EXPECT_EQ(common->use_prev_frame_mvs, 0);
|
||||
EXPECT_EQ(1, common->frame_parallel_decoding_mode);
|
||||
EXPECT_EQ(0, common->use_prev_frame_mvs);
|
||||
} else {
|
||||
EXPECT_EQ(common->frame_parallel_decoding_mode,
|
||||
encode_parms.frame_parallel);
|
||||
EXPECT_EQ(encode_parms.frame_parallel,
|
||||
common->frame_parallel_decoding_mode);
|
||||
}
|
||||
EXPECT_EQ(common->color_space, encode_parms.cs);
|
||||
EXPECT_EQ(common->log2_tile_cols, encode_parms.tile_cols);
|
||||
EXPECT_EQ(common->log2_tile_rows, encode_parms.tile_rows);
|
||||
EXPECT_EQ(encode_parms.color_range, common->color_range);
|
||||
EXPECT_EQ(encode_parms.cs, common->color_space);
|
||||
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0) {
|
||||
EXPECT_EQ(encode_parms.render_size[0], common->render_width);
|
||||
EXPECT_EQ(encode_parms.render_size[1], common->render_height);
|
||||
}
|
||||
EXPECT_EQ(encode_parms.tile_cols, common->log2_tile_cols);
|
||||
EXPECT_EQ(encode_parms.tile_rows, common->log2_tile_rows);
|
||||
|
||||
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
||||
return VPX_CODEC_OK == res_dec;
|
||||
@@ -163,31 +136,18 @@ class Vp9EncoderParmsGetToDecoder
|
||||
EncodeParameters encode_parms;
|
||||
};
|
||||
|
||||
// TODO(hkuang): This test conflicts with frame parallel decode. So disable it
|
||||
// for now until fix.
|
||||
TEST_P(Vp9EncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
|
||||
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
|
||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||
|
||||
libvpx_test::VideoSource *video;
|
||||
if (is_extension_y4m(test_video_.name)) {
|
||||
video = new libvpx_test::Y4mVideoSource(test_video_.name,
|
||||
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);
|
||||
}
|
||||
libvpx_test::VideoSource *const video =
|
||||
new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
|
||||
ASSERT_TRUE(video != NULL);
|
||||
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||
delete(video);
|
||||
delete video;
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(
|
||||
Vp9EncoderParmsGetToDecoder,
|
||||
VP9_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
|
||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||
|
||||
} // namespace
|
||||
|
@@ -8,12 +8,13 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/util.h"
|
||||
#include "test/y4m_video_source.h"
|
||||
#include "test/yuv_video_source.h"
|
||||
#include "test/util.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -186,4 +187,23 @@ VP9_INSTANTIATE_TEST_CASE(
|
||||
::testing::ValuesIn(kTestVectors),
|
||||
::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
|
||||
|
@@ -14,12 +14,12 @@
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vpx/vpx_codec.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
@@ -67,12 +67,22 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
||||
int64_t ret;
|
||||
int64_t ref_ssz;
|
||||
int64_t ref_ret;
|
||||
const int msb = bit_depth_ + 8 - 1;
|
||||
for (int i = 0; i < kNumIterations; ++i) {
|
||||
int err_count = 0;
|
||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||
for (int j = 0; j < block_size; j++) {
|
||||
coeff[j] = rnd(2 << 20) - (1 << 20);
|
||||
dqcoeff[j] = rnd(2 << 20) - (1 << 20);
|
||||
// coeff and dqcoeff will always have at least the same sign, and this
|
||||
// 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,
|
||||
bit_depth_);
|
||||
@@ -85,7 +95,7 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
||||
err_count_total += err_count;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -100,23 +110,36 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
||||
int64_t ret;
|
||||
int64_t ref_ssz;
|
||||
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) {
|
||||
int err_count = 0;
|
||||
int k = (i / 9) % 5;
|
||||
int k = (i / 9) % 9;
|
||||
|
||||
// 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;
|
||||
}
|
||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||
for (int j = 0; j < block_size; j++) {
|
||||
if (k < 4) { // Test at maximum values
|
||||
coeff[j] = k % 2 ? max_val : -max_val;
|
||||
dqcoeff[j] = (k >> 1) % 2 ? max_val : -max_val;
|
||||
if (k < 4) {
|
||||
// Test at positive maximum values
|
||||
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 {
|
||||
coeff[j] = rnd(2 << 14) - (1 << 14);
|
||||
dqcoeff[j] = rnd(2 << 14) - (1 << 14);
|
||||
if (rnd(2)) {
|
||||
// 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,
|
||||
@@ -130,13 +153,30 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
||||
err_count_total += err_count;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
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(
|
||||
SSE2, ErrorBlockTest,
|
||||
::testing::Values(
|
||||
@@ -145,7 +185,27 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_highbd_block_error_sse2,
|
||||
&vp9_highbd_block_error_c, VPX_BITS_12),
|
||||
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
|
||||
|
||||
#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
|
||||
} // namespace
|
||||
|
@@ -18,11 +18,11 @@
|
||||
#include "test/y4m_video_source.h"
|
||||
|
||||
namespace {
|
||||
class VP9EncoderThreadTest
|
||||
class VPxEncoderThreadTest
|
||||
: public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
VP9EncoderThreadTest()
|
||||
VPxEncoderThreadTest()
|
||||
: EncoderTest(GET_PARAM(0)),
|
||||
encoder_initialized_(false),
|
||||
tiles_(2),
|
||||
@@ -36,7 +36,7 @@ class VP9EncoderThreadTest
|
||||
|
||||
md5_.clear();
|
||||
}
|
||||
virtual ~VP9EncoderThreadTest() {
|
||||
virtual ~VPxEncoderThreadTest() {
|
||||
delete decoder_;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class VP9EncoderThreadTest
|
||||
std::vector<std::string> md5_;
|
||||
};
|
||||
|
||||
TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
|
||||
TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
|
||||
std::vector<std::string> single_thr_md5, multi_thr_md5;
|
||||
|
||||
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 20);
|
||||
@@ -130,8 +130,13 @@ TEST_P(VP9EncoderThreadTest, EncoderResultTest) {
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(
|
||||
VP9EncoderThreadTest,
|
||||
VPxEncoderThreadTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kRealTime),
|
||||
::testing::Range(1, 9));
|
||||
|
||||
VP10_INSTANTIATE_TEST_CASE(
|
||||
VPxEncoderThreadTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
||||
::testing::Range(1, 3));
|
||||
} // namespace
|
||||
|
@@ -10,17 +10,17 @@
|
||||
|
||||
#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 "./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_pred_common.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "test/util.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -131,168 +131,171 @@ using std::tr1::make_tuple;
|
||||
|
||||
#if HAVE_SSE2
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
#if CONFIG_USE_X86INC
|
||||
#if ARCH_X86_64
|
||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
||||
&vp9_highbd_dc_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
||||
&vp9_highbd_tm_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
||||
&vp9_highbd_tm_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
||||
&vp9_highbd_dc_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
||||
&vp9_highbd_dc_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
||||
&vp9_highbd_dc_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
||||
&vp9_highbd_v_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
||||
&vp9_highbd_v_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
||||
&vp9_highbd_v_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
||||
&vp9_highbd_v_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
||||
&vp9_highbd_tm_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
||||
&vp9_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||
&vpx_highbd_dc_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_dc_predictor_4x4_sse,
|
||||
&vp9_highbd_dc_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_dc_predictor_8x8_sse2,
|
||||
&vp9_highbd_dc_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vp9_highbd_dc_predictor_16x16_sse2,
|
||||
&vp9_highbd_dc_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_4x4_sse,
|
||||
&vp9_highbd_v_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_8x8_sse2,
|
||||
&vp9_highbd_v_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_16x16_sse2,
|
||||
&vp9_highbd_v_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
||||
&vp9_highbd_v_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_4x4_sse,
|
||||
&vp9_highbd_tm_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vp9_highbd_tm_predictor_8x8_sse2,
|
||||
&vp9_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||
#endif
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||
#endif // !ARCH_X86_64
|
||||
|
||||
#if ARCH_X86_64
|
||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
||||
&vp9_highbd_dc_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||
10),
|
||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
||||
&vp9_highbd_tm_predictor_16x16_c, 16,
|
||||
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||
10),
|
||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
||||
&vp9_highbd_tm_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||
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,
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||
10),
|
||||
make_tuple(&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,
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16,
|
||||
10),
|
||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
||||
&vp9_highbd_v_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_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)));
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||
#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,
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||
10),
|
||||
make_tuple(&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
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16, 10),
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_highbd_v_predictor_32x32_c, 32, 10),
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||
#endif // !ARCH_X86_64
|
||||
|
||||
#if ARCH_X86_64
|
||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_dc_predictor_32x32_sse2,
|
||||
&vp9_highbd_dc_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||
&vpx_highbd_dc_predictor_32x32_c, 32,
|
||||
12),
|
||||
make_tuple(&vp9_highbd_tm_predictor_16x16_sse2,
|
||||
&vp9_highbd_tm_predictor_16x16_c, 16,
|
||||
make_tuple(&vpx_highbd_tm_predictor_16x16_sse2,
|
||||
&vpx_highbd_tm_predictor_16x16_c, 16,
|
||||
12),
|
||||
make_tuple(&vp9_highbd_tm_predictor_32x32_sse2,
|
||||
&vp9_highbd_tm_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||
12),
|
||||
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,
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||
12),
|
||||
make_tuple(&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,
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16,
|
||||
12),
|
||||
make_tuple(&vp9_highbd_v_predictor_32x32_sse2,
|
||||
&vp9_highbd_v_predictor_32x32_c, 32,
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_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)));
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
||||
::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,
|
||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
||||
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||
12),
|
||||
make_tuple(&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
|
||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
||||
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
||||
&vpx_highbd_v_predictor_16x16_c, 16, 12),
|
||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||
&vpx_highbd_v_predictor_32x32_c, 32, 12),
|
||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
||||
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
||||
#endif // !ARCH_X86_64
|
||||
#endif // CONFIG_USE_X86INC
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif // HAVE_SSE2
|
||||
} // namespace
|
||||
|
@@ -7,8 +7,10 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* 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 "./vpx_config.h"
|
||||
#include "test/codec_factory.h"
|
||||
#include "test/encode_test_driver.h"
|
||||
#include "test/i420_video_source.h"
|
||||
@@ -125,4 +127,8 @@ VP9_INSTANTIATE_TEST_CASE(LosslessTest,
|
||||
::testing::Values(::libvpx_test::kRealTime,
|
||||
::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kTwoPassGood));
|
||||
|
||||
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
|
||||
::testing::Values(::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kTwoPassGood));
|
||||
} // namespace
|
||||
|
@@ -14,12 +14,12 @@
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "test/util.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_entropy.h"
|
||||
#include "vp9/common/vp9_scan.h"
|
||||
#include "vpx/vpx_codec.h"
|
||||
@@ -331,21 +331,21 @@ using std::tr1::make_tuple;
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, VP9QuantizeTest,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
||||
&vp9_highbd_quantize_b_c, VPX_BITS_8),
|
||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
||||
&vp9_highbd_quantize_b_c, VPX_BITS_10),
|
||||
make_tuple(&vp9_highbd_quantize_b_sse2,
|
||||
&vp9_highbd_quantize_b_c, VPX_BITS_12)));
|
||||
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||
&vpx_highbd_quantize_b_c, VPX_BITS_8),
|
||||
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||
&vpx_highbd_quantize_b_c, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_quantize_b_sse2,
|
||||
&vpx_highbd_quantize_b_c, VPX_BITS_12)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, VP9Quantize32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_8),
|
||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_10),
|
||||
make_tuple(&vp9_highbd_quantize_b_32x32_sse2,
|
||||
&vp9_highbd_quantize_b_32x32_c, VPX_BITS_12)));
|
||||
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_8),
|
||||
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
|
||||
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_12)));
|
||||
#endif // HAVE_SSE2
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
} // namespace
|
||||
|
@@ -9,11 +9,13 @@
|
||||
*/
|
||||
|
||||
#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/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./vp9_rtcd.h"
|
||||
#include "vp9/common/vp9_blockd.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
@@ -89,15 +91,19 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
|
||||
::testing::Values(vp9_subtract_block_c));
|
||||
::testing::Values(vpx_subtract_block_c));
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
|
||||
::testing::Values(vp9_subtract_block_sse2));
|
||||
::testing::Values(vpx_subtract_block_sse2));
|
||||
#endif
|
||||
#if HAVE_NEON
|
||||
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
|
||||
|
||||
} // namespace vp9
|
||||
|
@@ -18,33 +18,33 @@
|
||||
#if CONFIG_WEBM_IO
|
||||
#include "test/webm_video_source.h"
|
||||
#endif
|
||||
#include "vp9/common/vp9_thread.h"
|
||||
#include "vpx_util/vpx_thread.h"
|
||||
|
||||
namespace {
|
||||
|
||||
using std::string;
|
||||
|
||||
class VP9WorkerThreadTest : public ::testing::TestWithParam<bool> {
|
||||
class VPxWorkerThreadTest : public ::testing::TestWithParam<bool> {
|
||||
protected:
|
||||
virtual ~VP9WorkerThreadTest() {}
|
||||
virtual ~VPxWorkerThreadTest() {}
|
||||
virtual void SetUp() {
|
||||
vp9_get_worker_interface()->init(&worker_);
|
||||
vpx_get_worker_interface()->init(&worker_);
|
||||
}
|
||||
|
||||
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();
|
||||
if (synchronous) {
|
||||
vp9_get_worker_interface()->execute(worker);
|
||||
vpx_get_worker_interface()->execute(worker);
|
||||
} else {
|
||||
vp9_get_worker_interface()->launch(worker);
|
||||
vpx_get_worker_interface()->launch(worker);
|
||||
}
|
||||
}
|
||||
|
||||
VP9Worker worker_;
|
||||
VPxWorker worker_;
|
||||
};
|
||||
|
||||
int ThreadHook(void* data, void* return_value) {
|
||||
@@ -53,12 +53,12 @@ int ThreadHook(void* data, void* return_value) {
|
||||
return *reinterpret_cast<int*>(return_value);
|
||||
}
|
||||
|
||||
TEST_P(VP9WorkerThreadTest, HookSuccess) {
|
||||
TEST_P(VPxWorkerThreadTest, HookSuccess) {
|
||||
// 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) {
|
||||
EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
|
||||
EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
|
||||
|
||||
int hook_data = 0;
|
||||
int return_value = 1; // return successfully from the hook
|
||||
@@ -67,17 +67,17 @@ TEST_P(VP9WorkerThreadTest, HookSuccess) {
|
||||
worker_.data2 = &return_value;
|
||||
|
||||
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_EQ(5, hook_data);
|
||||
|
||||
// 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) {
|
||||
EXPECT_NE(vp9_get_worker_interface()->reset(&worker_), 0);
|
||||
TEST_P(VPxWorkerThreadTest, HookFailure) {
|
||||
EXPECT_NE(vpx_get_worker_interface()->reset(&worker_), 0);
|
||||
|
||||
int hook_data = 0;
|
||||
int return_value = 0; // return failure from the hook
|
||||
@@ -86,29 +86,29 @@ TEST_P(VP9WorkerThreadTest, HookFailure) {
|
||||
worker_.data2 = &return_value;
|
||||
|
||||
Run(&worker_);
|
||||
EXPECT_FALSE(vp9_get_worker_interface()->sync(&worker_));
|
||||
EXPECT_FALSE(vpx_get_worker_interface()->sync(&worker_));
|
||||
EXPECT_EQ(1, worker_.had_error);
|
||||
|
||||
// Ensure _reset() clears the error and _launch() can be called again.
|
||||
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);
|
||||
vp9_get_worker_interface()->launch(&worker_);
|
||||
EXPECT_NE(vp9_get_worker_interface()->sync(&worker_), 0);
|
||||
vpx_get_worker_interface()->launch(&worker_);
|
||||
EXPECT_NE(vpx_get_worker_interface()->sync(&worker_), 0);
|
||||
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
|
||||
// race. Doing more work in the hook is no guarantee as any race would occur
|
||||
// post hook execution in the main thread loop driver.
|
||||
static const int kNumWorkers = 64;
|
||||
VP9Worker workers[kNumWorkers];
|
||||
VPxWorker workers[kNumWorkers];
|
||||
int hook_data[kNumWorkers];
|
||||
int return_value[kNumWorkers];
|
||||
|
||||
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
|
||||
workers[n].hook = ThreadHook;
|
||||
workers[n].data1 = &hook_data[n];
|
||||
@@ -117,7 +117,7 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -126,16 +126,16 @@ TEST_P(VP9WorkerThreadTest, EndWithoutSync) {
|
||||
}
|
||||
|
||||
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) {
|
||||
EXPECT_EQ(0, vp9_set_worker_interface(NULL));
|
||||
EXPECT_TRUE(vp9_get_worker_interface() != NULL);
|
||||
TEST(VPxWorkerThreadTest, TestInterfaceAPI) {
|
||||
EXPECT_EQ(0, vpx_set_worker_interface(NULL));
|
||||
EXPECT_TRUE(vpx_get_worker_interface() != NULL);
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
VP9WorkerInterface winterface = *vp9_get_worker_interface();
|
||||
VPxWorkerInterface winterface = *vpx_get_worker_interface();
|
||||
switch (i) {
|
||||
default:
|
||||
case 0: winterface.init = NULL; break;
|
||||
@@ -145,7 +145,7 @@ TEST(VP9WorkerThreadTest, TestInterfaceAPI) {
|
||||
case 4: winterface.execute = 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[]) {
|
||||
for (const FileList *iter = files; iter->name != NULL; ++iter) {
|
||||
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))
|
||||
<< "threads = " << t;
|
||||
}
|
||||
@@ -202,21 +202,21 @@ void DecodeFiles(const FileList files[]) {
|
||||
// hang.
|
||||
namespace impl {
|
||||
|
||||
void Init(VP9Worker *const worker) { memset(worker, 0, sizeof(*worker)); }
|
||||
int Reset(VP9Worker *const /*worker*/) { return 1; }
|
||||
int Sync(VP9Worker *const worker) { return !worker->had_error; }
|
||||
void Init(VPxWorker *const worker) { memset(worker, 0, sizeof(*worker)); }
|
||||
int Reset(VPxWorker *const /*worker*/) { return 1; }
|
||||
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);
|
||||
}
|
||||
|
||||
void Launch(VP9Worker *const worker) { Execute(worker); }
|
||||
void End(VP9Worker *const /*worker*/) {}
|
||||
void Launch(VPxWorker *const worker) { Execute(worker); }
|
||||
void End(VPxWorker *const /*worker*/) {}
|
||||
|
||||
} // namespace impl
|
||||
|
||||
TEST(VP9WorkerThreadTest, TestSerialInterface) {
|
||||
static const VP9WorkerInterface serial_interface = {
|
||||
TEST(VPxWorkerThreadTest, TestSerialInterface) {
|
||||
static const VPxWorkerInterface serial_interface = {
|
||||
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
|
||||
@@ -225,23 +225,23 @@ TEST(VP9WorkerThreadTest, TestSerialInterface) {
|
||||
// progress in the row above before proceeding.
|
||||
static const char expected_md5[] = "b35a1b707b28e82be025d960aba039bc";
|
||||
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));
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
TEST(VP9DecodeMultiThreadedTest, Decode) {
|
||||
TEST(VP9DecodeMultiThreadedTest, NoTilesNonFrameParallel) {
|
||||
// no tiles or frame parallel; this exercises loop filter threading.
|
||||
EXPECT_EQ("b35a1b707b28e82be025d960aba039bc",
|
||||
DecodeFile("vp90-2-03-size-226x226.webm", 2));
|
||||
}
|
||||
|
||||
TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
||||
TEST(VP9DecodeMultiThreadedTest, FrameParallel) {
|
||||
static const FileList files[] = {
|
||||
{ "vp90-2-08-tile_1x2_frame_parallel.webm",
|
||||
"68ede6abd66bae0a2edf2eb9232241b6" },
|
||||
@@ -255,8 +255,7 @@ TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
||||
DecodeFiles(files);
|
||||
}
|
||||
|
||||
// Test tile quantity changes within one file.
|
||||
TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
||||
TEST(VP9DecodeMultiThreadedTest, FrameParallelResize) {
|
||||
static const FileList files[] = {
|
||||
{ "vp90-2-14-resize-fp-tiles-1-16.webm",
|
||||
"0cd5e632c326297e975f38949c31ea94" },
|
||||
@@ -307,8 +306,21 @@ TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
||||
|
||||
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
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool());
|
||||
INSTANTIATE_TEST_CASE_P(Synchronous, VPxWorkerThreadTest, ::testing::Bool());
|
||||
|
||||
} // namespace
|
||||
|
@@ -10,11 +10,10 @@
|
||||
|
||||
#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_scale_rtcd.h"
|
||||
#include "test/clear_system_state.h"
|
||||
#include "test/register_state_check.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
|
@@ -9,12 +9,14 @@
|
||||
*/
|
||||
|
||||
#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/util.h"
|
||||
#include "test/y4m_video_source.h"
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./y4menc.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#ifndef TEST_Y4M_VIDEO_SOURCE_H_
|
||||
#define TEST_Y4M_VIDEO_SOURCE_H_
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "test/video_source.h"
|
||||
@@ -91,6 +92,18 @@ class Y4mVideoSource : public VideoSource {
|
||||
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:
|
||||
void CloseSource() {
|
||||
y4m_input_close(&y4m_);
|
||||
|
13
third_party/libwebm/Android.mk
vendored
13
third_party/libwebm/Android.mk
vendored
@@ -1,11 +1,10 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
LOCAL_SRC_FILES := mkvmuxer.cpp \
|
||||
mkvmuxerutil.cpp \
|
||||
mkvparser.cpp \
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:= libwebm
|
||||
LOCAL_SRC_FILES:= mkvparser.cpp \
|
||||
mkvreader.cpp \
|
||||
mkvmuxer.cpp \
|
||||
mkvmuxerutil.cpp \
|
||||
mkvwriter.cpp
|
||||
LOCAL_MODULE := libwebm
|
||||
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
|
||||
counterclaim in a lawsuit) alleging that 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
|
||||
for these implementations of WebM shall terminate as of the date such
|
||||
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
|
||||
Version: 249629d46c6e9391f25a90cff6d19075f47474cb
|
||||
Version: 476366249e1fda7710a389cd41c57db42305e0d4
|
||||
License: BSD
|
||||
License File: LICENSE.txt
|
||||
|
||||
Description:
|
||||
libwebm is used to handle WebM container I/O.
|
||||
|
||||
Local Changes:
|
||||
* <none>
|
||||
|
922
third_party/libwebm/mkvmuxer.cpp
vendored
922
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 Segment;
|
||||
|
||||
const uint64 kMaxTrackNumber = 126;
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Interface used by the mkvmuxer to write out the Mkv data.
|
||||
class IMkvWriter {
|
||||
@@ -57,6 +59,10 @@ class IMkvWriter {
|
||||
|
||||
// Writes out the EBML header for a WebM file. This function must be 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);
|
||||
|
||||
// Copies in Chunk from source to destination between the given byte positions
|
||||
@@ -70,12 +76,23 @@ class 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.
|
||||
bool Init(const uint8* frame, uint64 length);
|
||||
|
||||
// Copies |additional| data into |additional_|. Returns true on success.
|
||||
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_; }
|
||||
const uint8* additional() const { return additional_; }
|
||||
uint64 additional_length() const { return additional_length_; }
|
||||
@@ -89,10 +106,15 @@ class Frame {
|
||||
uint64 track_number() const { return track_number_; }
|
||||
void set_timestamp(uint64 timestamp) { timestamp_ = timestamp; }
|
||||
uint64 timestamp() const { return timestamp_; }
|
||||
void set_discard_padding(uint64 discard_padding) {
|
||||
void set_discard_padding(int64 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:
|
||||
// Id of the Additional data.
|
||||
@@ -124,6 +146,14 @@ class Frame {
|
||||
|
||||
// Discard padding for the frame.
|
||||
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_; }
|
||||
void set_display_width(uint64 width) { display_width_ = 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; }
|
||||
double frame_rate() const { return frame_rate_; }
|
||||
void set_height(uint64 height) { height_ = height; }
|
||||
@@ -438,6 +478,10 @@ class VideoTrack : public Track {
|
||||
// Video track element names.
|
||||
uint64 display_height_;
|
||||
uint64 display_width_;
|
||||
uint64 crop_left_;
|
||||
uint64 crop_right_;
|
||||
uint64 crop_top_;
|
||||
uint64 crop_bottom_;
|
||||
double frame_rate_;
|
||||
uint64 height_;
|
||||
uint64 stereo_mode_;
|
||||
@@ -484,11 +528,12 @@ class Tracks {
|
||||
public:
|
||||
// Audio and video type defined by the Matroska specs.
|
||||
enum { kVideo = 0x1, kAudio = 0x2 };
|
||||
// Opus, Vorbis, VP8, and VP9 codec ids defined by the Matroska specs.
|
||||
|
||||
static const char kOpusCodecId[];
|
||||
static const char kVorbisCodecId[];
|
||||
static const char kVp8CodecId[];
|
||||
static const char kVp9CodecId[];
|
||||
static const char kVp10CodecId[];
|
||||
|
||||
Tracks();
|
||||
~Tracks();
|
||||
@@ -692,6 +737,112 @@ class 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
|
||||
//
|
||||
@@ -699,32 +850,36 @@ class Chapters {
|
||||
// |Init| must be called before any other method in this class.
|
||||
class Cluster {
|
||||
public:
|
||||
Cluster(uint64 timecode, int64 cues_pos);
|
||||
~Cluster();
|
||||
|
||||
// |timecode| is the absolute timecode of the cluster. |cues_pos| is the
|
||||
// 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);
|
||||
|
||||
// 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
|
||||
// |writer_| if successful. Returns true on success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data
|
||||
// data: Pointer to the data
|
||||
// length: Length of the data
|
||||
// track_number: Track to add the data to. Value returned by Add track
|
||||
// functions. The range of allowed values is [1, 126].
|
||||
// timecode: Absolute (not relative to cluster) timestamp of the
|
||||
// frame, expressed in timecode units.
|
||||
// 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)
|
||||
bool is_key);
|
||||
|
||||
// Adds a frame to be output in the file. The frame is written out through
|
||||
// |writer_| if successful. Returns true on success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data
|
||||
// data: Pointer to the data
|
||||
// length: Length of the data
|
||||
// additional: Pointer to 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
|
||||
// frame, expressed in timecode units.
|
||||
// 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,
|
||||
uint64 add_id, uint64 track_number,
|
||||
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
|
||||
// |writer_| if successful. Returns true on success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data.
|
||||
// data: Pointer to the data.
|
||||
// length: Length of the data.
|
||||
// discard_padding: DiscardPadding element value.
|
||||
// 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
|
||||
// frame, expressed in timecode units.
|
||||
// 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,
|
||||
uint64 abs_timecode, bool is_key);
|
||||
|
||||
// Writes a frame of metadata to the output medium; returns true on
|
||||
// success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data
|
||||
// data: Pointer to the data
|
||||
// length: Length of the data
|
||||
// track_number: Track to add the data to. Value returned by Add track
|
||||
// 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
|
||||
// sub-element but no reference time sub-elements (indicating that
|
||||
// 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);
|
||||
|
||||
// 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.
|
||||
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_; }
|
||||
int32 blocks_added() const { return blocks_added_; }
|
||||
uint64 payload_size() const { return payload_size_; }
|
||||
int64 position_for_cues() const { return position_for_cues_; }
|
||||
uint64 timecode() const { return timecode_; }
|
||||
uint64 timecode_scale() const { return timecode_scale_; }
|
||||
|
||||
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
|
||||
// cluster header has been written. Used by |DoWriteBlock*|. Returns true
|
||||
// cluster header has been written. Used by |DoWriteFrame*|. Returns true
|
||||
// when successful.
|
||||
template <typename Type>
|
||||
bool PreWriteBlock(Type* write_function);
|
||||
bool PreWriteBlock();
|
||||
|
||||
// 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.
|
||||
void PostWriteBlock(uint64 element_size);
|
||||
|
||||
// To simplify things, we require that there be fewer than 127
|
||||
// tracks -- this allows us to serialize the track number value for
|
||||
// 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);
|
||||
// Does some verification and calls WriteFrame.
|
||||
bool DoWriteFrame(const Frame* const frame);
|
||||
|
||||
// Outputs the Cluster header to |writer_|. Returns true on success.
|
||||
bool WriteClusterHeader();
|
||||
@@ -875,6 +984,9 @@ class Cluster {
|
||||
// The absolute timecode of the cluster.
|
||||
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.
|
||||
IMkvWriter* writer_;
|
||||
|
||||
@@ -996,6 +1108,7 @@ class Segment {
|
||||
kBeforeClusters = 0x1 // Position Cues before Clusters
|
||||
};
|
||||
|
||||
const static uint32 kDefaultDocTypeVersion = 2;
|
||||
const static uint64 kDefaultMaxClusterDuration = 30000000000ULL;
|
||||
|
||||
Segment();
|
||||
@@ -1023,6 +1136,11 @@ class Segment {
|
||||
// populate its fields via the Chapter member functions.
|
||||
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
|
||||
// nanoseconds of the cue's time. |track| is the Track of the Cue. This
|
||||
// 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.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data
|
||||
// data: Pointer to the data
|
||||
// length: Length of the data
|
||||
// track_number: Track to add the data to. Value returned by Add track
|
||||
// functions.
|
||||
// timestamp: Timestamp of the frame in nanoseconds from 0.
|
||||
// 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);
|
||||
|
||||
// Writes a frame of metadata to the output medium; returns true on
|
||||
// success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data
|
||||
// data: Pointer to the data
|
||||
// length: Length of the data
|
||||
// track_number: Track to add the data to. Value returned by Add track
|
||||
// functions.
|
||||
@@ -1054,13 +1172,13 @@ class Segment {
|
||||
// The metadata frame is written as a block group, with a duration
|
||||
// sub-element but no reference time sub-elements (indicating that
|
||||
// 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);
|
||||
|
||||
// Writes a frame with additional data to the output medium; returns true on
|
||||
// success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data.
|
||||
// data: Pointer to the data.
|
||||
// length: Length of the data.
|
||||
// additional: Pointer to additional data.
|
||||
// additional_length: Length of additional data.
|
||||
@@ -1070,7 +1188,7 @@ class Segment {
|
||||
// timestamp: Absolute timestamp of the frame, expressed in nanosecond
|
||||
// units.
|
||||
// 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,
|
||||
uint64 add_id, uint64 track_number,
|
||||
uint64 timestamp, bool is_key);
|
||||
@@ -1078,7 +1196,7 @@ class Segment {
|
||||
// Writes a frame with DiscardPadding to the output medium; returns true on
|
||||
// success.
|
||||
// Inputs:
|
||||
// frame: Pointer to the data.
|
||||
// data: Pointer to the data.
|
||||
// length: Length of the data.
|
||||
// discard_padding: DiscardPadding element value.
|
||||
// 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
|
||||
// units.
|
||||
// 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,
|
||||
uint64 timestamp, bool is_key);
|
||||
|
||||
@@ -1177,6 +1295,9 @@ class Segment {
|
||||
// Cues elements.
|
||||
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
|
||||
// file extension. |name| must be deleted by the calling app. Returns true
|
||||
// on success.
|
||||
@@ -1233,7 +1354,7 @@ class Segment {
|
||||
// diff - indicates the difference in size of the Cues element that needs to
|
||||
// accounted for.
|
||||
// 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);
|
||||
|
||||
// Seeds the random number generator used to make UIDs.
|
||||
@@ -1245,6 +1366,7 @@ class Segment {
|
||||
SegmentInfo segment_info_;
|
||||
Tracks tracks_;
|
||||
Chapters chapters_;
|
||||
Tags tags_;
|
||||
|
||||
// Number of chunks written.
|
||||
int chunk_count_;
|
||||
@@ -1316,6 +1438,9 @@ class Segment {
|
||||
// Last timestamp in nanoseconds added to a cluster.
|
||||
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
|
||||
// guideline and some clusters may have a longer duration. Default is 30
|
||||
// seconds.
|
||||
@@ -1337,12 +1462,23 @@ class Segment {
|
||||
// Flag whether or not the muxer should output a Cues element.
|
||||
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.
|
||||
int64 payload_pos_;
|
||||
|
||||
// The file position of the element's size.
|
||||
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.
|
||||
IMkvWriter* writer_cluster_;
|
||||
IMkvWriter* writer_cues_;
|
||||
|
483
third_party/libwebm/mkvmuxerutil.cpp
vendored
483
third_party/libwebm/mkvmuxerutil.cpp
vendored
@@ -15,18 +15,19 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_RAND_S
|
||||
#endif
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include "mkvwriter.hpp"
|
||||
#include "webmids.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable MSVC warnings that suggest making code non-portable.
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
namespace mkvmuxer {
|
||||
|
||||
namespace {
|
||||
@@ -34,6 +35,144 @@ namespace {
|
||||
// Date elements are always 8 octets in size.
|
||||
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
|
||||
|
||||
int32 GetCodedUIntSize(uint64 value) {
|
||||
@@ -72,6 +211,13 @@ int32 GetUIntSize(uint64 value) {
|
||||
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) {
|
||||
// Size of EBML ID
|
||||
int32 ebml_size = GetUIntSize(type);
|
||||
@@ -83,7 +229,16 @@ uint64 EbmlMasterElementSize(uint64 type, uint64 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) {
|
||||
@@ -144,7 +299,7 @@ uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size) {
|
||||
return ebml_size;
|
||||
}
|
||||
|
||||
uint64 EbmlDateElementSize(uint64 type, int64 value) {
|
||||
uint64 EbmlDateElementSize(uint64 type) {
|
||||
// Size of EBML ID
|
||||
uint64 ebml_size = GetUIntSize(type);
|
||||
|
||||
@@ -289,6 +444,23 @@ bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value) {
|
||||
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) {
|
||||
if (!writer)
|
||||
return false;
|
||||
@@ -355,289 +527,25 @@ bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 WriteSimpleBlock(IMkvWriter* writer, const uint8* data, uint64 length,
|
||||
uint64 track_number, int64 timecode, uint64 is_key) {
|
||||
if (!writer)
|
||||
return false;
|
||||
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||
Cluster* cluster) {
|
||||
if (!writer || !frame || !frame->IsValid() || !cluster ||
|
||||
!cluster->timecode_scale())
|
||||
return 0;
|
||||
|
||||
if (!data || length < 1)
|
||||
return false;
|
||||
|
||||
// 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
|
||||
// Technically the timecode for a block can be less than the
|
||||
// timecode for the cluster itself (remember that block timecode
|
||||
// is a signed, 16-bit integer). However, as a simplification we
|
||||
// only permit non-negative cluster-relative timestamps for blocks.
|
||||
|
||||
if (timecode < 0 || timecode > kMaxBlockTimecode)
|
||||
return false;
|
||||
|
||||
if (WriteID(writer, kMkvSimpleBlock))
|
||||
// only permit non-negative cluster-relative timecodes for blocks.
|
||||
const int64 relative_timecode = cluster->GetRelativeTimecode(
|
||||
frame->timestamp() / cluster->timecode_scale());
|
||||
if (relative_timecode < 0 || relative_timecode > kMaxBlockTimecode)
|
||||
return 0;
|
||||
|
||||
const int32 size = static_cast<int32>(length) + 4;
|
||||
if (WriteUInt(writer, size))
|
||||
return 0;
|
||||
|
||||
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;
|
||||
return frame->CanBeSimpleBlock() ?
|
||||
WriteSimpleBlock(writer, frame, relative_timecode) :
|
||||
WriteBlock(writer, frame, relative_timecode,
|
||||
cluster->timecode_scale());
|
||||
}
|
||||
|
||||
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.
|
||||
#ifdef _MSC_VER
|
||||
(void)seed;
|
||||
unsigned int random_value;
|
||||
const errno_t e = rand_s(&random_value);
|
||||
(void)e;
|
||||
const int32 nn = random_value;
|
||||
const int32 nn = rand();
|
||||
#elif __ANDROID__
|
||||
int32 temp_num = 1;
|
||||
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
|
||||
#define MKVMUXERUTIL_HPP
|
||||
|
||||
#include "mkvmuxer.hpp"
|
||||
#include "mkvmuxertypes.hpp"
|
||||
|
||||
namespace mkvmuxer {
|
||||
@@ -23,6 +24,7 @@ int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);
|
||||
|
||||
// Returns the size in bytes of the element.
|
||||
int32 GetUIntSize(uint64 value);
|
||||
int32 GetIntSize(int64 value);
|
||||
int32 GetCodedUIntSize(uint64 value);
|
||||
uint64 EbmlMasterElementSize(uint64 type, uint64 value);
|
||||
uint64 EbmlElementSize(uint64 type, int64 value);
|
||||
@@ -30,7 +32,7 @@ uint64 EbmlElementSize(uint64 type, uint64 value);
|
||||
uint64 EbmlElementSize(uint64 type, float value);
|
||||
uint64 EbmlElementSize(uint64 type, const char* value);
|
||||
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size);
|
||||
uint64 EbmlDateElementSize(uint64 type, int64 value);
|
||||
uint64 EbmlDateElementSize(uint64 type);
|
||||
|
||||
// Creates an EBML coded number from |value| and writes it out. The size of
|
||||
// the coded number is determined by the value of |value|. |value| must not
|
||||
@@ -51,73 +53,17 @@ int32 WriteID(IMkvWriter* writer, uint64 type);
|
||||
|
||||
// Output an Mkv non-master element. Returns true if the element was written.
|
||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value);
|
||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value);
|
||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value);
|
||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value);
|
||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
||||
uint64 size);
|
||||
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value);
|
||||
|
||||
// Output an Mkv Simple Block.
|
||||
// Inputs:
|
||||
// data: Pointer to the data.
|
||||
// length: Length of the 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: 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 Mkv Frame. It decides the correct element to write (Block vs
|
||||
// SimpleBlock) based on the parameters of the Frame.
|
||||
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||
Cluster* cluster);
|
||||
|
||||
// Output a void element. |size| must be the entire size in bytes that will be
|
||||
// void. The function will calculate the size of the void header and subtract
|
||||
|
3126
third_party/libwebm/mkvparser.cpp
vendored
3126
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
|
||||
#define MKVPARSER_HPP
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace mkvparser {
|
||||
|
||||
const int E_PARSE_FAILED = -1;
|
||||
const int E_FILE_FORMAT_INVALID = -2;
|
||||
const int E_BUFFER_NOT_FULL = -3;
|
||||
|
||||
@@ -27,12 +28,16 @@ class 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 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 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);
|
||||
|
||||
@@ -398,6 +403,10 @@ class VideoTrack : public Track {
|
||||
|
||||
long long GetWidth() const;
|
||||
long long GetHeight() const;
|
||||
long long GetDisplayWidth() const;
|
||||
long long GetDisplayHeight() const;
|
||||
long long GetDisplayUnit() const;
|
||||
long long GetStereoMode() const;
|
||||
double GetFrameRate() const;
|
||||
|
||||
bool VetEntry(const BlockEntry*) const;
|
||||
@@ -406,6 +415,11 @@ class VideoTrack : public Track {
|
||||
private:
|
||||
long long m_width;
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -582,6 +596,85 @@ class Chapters {
|
||||
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 {
|
||||
SegmentInfo(const SegmentInfo&);
|
||||
SegmentInfo& operator=(const SegmentInfo&);
|
||||
@@ -684,7 +777,7 @@ class CuePoint {
|
||||
long long m_element_start;
|
||||
long long m_element_size;
|
||||
|
||||
void Load(IMkvReader*);
|
||||
bool Load(IMkvReader*);
|
||||
|
||||
long long GetTimeCode() const; // absolute but unscaled
|
||||
long long GetTime(const Segment*) const; // absolute and scaled (ns units)
|
||||
@@ -697,7 +790,7 @@ class CuePoint {
|
||||
// reference = clusters containing req'd referenced blocks
|
||||
// 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;
|
||||
@@ -730,14 +823,6 @@ class Cues {
|
||||
long long time_ns, const Track*, const CuePoint*&,
|
||||
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* GetLast() const;
|
||||
const CuePoint* GetNext(const CuePoint*) const;
|
||||
@@ -751,8 +836,8 @@ class Cues {
|
||||
bool DoneParsing() const;
|
||||
|
||||
private:
|
||||
void Init() const;
|
||||
void PreloadCuePoint(long&, long long) const;
|
||||
bool Init() const;
|
||||
bool PreloadCuePoint(long&, long long) const;
|
||||
|
||||
mutable CuePoint** m_cue_points;
|
||||
mutable long m_count;
|
||||
@@ -877,18 +962,12 @@ class Segment {
|
||||
long ParseNext(const Cluster* pCurr, const Cluster*& pNext, long long& pos,
|
||||
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 Tracks* GetTracks() const;
|
||||
const SegmentInfo* GetInfo() const;
|
||||
const Cues* GetCues() const;
|
||||
const Chapters* GetChapters() const;
|
||||
const Tags* GetTags() const;
|
||||
|
||||
long long GetDuration() const;
|
||||
|
||||
@@ -914,6 +993,7 @@ class Segment {
|
||||
Tracks* m_pTracks;
|
||||
Cues* m_pCues;
|
||||
Chapters* m_pChapters;
|
||||
Tags* m_pTags;
|
||||
Cluster** m_clusters;
|
||||
long m_clusterCount; // 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 DoParseNext(const Cluster*&, long long&, long&);
|
||||
|
||||
void AppendCluster(Cluster*);
|
||||
void PreloadCluster(Cluster*, ptrdiff_t);
|
||||
bool AppendCluster(Cluster*);
|
||||
bool PreloadCluster(Cluster*, ptrdiff_t);
|
||||
|
||||
// void ParseSeekHead(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,
|
||||
kMkvDuration = 0x4489,
|
||||
kMkvDateUTC = 0x4461,
|
||||
kMkvTitle = 0x7BA9,
|
||||
kMkvMuxingApp = 0x4D80,
|
||||
kMkvWritingApp = 0x5741,
|
||||
// Cluster
|
||||
@@ -107,9 +108,16 @@ enum MkvId {
|
||||
kMkvContentEncodingOrder = 0x5031,
|
||||
kMkvContentEncodingScope = 0x5032,
|
||||
kMkvContentEncodingType = 0x5033,
|
||||
kMkvContentCompression = 0x5034,
|
||||
kMkvContentCompAlgo = 0x4254,
|
||||
kMkvContentCompSettings = 0x4255,
|
||||
kMkvContentEncryption = 0x5035,
|
||||
kMkvContentEncAlgo = 0x47E1,
|
||||
kMkvContentEncKeyID = 0x47E2,
|
||||
kMkvContentSignature = 0x47E3,
|
||||
kMkvContentSigKeyID = 0x47E4,
|
||||
kMkvContentSigAlgo = 0x47E5,
|
||||
kMkvContentSigHashAlgo = 0x47E6,
|
||||
kMkvContentEncAESSettings = 0x47E7,
|
||||
kMkvAESSettingsCipherMode = 0x47E8,
|
||||
kMkvAESSettingsCipherInitData = 0x47E9,
|
||||
@@ -133,7 +141,13 @@ enum MkvId {
|
||||
kMkvChapterDisplay = 0x80,
|
||||
kMkvChapString = 0x85,
|
||||
kMkvChapLanguage = 0x437C,
|
||||
kMkvChapCountry = 0x437E
|
||||
kMkvChapCountry = 0x437E,
|
||||
// Tags
|
||||
kMkvTags = 0x1254C367,
|
||||
kMkvTag = 0x7373,
|
||||
kMkvSimpleTag = 0x67C8,
|
||||
kMkvTagName = 0x45A3,
|
||||
kMkvTagString = 0x4487
|
||||
};
|
||||
|
||||
} // end namespace mkvmuxer
|
||||
|
3
third_party/libyuv/README.libvpx
vendored
3
third_party/libyuv/README.libvpx
vendored
@@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1305
|
||||
Version: 1456
|
||||
License: BSD
|
||||
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.
|
||||
|
||||
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,
|
||||
int width, int height);
|
||||
|
||||
#define J400ToJ420 I400ToI420
|
||||
|
||||
// Convert NV12 to I420.
|
||||
LIBYUV_API
|
||||
int NV12ToI420(const uint8* src_y, int src_stride_y,
|
||||
|
12
third_party/libyuv/include/libyuv/convert_argb.h
vendored
12
third_party/libyuv/include/libyuv/convert_argb.h
vendored
@@ -68,21 +68,21 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
|
||||
uint8* dst_argb, int dst_stride_argb,
|
||||
int width, int height);
|
||||
|
||||
// Convert I400 (grey) to ARGB.
|
||||
// Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
|
||||
LIBYUV_API
|
||||
int I400ToARGB(const uint8* src_y, int src_stride_y,
|
||||
uint8* dst_argb, int dst_stride_argb,
|
||||
int width, int height);
|
||||
|
||||
// Alias.
|
||||
#define YToARGB I400ToARGB_Reference
|
||||
|
||||
// Convert I400 to ARGB. Reverse of ARGBToI400.
|
||||
// Convert J400 (jpeg grey) to ARGB.
|
||||
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,
|
||||
int width, int height);
|
||||
|
||||
// Alias.
|
||||
#define YToARGB I400ToARGB
|
||||
|
||||
// Convert NV12 to ARGB.
|
||||
LIBYUV_API
|
||||
int NV12ToARGB(const uint8* src_y, int src_stride_y,
|
||||
|
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,
|
||||
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
|
||||
int I420ToARGB1555(const uint8* src_y, int src_stride_y,
|
||||
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,
|
||||
int width, int height);
|
||||
|
||||
// Convert ARGB To RGB565 with 8x8 dither matrix (64 bytes).
|
||||
// Values in dither matrix from 0 to 255. 128 is best for no dither.
|
||||
// Convert ARGB 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.
|
||||
// TODO(fbarchard): Consider pointer to 2d array for dither4x4.
|
||||
// const uint8(*dither)[4][4];
|
||||
LIBYUV_API
|
||||
int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb,
|
||||
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.
|
||||
LIBYUV_API
|
||||
@@ -140,6 +143,12 @@ int ARGBToI400(const uint8* src_argb, int src_stride_argb,
|
||||
uint8* dst_y, int dst_stride_y,
|
||||
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.
|
||||
LIBYUV_API
|
||||
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,
|
||||
int width, int height);
|
||||
|
||||
#define J400ToJ400 I400ToI400
|
||||
|
||||
// Copy I422 to I422.
|
||||
#define I422ToI422 I422Copy
|
||||
@@ -84,6 +85,18 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
|
||||
uint8* dst_v, int dst_stride_v,
|
||||
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).
|
||||
LIBYUV_API
|
||||
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);
|
||||
|
||||
// Alias
|
||||
#define J420ToJ400 I420ToI400
|
||||
#define I420ToI420Mirror I420Mirror
|
||||
|
||||
// I420 mirror.
|
||||
@@ -387,24 +401,24 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
||||
uint8* dst_argb, int dst_stride_argb,
|
||||
int width, int height, int interpolation);
|
||||
|
||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||
defined(TARGET_IPHONE_SIMULATOR)
|
||||
#if defined(__pnacl__) || defined(__CLR_VER) || \
|
||||
(defined(__i386__) && !defined(__SSE2__))
|
||||
#define LIBYUV_DISABLE_X86
|
||||
#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.
|
||||
LIBYUV_API
|
||||
void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
|
||||
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
|
||||
void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
|
||||
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.
|
||||
// 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
|
241
third_party/libyuv/include/libyuv/row.h
vendored
241
third_party/libyuv/include/libyuv/row.h
vendored
@@ -37,10 +37,8 @@ extern "C" {
|
||||
free(var##_mem); \
|
||||
var = 0
|
||||
|
||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||
defined(TARGET_IPHONE_SIMULATOR) || \
|
||||
(defined(__i386__) && !defined(__SSE2__)) || \
|
||||
(defined(_MSC_VER) && defined(__clang__))
|
||||
#if defined(__pnacl__) || defined(__CLR_VER) || \
|
||||
(defined(__i386__) && !defined(__SSE2__))
|
||||
#define LIBYUV_DISABLE_X86
|
||||
#endif
|
||||
// True if compiling for SSSE3 as a requirement.
|
||||
@@ -48,6 +46,9 @@ extern "C" {
|
||||
#define LIBYUV_SSSE3_ONLY
|
||||
#endif
|
||||
|
||||
#if defined(__native_client__)
|
||||
#define LIBYUV_DISABLE_NEON
|
||||
#endif
|
||||
// clang >= 3.5.0 required for Arm64.
|
||||
#if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
|
||||
#if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
|
||||
@@ -63,11 +64,11 @@ extern "C" {
|
||||
#define HAS_ABGRTOYROW_SSSE3
|
||||
#define HAS_ARGB1555TOARGBROW_SSE2
|
||||
#define HAS_ARGB4444TOARGBROW_SSE2
|
||||
#define HAS_ARGBSETROW_X86
|
||||
#define HAS_ARGBSHUFFLEROW_SSE2
|
||||
#define HAS_ARGBSHUFFLEROW_SSSE3
|
||||
#define HAS_ARGBTOARGB1555ROW_SSE2
|
||||
#define HAS_ARGBTOARGB4444ROW_SSE2
|
||||
#define HAS_ARGBTOBAYERGGROW_SSE2
|
||||
#define HAS_ARGBTORAWROW_SSSE3
|
||||
#define HAS_ARGBTORGB24ROW_SSSE3
|
||||
#define HAS_ARGBTORGB565ROW_SSE2
|
||||
@@ -95,7 +96,8 @@ extern "C" {
|
||||
#define HAS_I422TOUYVYROW_SSE2
|
||||
#define HAS_I422TOYUY2ROW_SSE2
|
||||
#define HAS_I444TOARGBROW_SSSE3
|
||||
// #define HAS_J422TOARGBROW_SSSE3
|
||||
#define HAS_J400TOARGBROW_SSE2
|
||||
#define HAS_J422TOARGBROW_SSSE3
|
||||
#define HAS_MERGEUVROW_SSE2
|
||||
#define HAS_MIRRORROW_SSE2
|
||||
#define HAS_MIRRORROW_SSSE3
|
||||
@@ -112,15 +114,13 @@ extern "C" {
|
||||
#define HAS_RGB565TOARGBROW_SSE2
|
||||
#define HAS_RGBATOUVROW_SSSE3
|
||||
#define HAS_RGBATOYROW_SSSE3
|
||||
#define HAS_SETROW_X86
|
||||
#define HAS_SETROW_ERMS
|
||||
#define HAS_ARGBSETROW_X86
|
||||
#define HAS_SETROW_X86
|
||||
#define HAS_SPLITUVROW_SSE2
|
||||
#define HAS_UYVYTOARGBROW_SSSE3
|
||||
#define HAS_UYVYTOUV422ROW_SSE2
|
||||
#define HAS_UYVYTOUVROW_SSE2
|
||||
#define HAS_UYVYTOYROW_SSE2
|
||||
#define HAS_YTOARGBROW_SSE2
|
||||
#define HAS_YUY2TOARGBROW_SSSE3
|
||||
#define HAS_YUY2TOUV422ROW_SSE2
|
||||
#define HAS_YUY2TOUVROW_SSE2
|
||||
@@ -157,8 +157,9 @@ extern "C" {
|
||||
#define HAS_SOBELYROW_SSE2
|
||||
#endif
|
||||
|
||||
// The following are available on x64 Visual C:
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64)
|
||||
// The following are available on x64 Visual C and clangcl.
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \
|
||||
(!defined(__clang__) || defined(__SSSE3__))
|
||||
#define HAS_I422TOARGBROW_SSSE3
|
||||
#endif
|
||||
|
||||
@@ -177,27 +178,31 @@ extern "C" {
|
||||
#endif // __clang__
|
||||
|
||||
// Visual C 2012 required for AVX2.
|
||||
#if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
#if defined(_M_IX86) && !defined(__clang__) && \
|
||||
defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
#define VISUALC_HAS_AVX2 1
|
||||
#endif // VisualStudio >= 2012
|
||||
|
||||
// The following are available require VS2012. Port to GCC.
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
|
||||
// TODO(fbarchard): fix AVX2 versions of YUV conversion. bug=393
|
||||
#define HAS_I422TOABGRROW_AVX2
|
||||
#define HAS_I422TOARGBROW_AVX2
|
||||
#define HAS_I422TOBGRAROW_AVX2
|
||||
#define HAS_I422TORGBAROW_AVX2
|
||||
#define HAS_NV12TOARGBROW_AVX2
|
||||
#define HAS_NV21TOARGBROW_AVX2
|
||||
#define HAS_ARGBTORGB565ROW_AVX2
|
||||
#define HAS_ARGB1555TOARGBROW_AVX2
|
||||
#define HAS_ARGB4444TOARGBROW_AVX2
|
||||
#define HAS_ARGBTOARGB1555ROW_AVX2
|
||||
#define HAS_ARGBTOARGB4444ROW_AVX2
|
||||
#define HAS_NV12TORGB565ROW_AVX2
|
||||
#define HAS_NV21TORGB565ROW_AVX2
|
||||
#define HAS_I422TORGB565ROW_AVX2
|
||||
#define HAS_ARGBTORGB565DITHERROW_AVX2
|
||||
#define HAS_ARGBTORGB565DITHERROW_SSE2
|
||||
#define HAS_ARGBTORGB565ROW_AVX2
|
||||
#define HAS_I411TOARGBROW_AVX2
|
||||
#define HAS_I422TOARGB1555ROW_AVX2
|
||||
#define HAS_I422TOARGB4444ROW_AVX2
|
||||
#define HAS_I422TORGB565ROW_AVX2
|
||||
#define HAS_I444TOARGBROW_AVX2
|
||||
#define HAS_J400TOARGBROW_AVX2
|
||||
#define HAS_NV12TOARGBROW_AVX2
|
||||
#define HAS_NV12TORGB565ROW_AVX2
|
||||
#define HAS_NV21TOARGBROW_AVX2
|
||||
#define HAS_NV21TORGB565ROW_AVX2
|
||||
#define HAS_RGB565TOARGBROW_AVX2
|
||||
#endif
|
||||
|
||||
// The following are available on all x86 platforms, but
|
||||
@@ -214,24 +219,27 @@ extern "C" {
|
||||
#define HAS_ARGBTOYJROW_AVX2
|
||||
#define HAS_ARGBTOYROW_AVX2
|
||||
#define HAS_COPYROW_AVX
|
||||
#define HAS_I400TOARGBROW_AVX2
|
||||
#define HAS_I422TOABGRROW_AVX2
|
||||
#define HAS_I422TOARGBROW_AVX2
|
||||
#define HAS_I422TOBGRAROW_AVX2
|
||||
#define HAS_I422TORAWROW_AVX2
|
||||
#define HAS_I422TORGB24ROW_AVX2
|
||||
#define HAS_I422TORGBAROW_AVX2
|
||||
#define HAS_INTERPOLATEROW_AVX2
|
||||
#define HAS_J422TOARGBROW_AVX2
|
||||
#define HAS_MERGEUVROW_AVX2
|
||||
#define HAS_MIRRORROW_AVX2
|
||||
#define HAS_SPLITUVROW_AVX2
|
||||
#define HAS_UYVYTOARGBROW_AVX2
|
||||
#define HAS_UYVYTOUV422ROW_AVX2
|
||||
#define HAS_UYVYTOUVROW_AVX2
|
||||
#define HAS_UYVYTOYROW_AVX2
|
||||
#define HAS_YTOARGBROW_AVX2
|
||||
#define HAS_YUY2TOARGBROW_AVX2
|
||||
#define HAS_YUY2TOUV422ROW_AVX2
|
||||
#define HAS_YUY2TOUVROW_AVX2
|
||||
#define HAS_YUY2TOYROW_AVX2
|
||||
|
||||
// The following require HAS_I422TOARGBROW_AVX2
|
||||
#if defined(HAS_I422TOARGBROW_AVX2)
|
||||
#define HAS_YUY2TOARGBROW_AVX2
|
||||
#define HAS_UYVYTOARGBROW_AVX2
|
||||
#endif
|
||||
|
||||
// Effects:
|
||||
#define HAS_ARGBADDROW_AVX2
|
||||
#define HAS_ARGBATTENUATEROW_AVX2
|
||||
@@ -240,22 +248,6 @@ extern "C" {
|
||||
#define HAS_ARGBUNATTENUATEROW_AVX2
|
||||
#endif
|
||||
|
||||
|
||||
// The following are Yasm x86 only:
|
||||
// TODO(fbarchard): Port AVX2 to inline.
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined(HAVE_YASM)
|
||||
(defined(_M_IX86) || defined(_M_X64) || \
|
||||
defined(__x86_64__) || defined(__i386__))
|
||||
#define HAS_MERGEUVROW_AVX2
|
||||
#define HAS_MERGEUVROW_MMX
|
||||
#define HAS_SPLITUVROW_AVX2
|
||||
#define HAS_SPLITUVROW_MMX
|
||||
#define HAS_UYVYTOYROW_AVX2
|
||||
#define HAS_UYVYTOYROW_MMX
|
||||
#define HAS_YUY2TOYROW_AVX2
|
||||
#define HAS_YUY2TOYROW_MMX
|
||||
#endif
|
||||
|
||||
// The following are disabled when SSSE3 is available:
|
||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \
|
||||
@@ -278,7 +270,6 @@ extern "C" {
|
||||
#define HAS_ARGB4444TOYROW_NEON
|
||||
#define HAS_ARGBTOARGB1555ROW_NEON
|
||||
#define HAS_ARGBTOARGB4444ROW_NEON
|
||||
#define HAS_ARGBTOBAYERGGROW_NEON
|
||||
#define HAS_ARGBTORAWROW_NEON
|
||||
#define HAS_ARGBTORGB24ROW_NEON
|
||||
#define HAS_ARGBTORGB565ROW_NEON
|
||||
@@ -292,7 +283,7 @@ extern "C" {
|
||||
#define HAS_BGRATOUVROW_NEON
|
||||
#define HAS_BGRATOYROW_NEON
|
||||
#define HAS_COPYROW_NEON
|
||||
#define HAS_I400TOARGBROW_NEON
|
||||
#define HAS_J400TOARGBROW_NEON
|
||||
#define HAS_I411TOARGBROW_NEON
|
||||
#define HAS_I422TOABGRROW_NEON
|
||||
#define HAS_I422TOARGB1555ROW_NEON
|
||||
@@ -331,11 +322,12 @@ extern "C" {
|
||||
#define HAS_UYVYTOUV422ROW_NEON
|
||||
#define HAS_UYVYTOUVROW_NEON
|
||||
#define HAS_UYVYTOYROW_NEON
|
||||
#define HAS_YTOARGBROW_NEON
|
||||
#define HAS_I400TOARGBROW_NEON
|
||||
#define HAS_YUY2TOARGBROW_NEON
|
||||
#define HAS_YUY2TOUV422ROW_NEON
|
||||
#define HAS_YUY2TOUVROW_NEON
|
||||
#define HAS_YUY2TOYROW_NEON
|
||||
#define HAS_ARGBTORGB565DITHERROW_NEON
|
||||
|
||||
// Effects:
|
||||
#define HAS_ARGBADDROW_NEON
|
||||
@@ -388,7 +380,6 @@ typedef __declspec(align(32)) int8 lvec8[32];
|
||||
typedef __declspec(align(32)) uint16 ulvec16[16];
|
||||
typedef __declspec(align(32)) uint32 ulvec32[8];
|
||||
typedef __declspec(align(32)) uint8 ulvec8[32];
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
|
||||
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
|
||||
@@ -869,6 +860,11 @@ void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb,
|
||||
int pix);
|
||||
void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int pix);
|
||||
void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, uint8* dst_argb,
|
||||
int pix);
|
||||
|
||||
void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
|
||||
void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
|
||||
@@ -884,12 +880,20 @@ void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
|
||||
void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int pix);
|
||||
void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix);
|
||||
void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int pix);
|
||||
|
||||
void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb,
|
||||
int pix);
|
||||
void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, uint8* dst_argb,
|
||||
int pix);
|
||||
void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, uint8* dst_argb,
|
||||
int pix);
|
||||
|
||||
void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, int pix);
|
||||
void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int pix);
|
||||
void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb,
|
||||
@@ -905,6 +909,13 @@ void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
|
||||
void ARGBToRGB565DitherRow_C(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int pix);
|
||||
void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int pix);
|
||||
void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int pix);
|
||||
|
||||
void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
@@ -914,6 +925,8 @@ void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToRGB565DitherRow_NEON(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int width);
|
||||
|
||||
void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
@@ -922,14 +935,13 @@ void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
|
||||
void ARGBToRGB565DitherRow_C(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint8* dither8x8, int pix);
|
||||
|
||||
void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
|
||||
|
||||
void I444ToARGBRow_C(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
@@ -1038,6 +1050,11 @@ void I444ToARGBRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I444ToARGBRow_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToARGBRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1048,6 +1065,11 @@ void I411ToARGBRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I411ToARGBRow_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void NV12ToARGBRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_uv,
|
||||
uint8* dst_argb,
|
||||
@@ -1097,6 +1119,11 @@ void J422ToARGBRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void J422ToARGBRow_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToBGRARow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1147,11 +1174,21 @@ void I422ToRGB24Row_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_rgb24,
|
||||
int width);
|
||||
void I422ToRGB24Row_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_rgb24,
|
||||
int width);
|
||||
void I422ToRAWRow_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_raw,
|
||||
int width);
|
||||
void I422ToRAWRow_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_raw,
|
||||
int width);
|
||||
void I422ToARGBRow_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1177,6 +1214,11 @@ void I444ToARGBRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I444ToARGBRow_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToARGBRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1187,6 +1229,11 @@ void I411ToARGBRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I411ToARGBRow_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_uv,
|
||||
uint8* dst_argb,
|
||||
@@ -1231,6 +1278,16 @@ void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2,
|
||||
void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void J422ToARGBRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void J422ToARGBRow_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToBGRARow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1281,33 +1338,29 @@ void I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToRGB24Row_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToRAWRow_Any_SSSE3(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I422ToRAWRow_Any_AVX2(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
|
||||
void YToARGBRow_C(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_SSE2(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_AVX2(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_NEON(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_Any_SSE2(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_Any_AVX2(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void YToARGBRow_Any_NEON(const uint8* src_y,
|
||||
uint8* dst_argb,
|
||||
int width);
|
||||
void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
|
||||
void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
|
||||
|
||||
// ARGB preattenuated alpha blend.
|
||||
void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
|
||||
@@ -1375,6 +1428,11 @@ void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
|
||||
void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int pix);
|
||||
void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int pix);
|
||||
|
||||
void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
@@ -1384,6 +1442,8 @@ void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int pix);
|
||||
void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb,
|
||||
const uint32 dither4, int width);
|
||||
|
||||
void I444ToARGBRow_Any_NEON(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
@@ -1570,17 +1630,6 @@ void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, int stride_uyvy,
|
||||
void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
|
||||
uint8* dst_u, uint8* dst_v, int pix);
|
||||
|
||||
void ARGBToBayerGGRow_C(const uint8* src_argb, uint8* dst_bayer,
|
||||
uint32 /* selector */, int pix);
|
||||
void ARGBToBayerGGRow_SSE2(const uint8* src_argb, uint8* dst_bayer,
|
||||
uint32 /* selector */, int pix);
|
||||
void ARGBToBayerGGRow_NEON(const uint8* src_argb, uint8* dst_bayer,
|
||||
uint32 /* selector */, int pix);
|
||||
void ARGBToBayerGGRow_Any_SSE2(const uint8* src_argb, uint8* dst_bayer,
|
||||
uint32 /* selector */, int pix);
|
||||
void ARGBToBayerGGRow_Any_NEON(const uint8* src_argb, uint8* dst_bayer,
|
||||
uint32 /* selector */, int pix);
|
||||
|
||||
void I422ToYUY2Row_C(const uint8* src_y,
|
||||
const uint8* src_u,
|
||||
const uint8* src_v,
|
||||
@@ -1770,6 +1819,18 @@ void SobelXYRow_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
void SobelXYRow_NEON(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
void SobelRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
void SobelRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_y, int width);
|
||||
void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_y, int width);
|
||||
void SobelXYRow_Any_SSE2(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
void SobelXYRow_Any_NEON(const uint8* src_sobelx, const uint8* src_sobely,
|
||||
uint8* dst_argb, int width);
|
||||
|
||||
void ARGBPolynomialRow_C(const uint8* src_argb,
|
||||
uint8* dst_argb, const float* poly,
|
||||
|
238
third_party/libyuv/include/libyuv/scale_row.h
vendored
238
third_party/libyuv/include/libyuv/scale_row.h
vendored
@@ -12,45 +12,66 @@
|
||||
#define INCLUDE_LIBYUV_SCALE_ROW_H_
|
||||
|
||||
#include "libyuv/basic_types.h"
|
||||
#include "libyuv/scale.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace libyuv {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||
defined(TARGET_IPHONE_SIMULATOR)
|
||||
#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
|
||||
|
||||
// The following are available on all x86 platforms:
|
||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
||||
#define HAS_SCALEROWDOWN2_SSE2
|
||||
#define HAS_SCALEROWDOWN4_SSE2
|
||||
#define HAS_SCALEROWDOWN34_SSSE3
|
||||
#define HAS_SCALEROWDOWN38_SSSE3
|
||||
#define HAS_SCALEADDROWS_SSE2
|
||||
#define HAS_SCALEFILTERCOLS_SSSE3
|
||||
#define HAS_SCALECOLSUP2_SSE2
|
||||
#define HAS_FIXEDDIV1_X86
|
||||
#define HAS_FIXEDDIV_X86
|
||||
#define HAS_SCALEARGBCOLS_SSE2
|
||||
#define HAS_SCALEARGBCOLSUP2_SSE2
|
||||
#define HAS_SCALEARGBFILTERCOLS_SSSE3
|
||||
#define HAS_SCALEARGBROWDOWN2_SSE2
|
||||
#define HAS_SCALEARGBROWDOWNEVEN_SSE2
|
||||
#define HAS_SCALEARGBCOLS_SSE2
|
||||
#define HAS_SCALEARGBFILTERCOLS_SSSE3
|
||||
#define HAS_SCALEARGBCOLSUP2_SSE2
|
||||
#define HAS_FIXEDDIV_X86
|
||||
#define HAS_FIXEDDIV1_X86
|
||||
#define HAS_SCALECOLSUP2_SSE2
|
||||
#define HAS_SCALEFILTERCOLS_SSSE3
|
||||
#define HAS_SCALEROWDOWN2_SSE2
|
||||
#define HAS_SCALEROWDOWN34_SSSE3
|
||||
#define HAS_SCALEROWDOWN38_SSSE3
|
||||
#define HAS_SCALEROWDOWN4_SSE2
|
||||
#endif
|
||||
|
||||
// The following are available on VS2012:
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
|
||||
#define HAS_SCALEADDROW_AVX2
|
||||
#define HAS_SCALEROWDOWN2_AVX2
|
||||
#define HAS_SCALEROWDOWN4_AVX2
|
||||
#endif
|
||||
|
||||
// The following are available on Visual C:
|
||||
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && !defined(__clang__)
|
||||
#define HAS_SCALEADDROW_SSE2
|
||||
#endif
|
||||
|
||||
// The following are available on Neon platforms:
|
||||
#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
|
||||
(defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
|
||||
#define HAS_SCALEARGBCOLS_NEON
|
||||
#define HAS_SCALEARGBROWDOWN2_NEON
|
||||
#define HAS_SCALEARGBROWDOWNEVEN_NEON
|
||||
#define HAS_SCALEFILTERCOLS_NEON
|
||||
#define HAS_SCALEROWDOWN2_NEON
|
||||
#define HAS_SCALEROWDOWN4_NEON
|
||||
#define HAS_SCALEROWDOWN34_NEON
|
||||
#define HAS_SCALEROWDOWN38_NEON
|
||||
#define HAS_SCALEARGBROWDOWNEVEN_NEON
|
||||
#define HAS_SCALEARGBROWDOWN2_NEON
|
||||
#define HAS_SCALEROWDOWN4_NEON
|
||||
#define HAS_SCALEARGBFILTERCOLS_NEON
|
||||
#endif
|
||||
|
||||
// The following are available on Mips platforms:
|
||||
@@ -164,10 +185,8 @@ void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
|
||||
uint16* dst_ptr, int dst_width);
|
||||
void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint16* dst_ptr, int src_width, int src_height);
|
||||
void ScaleAddRows_16_C(const uint16* src_ptr, ptrdiff_t src_stride,
|
||||
uint32* dst_ptr, int src_width, int src_height);
|
||||
void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width);
|
||||
void ScaleARGBRowDown2_C(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
@@ -194,16 +213,28 @@ void ScaleARGBFilterCols_C(uint8* dst_argb, const uint8* src_argb,
|
||||
void ScaleARGBFilterCols64_C(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
|
||||
// Specialized scalers for x86.
|
||||
void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
|
||||
void ScaleRowDown34_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr,
|
||||
@@ -220,46 +251,124 @@ void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr,
|
||||
void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint16* dst_ptr, int src_width,
|
||||
int src_height);
|
||||
void ScaleRowDown2_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Linear_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4Box_Any_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
|
||||
void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
|
||||
void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
|
||||
void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
|
||||
|
||||
// ARGB Column functions
|
||||
void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
// Row functions.
|
||||
void ScaleARGBFilterCols_NEON(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBCols_NEON(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
void ScaleARGBCols_Any_NEON(uint8* dst_argb, const uint8* src_argb,
|
||||
int dst_width, int x, int dx);
|
||||
|
||||
// ARGB Row functions
|
||||
void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
|
||||
void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx, uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
int src_stepx,
|
||||
uint8* dst_argb, int dst_width);
|
||||
|
||||
// ScaleRowDown2Box also used by planar functions
|
||||
// NEON downscalers with interpolation.
|
||||
@@ -267,7 +376,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
// Note - not static due to reuse in convert for 444 to 420.
|
||||
void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
|
||||
void ScaleRowDown2Linear_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
|
||||
@@ -302,6 +412,42 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
|
||||
void ScaleRowDown2_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleRowDown4_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
// 32 -> 12
|
||||
void ScaleRowDown38_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
// 32x3 -> 12x1
|
||||
void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
// 32x2 -> 12x1
|
||||
void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
|
||||
void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width);
|
||||
|
||||
void ScaleFilterCols_NEON(uint8* dst_ptr, const uint8* src_ptr,
|
||||
int dst_width, int x, int dx);
|
||||
|
||||
void ScaleFilterCols_Any_NEON(uint8* dst_ptr, const uint8* src_ptr,
|
||||
int dst_width, int x, int dx);
|
||||
|
||||
|
||||
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width);
|
||||
void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
|
2
third_party/libyuv/include/libyuv/version.h
vendored
2
third_party/libyuv/include/libyuv/version.h
vendored
@@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1305
|
||||
#define LIBYUV_VERSION 1456
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_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