Compare commits
1057 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea4e8e642a | ||
![]() |
71ef1e494f | ||
![]() |
b55aca6b8b | ||
![]() |
4e9b2c5732 | ||
![]() |
a12dec4699 | ||
![]() |
661ee45f88 | ||
![]() |
fa5292d9d4 | ||
![]() |
a6a61a6d1d | ||
![]() |
b8fc301769 | ||
![]() |
9b667da05d | ||
![]() |
4007352bd0 | ||
![]() |
5c6a2d9878 | ||
![]() |
17c54e9317 | ||
![]() |
14d4eee547 | ||
![]() |
07624cfeaa | ||
![]() |
d6f763659c | ||
![]() |
e297459eb6 | ||
![]() |
afe2726089 | ||
![]() |
23f0d0f16b | ||
![]() |
47953c33ea | ||
![]() |
64a854d06b | ||
![]() |
91805f06a3 | ||
![]() |
8120a1d9bd | ||
![]() |
211a107208 | ||
![]() |
fdd09e5d7b | ||
![]() |
00d35e82b2 | ||
![]() |
807342e1cf | ||
![]() |
abaf8c386e | ||
![]() |
e5578ad3cd | ||
![]() |
4e0fae982e | ||
![]() |
f62fa1ce9f | ||
![]() |
8a63deab15 | ||
![]() |
87ae12009e | ||
![]() |
fe06305b0d | ||
![]() |
57bf0d1fe5 | ||
![]() |
3970d4e728 | ||
![]() |
80a173a33b | ||
![]() |
d58c5586ec | ||
![]() |
0411b19289 | ||
![]() |
fd30240e98 | ||
![]() |
661e081176 | ||
![]() |
d484a07f1c | ||
![]() |
54e4bf3296 | ||
![]() |
8045254bac | ||
![]() |
3e17543491 | ||
![]() |
1e1015fd22 | ||
![]() |
c4a34f4025 | ||
![]() |
cba03dc667 | ||
![]() |
5a3f494466 | ||
![]() |
112431705d | ||
![]() |
864581fea3 | ||
![]() |
d8acee792f | ||
![]() |
0e3dec6b08 | ||
![]() |
711e6c947b | ||
![]() |
8491677ab6 | ||
![]() |
f98bb0d3ec | ||
![]() |
346e089d25 | ||
![]() |
0ac6777a34 | ||
![]() |
ae2d3d6be0 | ||
![]() |
998fc04bcf | ||
![]() |
43fa5bf55e | ||
![]() |
f19b8d9533 | ||
![]() |
4a66fe2107 | ||
![]() |
edf3c5a3eb | ||
![]() |
a39b5e8b32 | ||
![]() |
6ae93d0304 | ||
![]() |
241f15f1c9 | ||
![]() |
2137d99086 | ||
![]() |
e9de2d98a9 | ||
![]() |
93f1159af5 | ||
![]() |
b08001e00a | ||
![]() |
e1ea35fb52 | ||
![]() |
cbfd34246c | ||
![]() |
feef77ec3a | ||
![]() |
f531193690 | ||
![]() |
e86e9f8b7a | ||
![]() |
15a7fe106c | ||
![]() |
d32f509de1 | ||
![]() |
5f5f36b52e | ||
![]() |
d1166f03be | ||
![]() |
d51c7b4cbe | ||
![]() |
e58870a587 | ||
![]() |
5c18bcfd9c | ||
![]() |
62cf52c860 | ||
![]() |
7e95a12d51 | ||
![]() |
2c0cddf255 | ||
![]() |
d398d042c1 | ||
![]() |
5ae87280e2 | ||
![]() |
7d02df7036 | ||
![]() |
1c3d46a924 | ||
![]() |
800ab099e3 | ||
![]() |
e6b2255329 | ||
![]() |
7f7b2e89e2 | ||
![]() |
73f85eae68 | ||
![]() |
9b6080f685 | ||
![]() |
190807a56c | ||
![]() |
33029d7353 | ||
![]() |
c41950099d | ||
![]() |
f65e396aa1 | ||
![]() |
115d88c4b2 | ||
![]() |
a65045915f | ||
![]() |
adb12c4deb | ||
![]() |
ca58b215ab | ||
![]() |
67c46b9b30 | ||
![]() |
7ab0b6b7ed | ||
![]() |
b832e539c0 | ||
![]() |
2fdbc1d553 | ||
![]() |
5415c488f9 | ||
![]() |
79bafbb0dd | ||
![]() |
7b3c851526 | ||
![]() |
1b6e6439fa | ||
![]() |
4474051370 | ||
![]() |
1646d2d2ae | ||
![]() |
edc942202b | ||
![]() |
f7be632cbd | ||
![]() |
4ba0e03759 | ||
![]() |
37ce6ba425 | ||
![]() |
c2c83dcb32 | ||
![]() |
4c5cdb493c | ||
![]() |
06b15b3715 | ||
![]() |
614ef0dc0d | ||
![]() |
5d2b6006f0 | ||
![]() |
b491c15c85 | ||
![]() |
2809f4ab93 | ||
![]() |
c2d017e88f | ||
![]() |
4f45967cf5 | ||
![]() |
78eab18740 | ||
![]() |
902e9595e3 | ||
![]() |
d33a1d6507 | ||
![]() |
fc8c0ee09f | ||
![]() |
490617b6ff | ||
![]() |
b833859daa | ||
![]() |
9f70057dd6 | ||
![]() |
7d52ed686b | ||
![]() |
7275dc28f6 | ||
![]() |
7d12b06574 | ||
![]() |
f74d1c6de7 | ||
![]() |
e49abd1d92 | ||
![]() |
414409e6c5 | ||
![]() |
09a288476f | ||
![]() |
b981c5d4e0 | ||
![]() |
638e183d11 | ||
![]() |
60171d8fa6 | ||
![]() |
a39b603bf6 | ||
![]() |
57f51e843e | ||
![]() |
b38b6b2798 | ||
![]() |
7fc85451fd | ||
![]() |
42c8fdb943 | ||
![]() |
040ad30bc8 | ||
![]() |
1450d6e637 | ||
![]() |
a99a35c8ea | ||
![]() |
a582b028a4 | ||
![]() |
cc0ac02441 | ||
![]() |
3de5c43570 | ||
![]() |
5d833dd299 | ||
![]() |
01f1201267 | ||
![]() |
4909895afd | ||
![]() |
f4e34d1614 | ||
![]() |
9e40946edf | ||
![]() |
61f55565fb | ||
![]() |
b6b46db9e4 | ||
![]() |
aedef891fc | ||
![]() |
958f0a0f19 | ||
![]() |
f601bf4004 | ||
![]() |
21d99be9dc | ||
![]() |
7b6b9be861 | ||
![]() |
374409eb1a | ||
![]() |
a352fedb24 | ||
![]() |
c92068430d | ||
![]() |
274a5b7cdb | ||
![]() |
78fb7355c8 | ||
![]() |
ec43d63cf4 | ||
![]() |
579faec4d1 | ||
![]() |
414a6a9e6b | ||
![]() |
95345e942c | ||
![]() |
87757508ab | ||
![]() |
a5e3fe3769 | ||
![]() |
f66418afba | ||
![]() |
7371b0ca6f | ||
![]() |
c5cbda5079 | ||
![]() |
6605d43777 | ||
![]() |
e1e3d79ef3 | ||
![]() |
5c99acb7da | ||
![]() |
22d841becd | ||
![]() |
6e19cfb083 | ||
![]() |
48734a54e8 | ||
![]() |
84a6abd954 | ||
![]() |
82b1516a85 | ||
![]() |
9e63720b4b | ||
![]() |
8893f7d815 | ||
![]() |
7c772ccd27 | ||
![]() |
1bf6cb85be | ||
![]() |
31fe5d9825 | ||
![]() |
ad62507f32 | ||
![]() |
64160ef392 | ||
![]() |
72b0c9f55f | ||
![]() |
4ce0a94656 | ||
![]() |
fed6c90b68 | ||
![]() |
933a6fd5a1 | ||
![]() |
99c7b51641 | ||
![]() |
1816addc4e | ||
![]() |
46eaaad8dd | ||
![]() |
652c772981 | ||
![]() |
324b8adca4 | ||
![]() |
08d2cee49c | ||
![]() |
eb29649cad | ||
![]() |
f1b7c7e697 | ||
![]() |
a342517710 | ||
![]() |
d68ba3feb8 | ||
![]() |
9a83adaf34 | ||
![]() |
d0a2f0af9d | ||
![]() |
1d186e9e12 | ||
![]() |
62ee0e6a97 | ||
![]() |
ac0fb59348 | ||
![]() |
18b131de04 | ||
![]() |
6f7fe4723b | ||
![]() |
73e8e8dbf9 | ||
![]() |
5081514269 | ||
![]() |
cdb9884a63 | ||
![]() |
ce9e31655e | ||
![]() |
c64f80b0e8 | ||
![]() |
8b9df201df | ||
![]() |
be9c00615b | ||
![]() |
5038f9b268 | ||
![]() |
9d39cbf6cf | ||
![]() |
4326f6f525 | ||
![]() |
a6c49f18ab | ||
![]() |
e11a5fccb2 | ||
![]() |
03cbe6c8bc | ||
![]() |
29d854d6c5 | ||
![]() |
b4ea1c5a77 | ||
![]() |
e5fc6ab665 | ||
![]() |
318fd9dac2 | ||
![]() |
1c5480651e | ||
![]() |
b36bd27fbe | ||
![]() |
940a116b1f | ||
![]() |
8460b757c2 | ||
![]() |
222b333ed5 | ||
![]() |
9b60b076fb | ||
![]() |
c6e0332f30 | ||
![]() |
b35477a2f2 | ||
![]() |
7747a091f5 | ||
![]() |
335bbe424f | ||
![]() |
18cb40f074 | ||
![]() |
b39f872a41 | ||
![]() |
1442d29533 | ||
![]() |
085791a92e | ||
![]() |
8400607267 | ||
![]() |
42ba12888b | ||
![]() |
3b5ddf07c0 | ||
![]() |
9959a76782 | ||
![]() |
45f9e053d8 | ||
![]() |
61d55fda2b | ||
![]() |
8a54bfe83f | ||
![]() |
0e29c4f761 | ||
![]() |
faba79e080 | ||
![]() |
1f6f58d585 | ||
![]() |
a3bf7b864a | ||
![]() |
d9c23a0d5a | ||
![]() |
5ef953e84f | ||
![]() |
298c4e3c52 | ||
![]() |
8f9d3f6d9a | ||
![]() |
ec6402b7c5 | ||
![]() |
3ad1684126 | ||
![]() |
2dd2abe391 | ||
![]() |
2a11952f45 | ||
![]() |
f5f004bc5a | ||
![]() |
6c32576548 | ||
![]() |
8dcf518430 | ||
![]() |
4105443872 | ||
![]() |
e80e2d5ba1 | ||
![]() |
188694b2f5 | ||
![]() |
cf82c5cd5b | ||
![]() |
e0e65ddb88 | ||
![]() |
22b203baf8 | ||
![]() |
8ec19f84e1 | ||
![]() |
ce23ca814b | ||
![]() |
7cea06d135 | ||
![]() |
3c7fa664af | ||
![]() |
cb8577a4da | ||
![]() |
956c901c68 | ||
![]() |
2fb9fc0f6c | ||
![]() |
25a53c54d1 | ||
![]() |
539940d42f | ||
![]() |
fdd130a213 | ||
![]() |
9c484d2944 | ||
![]() |
e2affa8ce7 | ||
![]() |
44187717c1 | ||
![]() |
faa338183b | ||
![]() |
f234cd0f37 | ||
![]() |
b55b34f862 | ||
![]() |
ca6a904656 | ||
![]() |
c3027b4d2f | ||
![]() |
093ee8e199 | ||
![]() |
1bca72e1bd | ||
![]() |
e72f3d10f6 | ||
![]() |
c358a0364e | ||
![]() |
1b3539d453 | ||
![]() |
cbd58a872d | ||
![]() |
2968bedf12 | ||
![]() |
609d299ed0 | ||
![]() |
01a0612c70 | ||
![]() |
f52ad8cedd | ||
![]() |
c617d7b86a | ||
![]() |
90b043a698 | ||
![]() |
e324619ca9 | ||
![]() |
07f49ca1d1 | ||
![]() |
64bb656326 | ||
![]() |
001e600c3b | ||
![]() |
9b3139ebca | ||
![]() |
da4c7cce21 | ||
![]() |
7cbb856efe | ||
![]() |
dcf1830a15 | ||
![]() |
788d839938 | ||
![]() |
ab3d241be1 | ||
![]() |
2962049ac3 | ||
![]() |
981f6fc988 | ||
![]() |
158eb8599a | ||
![]() |
bd652ff66e | ||
![]() |
e8794f1d5e | ||
![]() |
d7e14c0d10 | ||
![]() |
c899bedbca | ||
![]() |
14d5e214bf | ||
![]() |
88084eecdf | ||
![]() |
9e4ed295da | ||
![]() |
52e24c7d7e | ||
![]() |
8c0fa61a97 | ||
![]() |
9c2651ab44 | ||
![]() |
3b8bb503ee | ||
![]() |
49f612ee29 | ||
![]() |
5271b857eb | ||
![]() |
cc0dc50d02 | ||
![]() |
00a9ac424e | ||
![]() |
b4cfb8254e | ||
![]() |
406fbd24dc | ||
![]() |
505345ed5d | ||
![]() |
c2d23309ef | ||
![]() |
4095fa9038 | ||
![]() |
657eac048e | ||
![]() |
bb32fded36 | ||
![]() |
4cc843facd | ||
![]() |
be7bd626c4 | ||
![]() |
4555874af1 | ||
![]() |
5ab21439fd | ||
![]() |
a617c6aaa3 | ||
![]() |
874f1a901d | ||
![]() |
5cc2600964 | ||
![]() |
0a72533e98 | ||
![]() |
73c0dd939d | ||
![]() |
c4ab43ff3c | ||
![]() |
0637e50579 | ||
![]() |
364d64275c | ||
![]() |
09e8163625 | ||
![]() |
ba99474b1d | ||
![]() |
f93f6963ba | ||
![]() |
e5985185d2 | ||
![]() |
371584c42b | ||
![]() |
2cc4f3b21f | ||
![]() |
a402f10959 | ||
![]() |
8c2863b87f | ||
![]() |
c76974524a | ||
![]() |
daa6237229 | ||
![]() |
7df701a192 | ||
![]() |
633aa01f72 | ||
![]() |
e7bcc5baf7 | ||
![]() |
a82beafd64 | ||
![]() |
42c27f2eca | ||
![]() |
b049978397 | ||
![]() |
1073823984 | ||
![]() |
eedb1f2034 | ||
![]() |
558c268318 | ||
![]() |
79a9aab56f | ||
![]() |
a005174b25 | ||
![]() |
80469eafb7 | ||
![]() |
e4b50572b7 | ||
![]() |
d9a9f50a36 | ||
![]() |
e7a972e113 | ||
![]() |
7c6c4cf2fb | ||
![]() |
7b4ee3a21d | ||
![]() |
89cc8a316d | ||
![]() |
1b4a17094e | ||
![]() |
e23a05ab06 | ||
![]() |
69619a13c3 | ||
![]() |
045ef52ef5 | ||
![]() |
953302656a | ||
![]() |
08a747afb9 | ||
![]() |
31b69928e5 | ||
![]() |
d303e0affd | ||
![]() |
29b42c66f7 | ||
![]() |
257f274dfa | ||
![]() |
3e9409b1d0 | ||
![]() |
dbb5ee8ea7 | ||
![]() |
47b71eea09 | ||
![]() |
f04d4345da | ||
![]() |
3f5dcde7e6 | ||
![]() |
b13c6e336c | ||
![]() |
76e25dbca6 | ||
![]() |
e463f0e979 | ||
![]() |
3c3daf4d19 | ||
![]() |
93263dc19e | ||
![]() |
9bc8bcddbd | ||
![]() |
65083b4911 | ||
![]() |
c99c0e2625 | ||
![]() |
6eaaf8da88 | ||
![]() |
8f62ef0f95 | ||
![]() |
172ee1da2b | ||
![]() |
78accb876c | ||
![]() |
08e09ed7db | ||
![]() |
e9f98c9022 | ||
![]() |
e0ae2174db | ||
![]() |
473e547e80 | ||
![]() |
9cab9421ce | ||
![]() |
0218808d49 | ||
![]() |
fc096e2e86 | ||
![]() |
fd065d3e79 | ||
![]() |
0a858048af | ||
![]() |
a4e540c4f5 | ||
![]() |
25dfda7f31 | ||
![]() |
dfc2c4d900 | ||
![]() |
6270995667 | ||
![]() |
412b4367c5 | ||
![]() |
2f07cb4d39 | ||
![]() |
bd39c07688 | ||
![]() |
58d7efdb29 | ||
![]() |
15285d8fc5 | ||
![]() |
c31a5b23b4 | ||
![]() |
b57df29f95 | ||
![]() |
8342a82680 | ||
![]() |
4d4c7f8ef0 | ||
![]() |
7bda0c9a82 | ||
![]() |
289c60001f | ||
![]() |
900321b08c | ||
![]() |
8b973d4937 | ||
![]() |
b8783b98c5 | ||
![]() |
21aed0ed92 | ||
![]() |
0523dc57ff | ||
![]() |
34e36f3a1c | ||
![]() |
8b587fa292 | ||
![]() |
356be9307c | ||
![]() |
f20418c349 | ||
![]() |
86e8272a23 | ||
![]() |
20a6f210cd | ||
![]() |
0686515cb4 | ||
![]() |
59ef6bded5 | ||
![]() |
12e9bf3e84 | ||
![]() |
b88523c25d | ||
![]() |
3d5669c6e9 | ||
![]() |
4877356d8f | ||
![]() |
36ba39d140 | ||
![]() |
e5902d60ce | ||
![]() |
d3bb71914b | ||
![]() |
c3bec4cd13 | ||
![]() |
32aef7d019 | ||
![]() |
042f9d62ca | ||
![]() |
e6cc30c22b | ||
![]() |
e3bc07f4af | ||
![]() |
66f6bab7ad | ||
![]() |
bee6d2fd76 | ||
![]() |
ad4cd0c2a4 | ||
![]() |
b43ca2deb6 | ||
![]() |
9dbe8d9e22 | ||
![]() |
1b8807964c | ||
![]() |
4bd28579e5 | ||
![]() |
6168781f70 | ||
![]() |
ca5d57ef8a | ||
![]() |
863e2046fd | ||
![]() |
daca33659d | ||
![]() |
baba2eedac | ||
![]() |
55eda370cb | ||
![]() |
8bc3a4807e | ||
![]() |
321b2a9ded | ||
![]() |
99b9df5281 | ||
![]() |
a2f31564b4 | ||
![]() |
f6f95d4e49 | ||
![]() |
ec679eb453 | ||
![]() |
5a819c5e23 | ||
![]() |
5dc6bd86f0 | ||
![]() |
1885824b20 | ||
![]() |
f790d0092e | ||
![]() |
371888cad5 | ||
![]() |
6cb1197929 | ||
![]() |
f2f523fffc | ||
![]() |
8d03ca085f | ||
![]() |
d0fcf39f0c | ||
![]() |
96c1e6d40d | ||
![]() |
806212498a | ||
![]() |
ac4a85f476 | ||
![]() |
e358f7ee90 | ||
![]() |
80e4fe4063 | ||
![]() |
6b61920ab7 | ||
![]() |
35d2e4e5c3 | ||
![]() |
bf174a70cd | ||
![]() |
3009f521f3 | ||
![]() |
8c8eab8bfe | ||
![]() |
a9eb4f0899 | ||
![]() |
8e2d085516 | ||
![]() |
b5849f7709 | ||
![]() |
82cea7cb6c | ||
![]() |
f501157e53 | ||
![]() |
cdc5a3a194 | ||
![]() |
13551ad1e3 | ||
![]() |
575c38d76c | ||
![]() |
a58858d60d | ||
![]() |
71a1d1116f | ||
![]() |
191c5f8ff3 | ||
![]() |
2c4d7bf008 | ||
![]() |
6379900c53 | ||
![]() |
001d668d40 | ||
![]() |
b21e6b707f | ||
![]() |
67b1761fcb | ||
![]() |
90f2ee8cb4 | ||
![]() |
1cf18de982 | ||
![]() |
7f84055e2d | ||
![]() |
a4ad943860 | ||
![]() |
c7dd3e7e43 | ||
![]() |
646a9a1893 | ||
![]() |
0cdd1208be | ||
![]() |
bb258fb995 | ||
![]() |
2cb6dec61c | ||
![]() |
028216b2c2 | ||
![]() |
987041318f | ||
![]() |
896e59758a | ||
![]() |
828e207337 | ||
![]() |
45ecc7a294 | ||
![]() |
c90a2538a0 | ||
![]() |
e59d6b4d72 | ||
![]() |
afa218f372 | ||
![]() |
5f847bf61d | ||
![]() |
b12c259252 | ||
![]() |
6fbf2485ad | ||
![]() |
87c739a395 | ||
![]() |
1cede1d011 | ||
![]() |
93ade976c8 | ||
![]() |
8ced6f52dd | ||
![]() |
e10979ff56 | ||
![]() |
4cc3467e7a | ||
![]() |
b047941d7d | ||
![]() |
b5bbc84fe2 | ||
![]() |
5ccbf80963 | ||
![]() |
7ce914fb5a | ||
![]() |
1fef92fd73 | ||
![]() |
f6b7f72461 | ||
![]() |
a4f6be86d6 | ||
![]() |
8923cfa328 | ||
![]() |
ca9036155d | ||
![]() |
d1cf459119 | ||
![]() |
5eafc8b466 | ||
![]() |
a8c2ff2c3c | ||
![]() |
3602ad7ee6 | ||
![]() |
3b2d285afb | ||
![]() |
46b32b5197 | ||
![]() |
e1d9cee13d | ||
![]() |
29fb1b5a06 | ||
![]() |
c59f9a68e2 | ||
![]() |
93a10dd561 | ||
![]() |
71a04bc19d | ||
![]() |
ac9ac45aca | ||
![]() |
08b57574c6 | ||
![]() |
ca78fa24b7 | ||
![]() |
987e4c1787 | ||
![]() |
b5ff61695f | ||
![]() |
d2c910b9a4 | ||
![]() |
9470205414 | ||
![]() |
ae05dd8731 | ||
![]() |
948ccdadf4 | ||
![]() |
f2db5602ba | ||
![]() |
58ef4ecff8 | ||
![]() |
1765aacb17 | ||
![]() |
657ccb5ac7 | ||
![]() |
142e76f105 | ||
![]() |
fdb94444be | ||
![]() |
3e5cce81e7 | ||
![]() |
28e1c97916 | ||
![]() |
3743ea1fe3 | ||
![]() |
fb464fca44 | ||
![]() |
b695256edd | ||
![]() |
11043d80f6 | ||
![]() |
39c2a6bf44 | ||
![]() |
710b8df949 | ||
![]() |
0f6fc8660e | ||
![]() |
f47ac3c6ca | ||
![]() |
31ad14c21e | ||
![]() |
58174293d8 | ||
![]() |
fcc7d869d9 | ||
![]() |
c762f9fa2d | ||
![]() |
2e5a9e580c | ||
![]() |
2420763638 | ||
![]() |
84626b364b | ||
![]() |
71a861cf40 | ||
![]() |
18c007ba37 | ||
![]() |
9b83919f44 | ||
![]() |
a67c061e0f | ||
![]() |
0b950fe240 | ||
![]() |
2f56a97f24 | ||
![]() |
7f7dc4fb55 | ||
![]() |
e35c674d13 | ||
![]() |
8bfd7f6a47 | ||
![]() |
4c98976124 | ||
![]() |
f98c9fb27d | ||
![]() |
a7d3a51dd1 | ||
![]() |
6dabe0f74a | ||
![]() |
43e96d0466 | ||
![]() |
84d098d943 | ||
![]() |
a7aabda267 | ||
![]() |
ffe3856de7 | ||
![]() |
26f373988d | ||
![]() |
99fecc64b0 | ||
![]() |
d8dbe20241 | ||
![]() |
58257ea29e | ||
![]() |
6a2176aac0 | ||
![]() |
99b6d2c065 | ||
![]() |
298e52c99c | ||
![]() |
ef0c594801 | ||
![]() |
5136ba7c69 | ||
![]() |
bbdd52ed34 | ||
![]() |
c0483d0c7a | ||
![]() |
971c04066c | ||
![]() |
5c391a161a | ||
![]() |
1ce724ee39 | ||
![]() |
4e3e333a79 | ||
![]() |
7d7bacf0f1 | ||
![]() |
bf2cba4532 | ||
![]() |
f44d50a94c | ||
![]() |
42d622fab3 | ||
![]() |
bda168d2b0 | ||
![]() |
1c6d2b7df0 | ||
![]() |
e98bc78ca1 | ||
![]() |
a58db9d283 | ||
![]() |
20f9f21fd4 | ||
![]() |
27e91f37f5 | ||
![]() |
9e253c13d0 | ||
![]() |
17c8cc550d | ||
![]() |
f5302e5dcf | ||
![]() |
d31e3f7ccc | ||
![]() |
6002fdef5e | ||
![]() |
a726d7fd4e | ||
![]() |
ce558c8f59 | ||
![]() |
8c28e01d31 | ||
![]() |
fdaf1d0640 | ||
![]() |
a3a94e1498 | ||
![]() |
a0db0b302c | ||
![]() |
37e6e6d313 | ||
![]() |
b8272cc2cf | ||
![]() |
e4e3cdc636 | ||
![]() |
b369f327d5 | ||
![]() |
ecf86e1a97 | ||
![]() |
a953577b46 | ||
![]() |
5d1b39f7e7 | ||
![]() |
51915cfa47 | ||
![]() |
4904995652 | ||
![]() |
91fe776913 | ||
![]() |
8886d75263 | ||
![]() |
f9853c1b9c | ||
![]() |
bb83478d2c | ||
![]() |
2f138f0b7c | ||
![]() |
965fdda015 | ||
![]() |
357d0d8fc7 | ||
![]() |
6e4ca0749c | ||
![]() |
9d36139231 | ||
![]() |
b0058bda78 | ||
![]() |
7f01a4192c | ||
![]() |
ebd1edf36c | ||
![]() |
6ce05bc73c | ||
![]() |
df8c675f48 | ||
![]() |
c3b6cc61e5 | ||
![]() |
f02f745e4a | ||
![]() |
fb2f23c6c9 | ||
![]() |
b845af0115 | ||
![]() |
0a48a67e57 | ||
![]() |
4e59c8ecf1 | ||
![]() |
5e8d2e337e | ||
![]() |
df64da3b1e | ||
![]() |
0fedf754b2 | ||
![]() |
dc90031038 | ||
![]() |
a082e68030 | ||
![]() |
ecf026f1aa | ||
![]() |
bc35ab3f7d | ||
![]() |
9b576e4d12 | ||
![]() |
39884ab035 | ||
![]() |
dbf5b95d35 | ||
![]() |
940230202a | ||
![]() |
cabc2938de | ||
![]() |
25c2f13d00 | ||
![]() |
7fbcf1df03 | ||
![]() |
3097309cba | ||
![]() |
3950376b8b | ||
![]() |
923cff747a | ||
![]() |
f28aaae1c5 | ||
![]() |
dfd8116986 | ||
![]() |
fe277b16f0 | ||
![]() |
aa61ca0c59 | ||
![]() |
a625e13208 | ||
![]() |
d3f751e603 | ||
![]() |
8dd52d8202 | ||
![]() |
fce1e43410 | ||
![]() |
6d75fb01eb | ||
![]() |
c45f629576 | ||
![]() |
f428c29c23 | ||
![]() |
76f105967b | ||
![]() |
afd06c6873 | ||
![]() |
50f8c26579 | ||
![]() |
68e39d6efe | ||
![]() |
4d5e7ab5c4 | ||
![]() |
6cbf2420b9 | ||
![]() |
65614321db | ||
![]() |
965dbe09b0 | ||
![]() |
16a565d0cb | ||
![]() |
e6d88f63a8 | ||
![]() |
5d4fd1d1ad | ||
![]() |
3824ef08e0 | ||
![]() |
240c5d6f3b | ||
![]() |
49c7006c7e | ||
![]() |
3c7c16fde3 | ||
![]() |
567a32b5b2 | ||
![]() |
75a24bef4a | ||
![]() |
96676e1abf | ||
![]() |
66e2dd1187 | ||
![]() |
9cec1bbd14 | ||
![]() |
5029a40633 | ||
![]() |
e589e4b82d | ||
![]() |
94350ab986 | ||
![]() |
74965f2644 | ||
![]() |
db54be09c2 | ||
![]() |
0a94020b5b | ||
![]() |
e3759c567d | ||
![]() |
19b6127365 | ||
![]() |
3c432e1186 | ||
![]() |
3e2aa268f6 | ||
![]() |
9e52a40695 | ||
![]() |
d04d9f24a0 | ||
![]() |
6c374bc0b4 | ||
![]() |
27e7144350 | ||
![]() |
dbf396d497 | ||
![]() |
883fd9e393 | ||
![]() |
6da812e4ee | ||
![]() |
80f1cfd09d | ||
![]() |
8b59caca7b | ||
![]() |
0bf02fb1ea | ||
![]() |
01151a26c0 | ||
![]() |
79f3384ce1 | ||
![]() |
84757de0f5 | ||
![]() |
7fd2c13888 | ||
![]() |
cf2b4f884d | ||
![]() |
4b357756b1 | ||
![]() |
4f905a658b | ||
![]() |
36fa9ef3e2 | ||
![]() |
412594ed0a | ||
![]() |
954a653216 | ||
![]() |
a4ab70f92e | ||
![]() |
58f7aad051 | ||
![]() |
145293b335 | ||
![]() |
889639969b | ||
![]() |
082768f0b1 | ||
![]() |
976a8b2179 | ||
![]() |
556f8a066c | ||
![]() |
ca80f11ec3 | ||
![]() |
3b7ebeb4d5 | ||
![]() |
cb5469462d | ||
![]() |
4320a309ce | ||
![]() |
abc78a5a7c | ||
![]() |
d49ea4afb4 | ||
![]() |
e91709ca17 | ||
![]() |
0ebcdf5cda | ||
![]() |
ee8aecd23a | ||
![]() |
add41decd9 | ||
![]() |
f75e3da535 | ||
![]() |
c81a2b9b4f | ||
![]() |
82494cad9d | ||
![]() |
fa49fc72d9 | ||
![]() |
8b53755ebd | ||
![]() |
44496ff2d6 | ||
![]() |
edf4dbff33 | ||
![]() |
ff993cd7fc | ||
![]() |
24c9babaaf | ||
![]() |
01c17c88ed | ||
![]() |
3d85acc8f7 | ||
![]() |
050f509065 | ||
![]() |
91c9aa0941 | ||
![]() |
14376a53b2 | ||
![]() |
03256d96e4 | ||
![]() |
8c94eab011 | ||
![]() |
c558122e4e | ||
![]() |
9bfa5363da | ||
![]() |
10dde477c7 | ||
![]() |
8f175810be | ||
![]() |
66fe5970ab | ||
![]() |
904b5d302d | ||
![]() |
2a375bb400 | ||
![]() |
c9403419b2 | ||
![]() |
6728aaf6d8 | ||
![]() |
b27565b143 | ||
![]() |
050f2b3e7f | ||
![]() |
5d20f19be2 | ||
![]() |
21accb3bb2 | ||
![]() |
af2ea72495 | ||
![]() |
cbfdfbe846 | ||
![]() |
5dd045ebc1 | ||
![]() |
8aa63f0b31 | ||
![]() |
8f440223f6 | ||
![]() |
ccfa626db8 | ||
![]() |
f6d6783a4d | ||
![]() |
0d5c349ac4 | ||
![]() |
30b05520c8 | ||
![]() |
59bd0fef66 | ||
![]() |
2b550beb22 | ||
![]() |
12489443de | ||
![]() |
21a19b7912 | ||
![]() |
25119a7f08 | ||
![]() |
3db9002f36 | ||
![]() |
5d35b279e2 | ||
![]() |
7655cfb1b8 | ||
![]() |
1a53a438dc | ||
![]() |
4f731c4429 | ||
![]() |
5001d6ef4a | ||
![]() |
3074f03a07 | ||
![]() |
d3f610c186 | ||
![]() |
23ce6e7212 | ||
![]() |
fccab01807 | ||
![]() |
8b84af7488 | ||
![]() |
72ac64544f | ||
![]() |
29651e1d44 | ||
![]() |
f99a5ef92e | ||
![]() |
8b7b2d6aae | ||
![]() |
523b7eba19 | ||
![]() |
6054cd25b4 | ||
![]() |
392acaedcb | ||
![]() |
8a8d0ce208 | ||
![]() |
cdc2c1c576 | ||
![]() |
134557f3a4 | ||
![]() |
46edd3a01b | ||
![]() |
7464a53aaa | ||
![]() |
518d8d4365 | ||
![]() |
cb7e3202ec | ||
![]() |
34ab23f226 | ||
![]() |
84c2d8af13 | ||
![]() |
b442ca69d9 | ||
![]() |
d1b029dec9 | ||
![]() |
721be99371 | ||
![]() |
afb9d4e8f1 | ||
![]() |
ebb0d60353 | ||
![]() |
9251942ca7 | ||
![]() |
b62c0c0bce | ||
![]() |
00498a7e59 | ||
![]() |
315f0e3fd8 | ||
![]() |
dec126a932 | ||
![]() |
807aa2d8f3 | ||
![]() |
be73d76b34 | ||
![]() |
d7537a6fce | ||
![]() |
192bfbc1f1 | ||
![]() |
dafaef2fe1 | ||
![]() |
4bfe064460 | ||
![]() |
bd55da1c08 | ||
![]() |
a09918335f | ||
![]() |
81cc7d0bd1 | ||
![]() |
c31bc5371e | ||
![]() |
ce1e181b13 | ||
![]() |
bd9a9a2f18 | ||
![]() |
5a931a158f | ||
![]() |
5d62d0b114 | ||
![]() |
705b21a06e | ||
![]() |
71f029146c | ||
![]() |
744765a9c5 | ||
![]() |
f6252b4845 | ||
![]() |
3713cf11c6 | ||
![]() |
e0b8fff6c7 | ||
![]() |
45f6ffe5e9 | ||
![]() |
8c0cbb0848 | ||
![]() |
ce2649af3d | ||
![]() |
623bf96678 | ||
![]() |
812f2376ee | ||
![]() |
c562ba4c3d | ||
![]() |
cfa68a3381 | ||
![]() |
5dd514af93 | ||
![]() |
59ca3955fb | ||
![]() |
e1a54304be | ||
![]() |
08b4a667ef | ||
![]() |
98add74e85 | ||
![]() |
d3a6c2ab7e | ||
![]() |
01344fe409 | ||
![]() |
0bc01cc9fe | ||
![]() |
a3e1f80e8b | ||
![]() |
0291ce840c | ||
![]() |
9ed6cbc3ee | ||
![]() |
ef1ee362b3 | ||
![]() |
f68069868b | ||
![]() |
e2542dcc6e | ||
![]() |
86c3c1abf0 | ||
![]() |
5e27ec28f0 | ||
![]() |
06107e9605 | ||
![]() |
4d08dfefa9 | ||
![]() |
da55ee6ccc | ||
![]() |
9e17d051ac | ||
![]() |
bb9d5171a7 | ||
![]() |
4578435f35 | ||
![]() |
b0da4903dd | ||
![]() |
635930d466 | ||
![]() |
dbe5f0172b | ||
![]() |
842f463c77 | ||
![]() |
e78f968112 | ||
![]() |
d6cc6ac6b8 | ||
![]() |
7ac6910dd8 | ||
![]() |
57b4a3dd2b | ||
![]() |
90cbbbc1e2 | ||
![]() |
efdb198e00 | ||
![]() |
618230c7f4 | ||
![]() |
cb7b55b096 | ||
![]() |
bd2deab706 | ||
![]() |
deb3ed01b5 | ||
![]() |
ce993ce791 | ||
![]() |
5129336714 | ||
![]() |
bb00b15f9e | ||
![]() |
d2ee495fb2 | ||
![]() |
ca699ac24e | ||
![]() |
1bb52045d3 | ||
![]() |
8dbaa5bd69 | ||
![]() |
13a099799e | ||
![]() |
94e59cb84b | ||
![]() |
c029ea39bd | ||
![]() |
dff5a83532 | ||
![]() |
3d3c814937 | ||
![]() |
6fba14eecb | ||
![]() |
dc179ec819 | ||
![]() |
7b7c47c8f7 | ||
![]() |
0d994b2f45 | ||
![]() |
8683c6a638 | ||
![]() |
668afae438 | ||
![]() |
7dcdf974d0 | ||
![]() |
65eae2a7a2 | ||
![]() |
cdeb803e2f | ||
![]() |
9df1d329a5 | ||
![]() |
90d475a9e7 | ||
![]() |
e747b091cb | ||
![]() |
f211d9d839 | ||
![]() |
659aa20e56 | ||
![]() |
bc877faf7f | ||
![]() |
97535ffb97 | ||
![]() |
9a0dda8b3a | ||
![]() |
84153d1883 | ||
![]() |
721719dd0c | ||
![]() |
90a40b226a | ||
![]() |
3fbc9bbb88 | ||
![]() |
2f222b9550 | ||
![]() |
9ddf1b1ae4 | ||
![]() |
f3876ea485 | ||
![]() |
5c13b5bb39 | ||
![]() |
ebc64dc818 | ||
![]() |
1109680434 | ||
![]() |
b3ca11f07f | ||
![]() |
4ccb7911ba | ||
![]() |
5fba761f6e | ||
![]() |
5aca97e247 | ||
![]() |
d7686b3e0f | ||
![]() |
d0ce090ec5 | ||
![]() |
c5cf0f7a76 | ||
![]() |
fe343286ec | ||
![]() |
c0b90d4088 | ||
![]() |
c713620b4c | ||
![]() |
729f953fb5 | ||
![]() |
89b5829d0a | ||
![]() |
a6213f3dce | ||
![]() |
3a0d0ff5e6 | ||
![]() |
392aa6e444 | ||
![]() |
dca3542d35 | ||
![]() |
e65d6e22e3 | ||
![]() |
b36518dcf4 | ||
![]() |
5aa8b270db | ||
![]() |
f6d28cf029 | ||
![]() |
fc66e23154 | ||
![]() |
f925b24381 | ||
![]() |
978e711b2c | ||
![]() |
470ac1437d | ||
![]() |
9fff623d0a | ||
![]() |
95dd1741af | ||
![]() |
2ec899222b | ||
![]() |
686959e87e | ||
![]() |
adbfc605f6 | ||
![]() |
9abbe8cc13 | ||
![]() |
67e9ae14d9 | ||
![]() |
9e19704a6a | ||
![]() |
ffc6c8a430 | ||
![]() |
35fa0d4758 | ||
![]() |
f038cf3c74 | ||
![]() |
bb5249244d | ||
![]() |
8d853efe53 | ||
![]() |
41b68dce4d | ||
![]() |
a4bda40544 | ||
![]() |
e60068baeb | ||
![]() |
a5351720cc | ||
![]() |
da51a7c69c | ||
![]() |
147bcf27c4 | ||
![]() |
2359aeb52d | ||
![]() |
921715edff | ||
![]() |
8986fddc2b | ||
![]() |
4b87a088bf | ||
![]() |
1af1b52772 | ||
![]() |
72365be496 | ||
![]() |
b7b61ff6a3 | ||
![]() |
7a6e47b99d | ||
![]() |
f84c349b3b | ||
![]() |
26f732e21d | ||
![]() |
9cd7b8549b | ||
![]() |
f87b03b50d | ||
![]() |
698a183e30 | ||
![]() |
82b2dd5ee4 | ||
![]() |
e82ddde05a | ||
![]() |
07f5da6128 | ||
![]() |
e845455225 | ||
![]() |
8ae1a9524e | ||
![]() |
81ef892ca8 | ||
![]() |
c956907eca | ||
![]() |
3fedb3e65c | ||
![]() |
b6bde8c770 | ||
![]() |
c9584f0c9c | ||
![]() |
f4228097e4 | ||
![]() |
684f4abfac | ||
![]() |
f21fb76b1b | ||
![]() |
0e4dbe2996 | ||
![]() |
2702a6f114 | ||
![]() |
7c9079ab4c | ||
![]() |
932db25024 | ||
![]() |
85a88f9c0c | ||
![]() |
3b79f2e2e9 | ||
![]() |
b2ad33dead | ||
![]() |
63e0697294 | ||
![]() |
edf5fbd5b2 | ||
![]() |
043d2affbb | ||
![]() |
67e7dc5404 | ||
![]() |
1986380df2 | ||
![]() |
f082a0fb42 | ||
![]() |
53d5cd2c82 | ||
![]() |
7ac639654f | ||
![]() |
a304a83362 | ||
![]() |
2ea1ca1714 | ||
![]() |
682a20114e | ||
![]() |
d352df0931 | ||
![]() |
df3850db49 | ||
![]() |
087d93f568 | ||
![]() |
6371ce4b0f | ||
![]() |
84e70ef004 | ||
![]() |
ea57502c82 | ||
![]() |
082b4f8348 | ||
![]() |
788c313b50 | ||
![]() |
779d7610c7 | ||
![]() |
56629aa012 | ||
![]() |
33651e3edf | ||
![]() |
d46aada5c2 | ||
![]() |
66b1f210c0 | ||
![]() |
d4b98d475f | ||
![]() |
8d8962ca3e | ||
![]() |
329559ae50 | ||
![]() |
0b3a88fe15 | ||
![]() |
563fe360c3 | ||
![]() |
73a502dd43 | ||
![]() |
ea189b77eb | ||
![]() |
2ebd47841f | ||
![]() |
9d7244c4c6 | ||
![]() |
7aee089978 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -36,7 +36,6 @@ tests/audiogen
|
|||||||
tests/base64
|
tests/base64
|
||||||
tests/data
|
tests/data
|
||||||
tests/rotozoom
|
tests/rotozoom
|
||||||
tests/seek_test
|
|
||||||
tests/tiny_psnr
|
tests/tiny_psnr
|
||||||
tests/videogen
|
tests/videogen
|
||||||
tests/vsynth1
|
tests/vsynth1
|
||||||
@@ -48,5 +47,4 @@ tools/pktdumper
|
|||||||
tools/probetest
|
tools/probetest
|
||||||
tools/qt-faststart
|
tools/qt-faststart
|
||||||
tools/trasher
|
tools/trasher
|
||||||
tools/trasher*.d
|
|
||||||
version.h
|
version.h
|
||||||
|
5
Doxyfile
5
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.8.5
|
PROJECT_NUMBER = 0.7.8
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
@@ -1382,7 +1382,8 @@ PREDEFINED = "__attribute__(x)=" \
|
|||||||
# The macro definition that is found in the sources will be used.
|
# The macro definition that is found in the sources will be used.
|
||||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||||
|
|
||||||
EXPAND_AS_DEFINED = declare_idct
|
EXPAND_AS_DEFINED = declare_idct \
|
||||||
|
READ_PAR_DATA \
|
||||||
|
|
||||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||||
|
12
MAINTAINERS
12
MAINTAINERS
@@ -19,7 +19,7 @@ ffmpeg:
|
|||||||
ffmpeg.c Michael Niedermayer
|
ffmpeg.c Michael Niedermayer
|
||||||
|
|
||||||
ffplay:
|
ffplay:
|
||||||
ffplay.c Michael Niedermayer
|
ffplay.c Marton Balint
|
||||||
|
|
||||||
ffprobe:
|
ffprobe:
|
||||||
ffprobe.c Stefano Sabatini
|
ffprobe.c Stefano Sabatini
|
||||||
@@ -362,6 +362,16 @@ Sparc Roman Shaposhnik
|
|||||||
x86 Michael Niedermayer
|
x86 Michael Niedermayer
|
||||||
|
|
||||||
|
|
||||||
|
Releases
|
||||||
|
========
|
||||||
|
|
||||||
|
0.5 *Deprecated/Unmaintained*
|
||||||
|
0.6 Stefano Sabatini
|
||||||
|
0.7 Michael Niedermayer
|
||||||
|
0.8 Michael Niedermayer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GnuPG Fingerprints of maintainers and others who have svn write access
|
GnuPG Fingerprints of maintainers and others who have svn write access
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
|
227
Makefile
227
Makefile
@@ -1,13 +1,13 @@
|
|||||||
|
MAIN_MAKEFILE=1
|
||||||
include config.mak
|
include config.mak
|
||||||
|
|
||||||
SRC_DIR = $(SRC_PATH_BARE)
|
vpath %.c $(SRC_PATH)
|
||||||
|
vpath %.h $(SRC_PATH)
|
||||||
|
vpath %.S $(SRC_PATH)
|
||||||
|
vpath %.asm $(SRC_PATH)
|
||||||
|
vpath %.v $(SRC_PATH)
|
||||||
|
vpath %.texi $(SRC_PATH)
|
||||||
|
|
||||||
vpath %.c $(SRC_DIR)
|
|
||||||
vpath %.h $(SRC_DIR)
|
|
||||||
vpath %.S $(SRC_DIR)
|
|
||||||
vpath %.asm $(SRC_DIR)
|
|
||||||
vpath %.v $(SRC_DIR)
|
|
||||||
vpath %.texi $(SRC_PATH_BARE)
|
|
||||||
|
|
||||||
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
||||||
PROGS-$(CONFIG_FFPLAY) += ffplay
|
PROGS-$(CONFIG_FFPLAY) += ffplay
|
||||||
@@ -17,20 +17,16 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
|
|||||||
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
||||||
PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
|
PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
|
||||||
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
|
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
|
||||||
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
|
||||||
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
|
||||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html)
|
|
||||||
TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
|
|
||||||
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
||||||
HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
||||||
|
TOOLS = qt-faststart trasher
|
||||||
|
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
||||||
|
|
||||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||||
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
||||||
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
||||||
ALLMANPAGES = $(BASENAMES:%=%.1)
|
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||||
|
|
||||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
|
||||||
|
|
||||||
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
||||||
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
||||||
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
||||||
@@ -40,33 +36,35 @@ FFLIBS-$(CONFIG_SWSCALE) += swscale
|
|||||||
|
|
||||||
FFLIBS := avutil
|
FFLIBS := avutil
|
||||||
|
|
||||||
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset)
|
DATA_FILES := $(wildcard $(SRC_PATH)/ffpresets/*.ffpreset)
|
||||||
|
|
||||||
SKIPHEADERS = cmdutils_common_opts.h
|
SKIPHEADERS = cmdutils_common_opts.h
|
||||||
|
|
||||||
include common.mak
|
include $(SRC_PATH)/common.mak
|
||||||
|
|
||||||
FF_LDFLAGS := $(FFLDFLAGS)
|
|
||||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||||
FF_DEP_LIBS := $(DEP_LIBS)
|
FF_DEP_LIBS := $(DEP_LIBS)
|
||||||
|
|
||||||
all-$(CONFIG_DOC): documentation
|
all: $(PROGS)
|
||||||
|
|
||||||
all: $(FF_DEP_LIBS) $(PROGS)
|
|
||||||
|
|
||||||
$(PROGS): %$(EXESUF): %_g$(EXESUF)
|
$(PROGS): %$(EXESUF): %_g$(EXESUF)
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
$(STRIP) $@
|
$(STRIP) $@
|
||||||
|
|
||||||
|
$(TOOLS): %$(EXESUF): %.o
|
||||||
|
$(LD) $(LDFLAGS) -o $@ $< $(ELIBS)
|
||||||
|
|
||||||
|
tools/cws2fws$(EXESUF): ELIBS = -lz
|
||||||
|
|
||||||
config.h: .config
|
config.h: .config
|
||||||
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
|
.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
|
||||||
@-tput bold 2>/dev/null
|
@-tput bold 2>/dev/null
|
||||||
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
||||||
@-tput sgr0 2>/dev/null
|
@-tput sgr0 2>/dev/null
|
||||||
|
|
||||||
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
|
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
|
||||||
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
|
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
|
||||||
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS
|
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS TOOLS
|
||||||
|
|
||||||
define RESET
|
define RESET
|
||||||
$(1) :=
|
$(1) :=
|
||||||
@@ -76,31 +74,24 @@ endef
|
|||||||
define DOSUBDIR
|
define DOSUBDIR
|
||||||
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
|
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
|
||||||
SUBDIR := $(1)/
|
SUBDIR := $(1)/
|
||||||
include $(1)/Makefile
|
include $(SRC_PATH)/$(1)/Makefile
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||||
|
|
||||||
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
||||||
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
||||||
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
|
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
|
||||||
|
|
||||||
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||||
$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
$(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||||
|
|
||||||
alltools: $(TOOLS)
|
OBJDIRS += tools
|
||||||
|
|
||||||
tools/%$(EXESUF): tools/%.o
|
|
||||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
|
||||||
|
|
||||||
tools/%.o: tools/%.c
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
|
|
||||||
|
|
||||||
-include $(wildcard tools/*.d)
|
-include $(wildcard tools/*.d)
|
||||||
-include $(wildcard tests/*.d)
|
|
||||||
|
|
||||||
VERSION_SH = $(SRC_PATH_BARE)/version.sh
|
VERSION_SH = $(SRC_PATH)/version.sh
|
||||||
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
|
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
||||||
|
|
||||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
||||||
.version: M=@
|
.version: M=@
|
||||||
@@ -112,28 +103,6 @@ version.h .version:
|
|||||||
# force version.sh to run whenever version might have changed
|
# force version.sh to run whenever version might have changed
|
||||||
-include .version
|
-include .version
|
||||||
|
|
||||||
DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
|
||||||
|
|
||||||
documentation: $(DOCS)
|
|
||||||
|
|
||||||
-include $(wildcard $(DOCS:%=%.d))
|
|
||||||
|
|
||||||
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
|
||||||
|
|
||||||
doc/%.html: TAG = HTML
|
|
||||||
doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $<
|
|
||||||
|
|
||||||
doc/%.pod: TAG = POD
|
|
||||||
doc/%.pod: doc/%.texi
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)doc/texi2pod.pl $< $@
|
|
||||||
|
|
||||||
doc/%.1: TAG = MAN
|
|
||||||
doc/%.1: doc/%.pod
|
|
||||||
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
|
||||||
|
|
||||||
ifdef PROGS
|
ifdef PROGS
|
||||||
install: install-progs install-data
|
install: install-progs install-data
|
||||||
endif
|
endif
|
||||||
@@ -143,7 +112,6 @@ install: install-libs install-headers
|
|||||||
install-libs: install-libs-yes
|
install-libs: install-libs-yes
|
||||||
|
|
||||||
install-progs-yes:
|
install-progs-yes:
|
||||||
install-progs-$(CONFIG_DOC): install-man
|
|
||||||
install-progs-$(CONFIG_SHARED): install-libs
|
install-progs-$(CONFIG_SHARED): install-libs
|
||||||
|
|
||||||
install-progs: install-progs-yes $(PROGS)
|
install-progs: install-progs-yes $(PROGS)
|
||||||
@@ -154,11 +122,7 @@ install-data: $(DATA_FILES)
|
|||||||
$(Q)mkdir -p "$(DATADIR)"
|
$(Q)mkdir -p "$(DATADIR)"
|
||||||
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
||||||
|
|
||||||
install-man: $(MANPAGES)
|
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
|
||||||
$(Q)mkdir -p "$(MANDIR)/man1"
|
|
||||||
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
|
||||||
|
|
||||||
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data uninstall-man
|
|
||||||
|
|
||||||
uninstall-progs:
|
uninstall-progs:
|
||||||
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
||||||
@@ -166,19 +130,9 @@ uninstall-progs:
|
|||||||
uninstall-data:
|
uninstall-data:
|
||||||
$(RM) -r "$(DATADIR)"
|
$(RM) -r "$(DATADIR)"
|
||||||
|
|
||||||
uninstall-man:
|
clean::
|
||||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
|
||||||
|
|
||||||
testclean:
|
|
||||||
$(RM) -r tests/vsynth1 tests/vsynth2 tests/data
|
|
||||||
$(RM) $(addprefix tests/,$(CLEANSUFFIXES))
|
|
||||||
$(RM) tests/seek_test$(EXESUF) tests/seek_test.o
|
|
||||||
$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
|
|
||||||
|
|
||||||
clean:: testclean
|
|
||||||
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
||||||
$(RM) $(CLEANSUFFIXES)
|
$(RM) $(CLEANSUFFIXES)
|
||||||
$(RM) doc/*.html doc/*.pod doc/*.1 doc/*.d doc/*~
|
|
||||||
$(RM) $(TOOLS)
|
$(RM) $(TOOLS)
|
||||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||||
|
|
||||||
@@ -189,122 +143,19 @@ distclean::
|
|||||||
config:
|
config:
|
||||||
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
||||||
|
|
||||||
# regression tests
|
include $(SRC_PATH)/doc/Makefile
|
||||||
|
include $(SRC_PATH)/tests/Makefile
|
||||||
|
|
||||||
check: test
|
$(sort $(OBJDIRS)):
|
||||||
|
$(Q)mkdir -p $@
|
||||||
|
|
||||||
fulltest test: codectest lavftest lavfitest seektest
|
# Dummy rule to stop make trying to rebuild removed or renamed headers
|
||||||
|
%.h:
|
||||||
|
@:
|
||||||
|
|
||||||
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
||||||
|
# so this saves some time on slow systems.
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
codectest: fate-codec
|
.PHONY: all all-yes alltools *clean config examples install*
|
||||||
lavftest: fate-lavf
|
.PHONY: testprogs uninstall*
|
||||||
lavfitest: fate-lavfi
|
|
||||||
seektest: fate-seek
|
|
||||||
|
|
||||||
AREF = fate-acodec-aref
|
|
||||||
VREF = fate-vsynth1-vref fate-vsynth2-vref
|
|
||||||
REFS = $(AREF) $(VREF)
|
|
||||||
|
|
||||||
$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
|
||||||
$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
|
|
||||||
|
|
||||||
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
|
|
||||||
@echo
|
|
||||||
@echo "Unfortunately ffserver is broken and therefore its regression"
|
|
||||||
@echo "test fails randomly. Treat the results accordingly."
|
|
||||||
@echo
|
|
||||||
$(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
|
|
||||||
|
|
||||||
tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
|
|
||||||
@mkdir -p tests/vsynth1
|
|
||||||
$(M)./$< 'tests/vsynth1/'
|
|
||||||
|
|
||||||
tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
|
|
||||||
@mkdir -p tests/vsynth2
|
|
||||||
$(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
|
|
||||||
|
|
||||||
tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
|
|
||||||
@mkdir -p tests/data
|
|
||||||
$(M)./$< $@
|
|
||||||
|
|
||||||
tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
|
|
||||||
|
|
||||||
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
|
|
||||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
|
||||||
|
|
||||||
tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
|
|
||||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
|
||||||
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate2.mak
|
|
||||||
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/aac.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/als.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/fft.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/h264.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/mp3.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/vorbis.mak
|
|
||||||
include $(SRC_PATH_BARE)/tests/fate/vp8.mak
|
|
||||||
|
|
||||||
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
|
|
||||||
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
|
|
||||||
FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
|
|
||||||
FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
|
|
||||||
FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
|
|
||||||
FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
|
|
||||||
FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
|
|
||||||
|
|
||||||
FATE = $(FATE_ACODEC) \
|
|
||||||
$(FATE_VCODEC) \
|
|
||||||
$(FATE_LAVF) \
|
|
||||||
$(FATE_SEEK) \
|
|
||||||
|
|
||||||
FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
|
|
||||||
|
|
||||||
FATE += $(FATE-yes)
|
|
||||||
|
|
||||||
$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
|
|
||||||
$(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
|
|
||||||
$(FATE_LAVF): $(REFS)
|
|
||||||
$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
|
|
||||||
$(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF)
|
|
||||||
|
|
||||||
$(FATE_ACODEC): CMD = codectest acodec
|
|
||||||
$(FATE_VSYNTH1): CMD = codectest vsynth1
|
|
||||||
$(FATE_VSYNTH2): CMD = codectest vsynth2
|
|
||||||
$(FATE_LAVF): CMD = lavftest
|
|
||||||
$(FATE_LAVFI): CMD = lavfitest
|
|
||||||
$(FATE_SEEK): CMD = seektest
|
|
||||||
|
|
||||||
fate-codec: fate-acodec fate-vcodec
|
|
||||||
fate-acodec: $(FATE_ACODEC)
|
|
||||||
fate-vcodec: $(FATE_VCODEC)
|
|
||||||
fate-lavf: $(FATE_LAVF)
|
|
||||||
fate-lavfi: $(FATE_LAVFI)
|
|
||||||
fate-seek: $(FATE_SEEK)
|
|
||||||
|
|
||||||
ifdef SAMPLES
|
|
||||||
FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
|
|
||||||
fate-rsync:
|
|
||||||
rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
|
|
||||||
else
|
|
||||||
fate-rsync:
|
|
||||||
@echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
|
|
||||||
$(FATE_TESTS):
|
|
||||||
@echo "SAMPLES not specified, cannot run FATE. See doc/fate.txt for more information."
|
|
||||||
endif
|
|
||||||
|
|
||||||
FATE_UTILS = base64 tiny_psnr
|
|
||||||
|
|
||||||
fate: $(FATE)
|
|
||||||
|
|
||||||
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
|
||||||
@echo "TEST $(@:fate-%=%)"
|
|
||||||
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
|
|
||||||
|
|
||||||
fate-list:
|
|
||||||
@printf '%s\n' $(sort $(FATE))
|
|
||||||
|
|
||||||
.PHONY: all alltools *clean check config documentation examples install*
|
|
||||||
.PHONY: *test testprogs uninstall*
|
|
||||||
|
217
cmdutils.c
217
cmdutils.c
@@ -49,13 +49,10 @@
|
|||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char **opt_names;
|
|
||||||
const char **opt_values;
|
|
||||||
static int opt_name_count;
|
|
||||||
AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||||
AVFormatContext *avformat_opts;
|
AVFormatContext *avformat_opts;
|
||||||
struct SwsContext *sws_opts;
|
struct SwsContext *sws_opts;
|
||||||
AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
AVDictionary *format_opts, *codec_opts;
|
||||||
|
|
||||||
static const int this_year = 2011;
|
static const int this_year = 2011;
|
||||||
|
|
||||||
@@ -63,7 +60,7 @@ void init_opts(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < AVMEDIA_TYPE_NB; i++)
|
for (i = 0; i < AVMEDIA_TYPE_NB; i++)
|
||||||
avcodec_opts[i] = avcodec_alloc_context2(i);
|
avcodec_opts[i] = avcodec_alloc_context3(NULL);
|
||||||
avformat_opts = avformat_alloc_context();
|
avformat_opts = avformat_alloc_context();
|
||||||
#if CONFIG_SWSCALE
|
#if CONFIG_SWSCALE
|
||||||
sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL);
|
sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL);
|
||||||
@@ -81,17 +78,8 @@ void uninit_opts(void)
|
|||||||
sws_freeContext(sws_opts);
|
sws_freeContext(sws_opts);
|
||||||
sws_opts = NULL;
|
sws_opts = NULL;
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < opt_name_count; i++) {
|
|
||||||
av_freep(&opt_names[i]);
|
|
||||||
av_freep(&opt_values[i]);
|
|
||||||
}
|
|
||||||
av_freep(&opt_names);
|
|
||||||
av_freep(&opt_values);
|
|
||||||
opt_name_count = 0;
|
|
||||||
av_dict_free(&format_opts);
|
av_dict_free(&format_opts);
|
||||||
av_dict_free(&video_opts);
|
av_dict_free(&codec_opts);
|
||||||
av_dict_free(&audio_opts);
|
|
||||||
av_dict_free(&sub_opts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
|
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
|
||||||
@@ -281,7 +269,7 @@ unknown_opt:
|
|||||||
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
|
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
|
||||||
} else if (po->u.func_arg) {
|
} else if (po->u.func_arg) {
|
||||||
if (po->u.func_arg(opt, arg) < 0) {
|
if (po->u.func_arg(opt, arg) < 0) {
|
||||||
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
|
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg ? arg : "[null]", opt);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,20 +285,14 @@ unknown_opt:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define FLAGS (o->type == FF_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
#define FLAGS (o->type == FF_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
||||||
#define SET_PREFIXED_OPTS(ch, flag, output) \
|
int opt_default(const char *opt, const char *arg)
|
||||||
if (opt[0] == ch && avcodec_opts[0] && (o = av_opt_find(avcodec_opts[0], opt+1, NULL, flag, 0)))\
|
|
||||||
av_dict_set(&output, opt+1, arg, FLAGS);
|
|
||||||
static int opt_default2(const char *opt, const char *arg)
|
|
||||||
{
|
{
|
||||||
const AVOption *o;
|
const AVOption *o;
|
||||||
if ((o = av_opt_find(avcodec_opts[0], opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) {
|
if ((o = av_opt_find(avcodec_opts[0], opt, NULL, 0, AV_OPT_SEARCH_CHILDREN)) ||
|
||||||
if (o->flags & AV_OPT_FLAG_VIDEO_PARAM)
|
((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
|
||||||
av_dict_set(&video_opts, opt, arg, FLAGS);
|
(o = av_opt_find(avcodec_opts[0], opt+1, NULL, 0, 0))))
|
||||||
if (o->flags & AV_OPT_FLAG_AUDIO_PARAM)
|
av_dict_set(&codec_opts, opt, arg, FLAGS);
|
||||||
av_dict_set(&audio_opts, opt, arg, FLAGS);
|
else if ((o = av_opt_find(avformat_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN)))
|
||||||
if (o->flags & AV_OPT_FLAG_SUBTITLE_PARAM)
|
|
||||||
av_dict_set(&sub_opts, opt, arg, FLAGS);
|
|
||||||
} else if ((o = av_opt_find(avformat_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN)))
|
|
||||||
av_dict_set(&format_opts, opt, arg, FLAGS);
|
av_dict_set(&format_opts, opt, arg, FLAGS);
|
||||||
else if ((o = av_opt_find(sws_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) {
|
else if ((o = av_opt_find(sws_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) {
|
||||||
// XXX we only support sws_flags, not arbitrary sws options
|
// XXX we only support sws_flags, not arbitrary sws options
|
||||||
@@ -321,93 +303,12 @@ static int opt_default2(const char *opt, const char *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!o) {
|
|
||||||
SET_PREFIXED_OPTS('v', AV_OPT_FLAG_VIDEO_PARAM, video_opts)
|
|
||||||
SET_PREFIXED_OPTS('a', AV_OPT_FLAG_AUDIO_PARAM, audio_opts)
|
|
||||||
SET_PREFIXED_OPTS('s', AV_OPT_FLAG_SUBTITLE_PARAM, sub_opts)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o)
|
if (o)
|
||||||
return 0;
|
return 0;
|
||||||
fprintf(stderr, "Unrecognized option '%s'\n", opt);
|
fprintf(stderr, "Unrecognized option '%s'\n", opt);
|
||||||
return AVERROR_OPTION_NOT_FOUND;
|
return AVERROR_OPTION_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt_default(const char *opt, const char *arg){
|
|
||||||
int type;
|
|
||||||
int ret= 0;
|
|
||||||
const AVOption *o= NULL;
|
|
||||||
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
|
|
||||||
AVCodec *p = NULL;
|
|
||||||
AVOutputFormat *oformat = NULL;
|
|
||||||
AVInputFormat *iformat = NULL;
|
|
||||||
|
|
||||||
while ((p = av_codec_next(p))) {
|
|
||||||
const AVClass *c = p->priv_class;
|
|
||||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (p)
|
|
||||||
goto out;
|
|
||||||
while ((oformat = av_oformat_next(oformat))) {
|
|
||||||
const AVClass *c = oformat->priv_class;
|
|
||||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (oformat)
|
|
||||||
goto out;
|
|
||||||
while ((iformat = av_iformat_next(iformat))) {
|
|
||||||
const AVClass *c = iformat->priv_class;
|
|
||||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (iformat)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
|
|
||||||
const AVOption *o2 = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], 0);
|
|
||||||
if(o2)
|
|
||||||
ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
|
|
||||||
}
|
|
||||||
if(!o && avformat_opts)
|
|
||||||
ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
|
|
||||||
if(!o && sws_opts)
|
|
||||||
ret = av_set_string3(sws_opts, opt, arg, 1, &o);
|
|
||||||
if(!o){
|
|
||||||
if (opt[0] == 'a' && avcodec_opts[AVMEDIA_TYPE_AUDIO])
|
|
||||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
|
|
||||||
else if(opt[0] == 'v' && avcodec_opts[AVMEDIA_TYPE_VIDEO])
|
|
||||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
|
|
||||||
else if(opt[0] == 's' && avcodec_opts[AVMEDIA_TYPE_SUBTITLE])
|
|
||||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
|
|
||||||
if (ret >= 0)
|
|
||||||
opt += 1;
|
|
||||||
}
|
|
||||||
if (o && ret < 0) {
|
|
||||||
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (!o) {
|
|
||||||
fprintf(stderr, "Unrecognized option '%s'\n", opt);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
if ((ret = opt_default2(opt, arg)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL));
|
|
||||||
|
|
||||||
opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1));
|
|
||||||
opt_values[opt_name_count] = av_strdup(arg);
|
|
||||||
opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
|
|
||||||
opt_names[opt_name_count++] = av_strdup(opt);
|
|
||||||
|
|
||||||
if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug))
|
|
||||||
av_log_set_level(AV_LOG_DEBUG);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int opt_loglevel(const char *opt, const char *arg)
|
int opt_loglevel(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
const struct { const char *name; int level; } log_levels[] = {
|
const struct { const char *name; int level; } log_levels[] = {
|
||||||
@@ -456,59 +357,6 @@ int opt_timelimit(const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *alloc_priv_context(int size, const AVClass *class)
|
|
||||||
{
|
|
||||||
void *p = av_mallocz(size);
|
|
||||||
if (p) {
|
|
||||||
*(const AVClass **)p = class;
|
|
||||||
av_opt_set_defaults(p);
|
|
||||||
}
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
void *priv_ctx=NULL;
|
|
||||||
if(!strcmp("AVCodecContext", (*(AVClass**)ctx)->class_name)){
|
|
||||||
AVCodecContext *avctx= ctx;
|
|
||||||
if(codec && codec->priv_class){
|
|
||||||
if(!avctx->priv_data && codec->priv_data_size)
|
|
||||||
avctx->priv_data= alloc_priv_context(codec->priv_data_size, codec->priv_class);
|
|
||||||
priv_ctx= avctx->priv_data;
|
|
||||||
}
|
|
||||||
} else if (!strcmp("AVFormatContext", (*(AVClass**)ctx)->class_name)) {
|
|
||||||
AVFormatContext *avctx = ctx;
|
|
||||||
if (avctx->oformat && avctx->oformat->priv_class) {
|
|
||||||
priv_ctx = avctx->priv_data;
|
|
||||||
} else if (avctx->iformat && avctx->iformat->priv_class) {
|
|
||||||
priv_ctx = avctx->priv_data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0; i<opt_name_count; i++){
|
|
||||||
char buf[256];
|
|
||||||
const AVOption *opt;
|
|
||||||
const char *str;
|
|
||||||
if (priv_ctx) {
|
|
||||||
if (av_find_opt(priv_ctx, opt_names[i], NULL, flags, flags)) {
|
|
||||||
if (av_set_string3(priv_ctx, opt_names[i], opt_values[i], 1, NULL) < 0) {
|
|
||||||
fprintf(stderr, "Invalid value '%s' for option '%s'\n",
|
|
||||||
opt_names[i], opt_values[i]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
goto global;
|
|
||||||
} else {
|
|
||||||
global:
|
|
||||||
str = av_get_string(opts_ctx, opt_names[i], &opt, buf, sizeof(buf));
|
|
||||||
/* if an option with name opt_names[i] is present in opts_ctx then str is non-NULL */
|
|
||||||
if (str && ((opt->flags & flags) == flags))
|
|
||||||
av_set_string3(ctx, opt_names[i], str, 1, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void print_error(const char *filename, int err)
|
void print_error(const char *filename, int err)
|
||||||
{
|
{
|
||||||
char errbuf[128];
|
char errbuf[128];
|
||||||
@@ -934,3 +782,48 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
|||||||
|
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int encoder)
|
||||||
|
{
|
||||||
|
AVDictionary *ret = NULL;
|
||||||
|
AVDictionaryEntry *t = NULL;
|
||||||
|
AVCodec *codec = encoder ? avcodec_find_encoder(codec_id) : avcodec_find_decoder(codec_id);
|
||||||
|
int flags = encoder ? AV_OPT_FLAG_ENCODING_PARAM : AV_OPT_FLAG_DECODING_PARAM;
|
||||||
|
char prefix = 0;
|
||||||
|
|
||||||
|
if (!codec)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
switch (codec->type) {
|
||||||
|
case AVMEDIA_TYPE_VIDEO: prefix = 'v'; flags |= AV_OPT_FLAG_VIDEO_PARAM; break;
|
||||||
|
case AVMEDIA_TYPE_AUDIO: prefix = 'a'; flags |= AV_OPT_FLAG_AUDIO_PARAM; break;
|
||||||
|
case AVMEDIA_TYPE_SUBTITLE: prefix = 's'; flags |= AV_OPT_FLAG_SUBTITLE_PARAM; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) {
|
||||||
|
if (av_opt_find(avcodec_opts[0], t->key, NULL, flags, 0) ||
|
||||||
|
(codec && codec->priv_class && av_opt_find(&codec->priv_class, t->key, NULL, flags, 0)))
|
||||||
|
av_dict_set(&ret, t->key, t->value, 0);
|
||||||
|
else if (t->key[0] == prefix && av_opt_find(avcodec_opts[0], t->key+1, NULL, flags, 0))
|
||||||
|
av_dict_set(&ret, t->key+1, t->value, 0);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
AVDictionary **opts;
|
||||||
|
|
||||||
|
if (!s->nb_streams)
|
||||||
|
return NULL;
|
||||||
|
opts = av_mallocz(s->nb_streams * sizeof(*opts));
|
||||||
|
if (!opts) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Could not alloc memory for stream options.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
for (i = 0; i < s->nb_streams; i++)
|
||||||
|
opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, 0);
|
||||||
|
return opts;
|
||||||
|
}
|
||||||
|
|
||||||
|
27
cmdutils.h
27
cmdutils.h
@@ -43,11 +43,10 @@ extern const char program_name[];
|
|||||||
*/
|
*/
|
||||||
extern const int program_birth_year;
|
extern const int program_birth_year;
|
||||||
|
|
||||||
extern const char **opt_names;
|
|
||||||
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||||
extern AVFormatContext *avformat_opts;
|
extern AVFormatContext *avformat_opts;
|
||||||
extern struct SwsContext *sws_opts;
|
extern struct SwsContext *sws_opts;
|
||||||
extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
extern AVDictionary *format_opts, *codec_opts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the cmdutils option system, in particular
|
* Initialize the cmdutils option system, in particular
|
||||||
@@ -153,7 +152,29 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
|
|||||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||||
int (* parse_arg_function)(const char *opt, const char *arg));
|
int (* parse_arg_function)(const char *opt, const char *arg));
|
||||||
|
|
||||||
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);
|
/**
|
||||||
|
* Filter out options for given codec.
|
||||||
|
*
|
||||||
|
* Create a new options dictionary containing only the options from
|
||||||
|
* opts which apply to the codec with ID codec_id.
|
||||||
|
*
|
||||||
|
* @param encoder if non-zero the codec is an encoder, otherwise is a decoder
|
||||||
|
* @return a pointer to the created dictionary
|
||||||
|
*/
|
||||||
|
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int encoder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup AVCodecContext options for avformat_find_stream_info().
|
||||||
|
*
|
||||||
|
* Create an array of dictionaries, one dictionary for each stream
|
||||||
|
* contained in s.
|
||||||
|
* Each dictionary will contain the options from codec_opts which can
|
||||||
|
* be applied to the corresponding stream codec context.
|
||||||
|
*
|
||||||
|
* @return pointer to the created array of dictionaries, NULL if it
|
||||||
|
* cannot be created
|
||||||
|
*/
|
||||||
|
AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print an error message to stderr, indicating filename and a human
|
* Print an error message to stderr, indicating filename and a human
|
||||||
|
57
common.mak
57
common.mak
@@ -20,20 +20,30 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
|
|||||||
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
IFLAGS := -I. -I$(SRC_PATH)
|
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||||
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
|
||||||
CFLAGS += $(ECFLAGS)
|
|
||||||
YASMFLAGS += $(IFLAGS) -Pconfig.asm
|
|
||||||
|
|
||||||
|
# NASM requires -I path terminated with /
|
||||||
|
IFLAGS := -I. -I$(SRC_PATH)/
|
||||||
|
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
||||||
|
CFLAGS += $(ECFLAGS)
|
||||||
|
CCFLAGS = $(CFLAGS)
|
||||||
|
YASMFLAGS += $(IFLAGS) -Pconfig.asm
|
||||||
HOSTCFLAGS += $(IFLAGS)
|
HOSTCFLAGS += $(IFLAGS)
|
||||||
|
LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
$($(1)DEP)
|
||||||
|
$($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
|
||||||
|
endef
|
||||||
|
|
||||||
|
COMPILE_C = $(call COMPILE,CC)
|
||||||
|
COMPILE_S = $(call COMPILE,AS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CCDEP)
|
$(COMPILE_C)
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
|
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(ASDEP)
|
$(COMPILE_S)
|
||||||
$(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
%.ho: %.h
|
%.ho: %.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
||||||
@@ -61,29 +71,40 @@ OBJS += $(OBJS-yes)
|
|||||||
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
||||||
TESTPROGS += $(TESTPROGS-yes)
|
TESTPROGS += $(TESTPROGS-yes)
|
||||||
|
|
||||||
FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
|
FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
|
||||||
FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS)
|
|
||||||
|
|
||||||
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
|
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
|
||||||
OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
|
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
|
||||||
TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
|
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
|
||||||
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
|
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
|
||||||
HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
|
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
|
||||||
HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
|
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
|
||||||
|
TOOLS += $(TOOLS-yes)
|
||||||
|
TOOLOBJS := $(TOOLS:%=tools/%.o)
|
||||||
|
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
||||||
|
|
||||||
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||||
|
|
||||||
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
||||||
SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
|
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
||||||
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
|
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
||||||
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
||||||
|
|
||||||
|
alltools: $(TOOLS)
|
||||||
|
|
||||||
$(HOSTOBJS): %.o: %.c
|
$(HOSTOBJS): %.o: %.c
|
||||||
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
||||||
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
||||||
|
|
||||||
|
$(OBJS): | $(sort $(dir $(OBJS)))
|
||||||
|
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
|
||||||
|
$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
|
||||||
|
$(TOOLOBJS): | tools
|
||||||
|
|
||||||
|
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))
|
||||||
|
|
||||||
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
||||||
DISTCLEANSUFFIXES = *.pc
|
DISTCLEANSUFFIXES = *.pc
|
||||||
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
||||||
|
193
configure
vendored
193
configure
vendored
@@ -72,6 +72,9 @@ Standard options:
|
|||||||
--mandir=DIR install man page in DIR [PREFIX/share/man]
|
--mandir=DIR install man page in DIR [PREFIX/share/man]
|
||||||
|
|
||||||
Configuration options:
|
Configuration options:
|
||||||
|
--enable-building enable building ONLY if you understand the
|
||||||
|
potential security risk posed by using this
|
||||||
|
branch (oldabi)
|
||||||
--disable-static do not build static libraries [no]
|
--disable-static do not build static libraries [no]
|
||||||
--enable-shared build shared libraries [no]
|
--enable-shared build shared libraries [no]
|
||||||
--enable-gpl allow use of GPL code, the resulting libs
|
--enable-gpl allow use of GPL code, the resulting libs
|
||||||
@@ -106,8 +109,8 @@ Configuration options:
|
|||||||
--disable-lpc disable LPC code
|
--disable-lpc disable LPC code
|
||||||
--disable-mdct disable MDCT code
|
--disable-mdct disable MDCT code
|
||||||
--disable-rdft disable RDFT code
|
--disable-rdft disable RDFT code
|
||||||
--enable-vaapi enable VAAPI code
|
--enable-vaapi enable VAAPI code [autodetect]
|
||||||
--enable-vdpau enable VDPAU code
|
--enable-vdpau enable VDPAU code [autodetect]
|
||||||
--disable-dxva2 disable DXVA2 code
|
--disable-dxva2 disable DXVA2 code
|
||||||
--enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
|
--enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
|
||||||
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
|
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
|
||||||
@@ -189,6 +192,7 @@ External library support:
|
|||||||
--enable-libxavs enable AVS encoding via xavs [no]
|
--enable-libxavs enable AVS encoding via xavs [no]
|
||||||
--enable-libxvid enable Xvid encoding via xvidcore,
|
--enable-libxvid enable Xvid encoding via xvidcore,
|
||||||
native MPEG-4/Xvid encoder exists [no]
|
native MPEG-4/Xvid encoder exists [no]
|
||||||
|
--enable-openal enable OpenAL 1.1 capture support [no]
|
||||||
--enable-mlib enable Sun medialib [no]
|
--enable-mlib enable Sun medialib [no]
|
||||||
--enable-zlib enable zlib [autodetect]
|
--enable-zlib enable zlib [autodetect]
|
||||||
|
|
||||||
@@ -239,6 +243,7 @@ Advanced options (experts only):
|
|||||||
--malloc-prefix=PFX prefix malloc and related names with PFX
|
--malloc-prefix=PFX prefix malloc and related names with PFX
|
||||||
--enable-sram allow use of on-chip SRAM
|
--enable-sram allow use of on-chip SRAM
|
||||||
--disable-symver disable symbol versioning
|
--disable-symver disable symbol versioning
|
||||||
|
--optflags override optimization-related compiler flags
|
||||||
|
|
||||||
Developer options (useful when working on FFmpeg itself):
|
Developer options (useful when working on FFmpeg itself):
|
||||||
--disable-debug disable debugging symbols
|
--disable-debug disable debugging symbols
|
||||||
@@ -877,9 +882,9 @@ apply(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
cp_if_changed(){
|
cp_if_changed(){
|
||||||
cmp -s "$1" "$2" &&
|
cmp -s "$1" "$2" && echo "$2 is unchanged" && return
|
||||||
echo "$2 is unchanged" ||
|
mkdir -p "$(dirname $2)"
|
||||||
cp -f "$1" "$2"
|
cp -f "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
|
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
|
||||||
@@ -908,6 +913,7 @@ CONFIG_LIST="
|
|||||||
avfilter
|
avfilter
|
||||||
avformat
|
avformat
|
||||||
avisynth
|
avisynth
|
||||||
|
building
|
||||||
bzlib
|
bzlib
|
||||||
crystalhd
|
crystalhd
|
||||||
dct
|
dct
|
||||||
@@ -961,6 +967,7 @@ CONFIG_LIST="
|
|||||||
mpegaudiodsp
|
mpegaudiodsp
|
||||||
network
|
network
|
||||||
nonfree
|
nonfree
|
||||||
|
openal
|
||||||
pic
|
pic
|
||||||
postproc
|
postproc
|
||||||
rdft
|
rdft
|
||||||
@@ -973,6 +980,7 @@ CONFIG_LIST="
|
|||||||
static
|
static
|
||||||
swscale
|
swscale
|
||||||
swscale_alpha
|
swscale_alpha
|
||||||
|
thumb
|
||||||
vaapi
|
vaapi
|
||||||
vdpau
|
vdpau
|
||||||
version3
|
version3
|
||||||
@@ -1097,7 +1105,6 @@ HAVE_LIST="
|
|||||||
memalign
|
memalign
|
||||||
mkstemp
|
mkstemp
|
||||||
mmap
|
mmap
|
||||||
pld
|
|
||||||
posix_memalign
|
posix_memalign
|
||||||
round
|
round
|
||||||
roundf
|
roundf
|
||||||
@@ -1110,6 +1117,7 @@ HAVE_LIST="
|
|||||||
poll_h
|
poll_h
|
||||||
setrlimit
|
setrlimit
|
||||||
strerror_r
|
strerror_r
|
||||||
|
strptime
|
||||||
strtok_r
|
strtok_r
|
||||||
struct_addrinfo
|
struct_addrinfo
|
||||||
struct_ipv6_mreq
|
struct_ipv6_mreq
|
||||||
@@ -1124,7 +1132,6 @@ HAVE_LIST="
|
|||||||
sys_select_h
|
sys_select_h
|
||||||
sys_soundcard_h
|
sys_soundcard_h
|
||||||
sys_videoio_h
|
sys_videoio_h
|
||||||
ten_operands
|
|
||||||
termios_h
|
termios_h
|
||||||
threads
|
threads
|
||||||
trunc
|
trunc
|
||||||
@@ -1190,6 +1197,7 @@ CMDLINE_SET="
|
|||||||
logfile
|
logfile
|
||||||
malloc_prefix
|
malloc_prefix
|
||||||
nm
|
nm
|
||||||
|
optflags
|
||||||
pkg_config
|
pkg_config
|
||||||
samples
|
samples
|
||||||
strip
|
strip
|
||||||
@@ -1279,6 +1287,7 @@ flac_encoder_select="golomb lpc"
|
|||||||
flashsv_decoder_select="zlib"
|
flashsv_decoder_select="zlib"
|
||||||
flashsv_encoder_select="zlib"
|
flashsv_encoder_select="zlib"
|
||||||
flashsv2_encoder_select="zlib"
|
flashsv2_encoder_select="zlib"
|
||||||
|
flashsv2_decoder_select="zlib"
|
||||||
flv_decoder_select="h263_decoder"
|
flv_decoder_select="h263_decoder"
|
||||||
flv_encoder_select="h263_encoder"
|
flv_encoder_select="h263_encoder"
|
||||||
fraps_decoder_select="huffman"
|
fraps_decoder_select="huffman"
|
||||||
@@ -1473,6 +1482,7 @@ dv1394_indev_deps="dv1394 dv_demuxer"
|
|||||||
fbdev_indev_deps="linux_fb_h"
|
fbdev_indev_deps="linux_fb_h"
|
||||||
jack_indev_deps="jack_jack_h sem_timedwait"
|
jack_indev_deps="jack_jack_h sem_timedwait"
|
||||||
libdc1394_indev_deps="libdc1394"
|
libdc1394_indev_deps="libdc1394"
|
||||||
|
openal_indev_deps="openal"
|
||||||
oss_indev_deps_any="soundcard_h sys_soundcard_h"
|
oss_indev_deps_any="soundcard_h sys_soundcard_h"
|
||||||
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
|
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
|
||||||
sdl_outdev_deps="sdl"
|
sdl_outdev_deps="sdl"
|
||||||
@@ -1498,6 +1508,7 @@ udp_protocol_deps="network"
|
|||||||
|
|
||||||
# filters
|
# filters
|
||||||
blackframe_filter_deps="gpl"
|
blackframe_filter_deps="gpl"
|
||||||
|
boxblur_filter_deps="gpl"
|
||||||
cropdetect_filter_deps="gpl"
|
cropdetect_filter_deps="gpl"
|
||||||
drawtext_filter_deps="libfreetype"
|
drawtext_filter_deps="libfreetype"
|
||||||
frei0r_filter_deps="frei0r dlopen strtok_r"
|
frei0r_filter_deps="frei0r dlopen strtok_r"
|
||||||
@@ -1519,7 +1530,7 @@ postproc_deps="gpl"
|
|||||||
ffmpeg_deps="avcodec avformat swscale"
|
ffmpeg_deps="avcodec avformat swscale"
|
||||||
ffmpeg_select="buffer_filter buffersink_filter"
|
ffmpeg_select="buffer_filter buffersink_filter"
|
||||||
ffplay_deps="avcodec avformat swscale sdl"
|
ffplay_deps="avcodec avformat swscale sdl"
|
||||||
ffplay_select="rdft"
|
ffplay_select="buffersink_filter rdft"
|
||||||
ffprobe_deps="avcodec avformat"
|
ffprobe_deps="avcodec avformat"
|
||||||
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
|
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
|
||||||
ffserver_extralibs='$ldl'
|
ffserver_extralibs='$ldl'
|
||||||
@@ -1541,11 +1552,6 @@ test_deps(){
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
set_ne_test_deps(){
|
|
||||||
eval ${1}_be_test_deps="bigendian"
|
|
||||||
eval ${1}_le_test_deps="!bigendian"
|
|
||||||
}
|
|
||||||
|
|
||||||
mxf_d10_test_deps="avfilter"
|
mxf_d10_test_deps="avfilter"
|
||||||
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
|
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
|
||||||
|
|
||||||
@@ -1625,15 +1631,6 @@ test_deps _muxer _demuxer \
|
|||||||
ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer"
|
ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer"
|
||||||
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
|
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
|
||||||
|
|
||||||
set_ne_test_deps pixdesc
|
|
||||||
set_ne_test_deps pixfmts_copy
|
|
||||||
set_ne_test_deps pixfmts_crop
|
|
||||||
set_ne_test_deps pixfmts_hflip
|
|
||||||
set_ne_test_deps pixfmts_null
|
|
||||||
set_ne_test_deps pixfmts_pad
|
|
||||||
set_ne_test_deps pixfmts_scale
|
|
||||||
set_ne_test_deps pixfmts_vflip
|
|
||||||
|
|
||||||
# default parameters
|
# default parameters
|
||||||
|
|
||||||
logfile="config.log"
|
logfile="config.log"
|
||||||
@@ -1708,7 +1705,10 @@ SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
|
|||||||
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
|
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
|
||||||
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
|
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
|
||||||
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
|
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
|
||||||
|
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
|
||||||
|
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
|
||||||
|
|
||||||
|
AS_O='-o $@'
|
||||||
CC_O='-o $@'
|
CC_O='-o $@'
|
||||||
|
|
||||||
host_cflags='-D_ISOC99_SOURCE -O3 -g'
|
host_cflags='-D_ISOC99_SOURCE -O3 -g'
|
||||||
@@ -1723,11 +1723,9 @@ DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
|
|||||||
|
|
||||||
# find source path
|
# find source path
|
||||||
if test -f configure; then
|
if test -f configure; then
|
||||||
source_path="$(pwd)"
|
source_path=.
|
||||||
disable source_path_used
|
|
||||||
else
|
else
|
||||||
source_path=$(cd $(dirname "$0"); pwd)
|
source_path=$(cd $(dirname "$0"); pwd)
|
||||||
enable source_path_used
|
|
||||||
echo "$source_path" | grep -q '[[:blank:]]' &&
|
echo "$source_path" | grep -q '[[:blank:]]' &&
|
||||||
die "Out of tree builds are impossible with whitespace in source path."
|
die "Out of tree builds are impossible with whitespace in source path."
|
||||||
test -e "$source_path/config.h" &&
|
test -e "$source_path/config.h" &&
|
||||||
@@ -1942,6 +1940,22 @@ filter_cflags=echo
|
|||||||
filter_cppflags=echo
|
filter_cppflags=echo
|
||||||
filter_asflags=echo
|
filter_asflags=echo
|
||||||
|
|
||||||
|
if ! enabled building; then
|
||||||
|
cat <<EOF
|
||||||
|
!!!! WARNING !!!!
|
||||||
|
|
||||||
|
This branch is NOT actively maintained and CAN contain serious security
|
||||||
|
issues. This branch is only provided for historical interest.
|
||||||
|
|
||||||
|
For a newer branch with the old API/ABI, please use release/0.5 or
|
||||||
|
release/0.7.
|
||||||
|
|
||||||
|
If you really want to build this, pass --enable-building to configure.
|
||||||
|
EOF
|
||||||
|
log --enable-building not enabled. Aborting.
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
|
if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
|
||||||
cc_type=llvm_gcc
|
cc_type=llvm_gcc
|
||||||
cc_version=__VERSION__
|
cc_version=__VERSION__
|
||||||
@@ -2064,6 +2078,7 @@ elif $cc -V 2>&1 | grep -q Sun; then
|
|||||||
cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
|
cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
|
||||||
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
|
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
|
||||||
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
|
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
|
||||||
|
add_ldflags -xc99
|
||||||
speed_cflags='-O5'
|
speed_cflags='-O5'
|
||||||
size_cflags='-O5 -xspace'
|
size_cflags='-O5 -xspace'
|
||||||
filter_cflags=suncc_flags
|
filter_cflags=suncc_flags
|
||||||
@@ -2154,7 +2169,7 @@ if test "$cpu" = host; then
|
|||||||
gcc|llvm_gcc)
|
gcc|llvm_gcc)
|
||||||
check_native(){
|
check_native(){
|
||||||
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
|
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
|
||||||
sed -n "/$1=/{
|
sed -n "/cc1.*$1=/{
|
||||||
s/.*$1=\\([^ ]*\\).*/\\1/
|
s/.*$1=\\([^ ]*\\).*/\\1/
|
||||||
p
|
p
|
||||||
q
|
q
|
||||||
@@ -2203,7 +2218,7 @@ case "$arch" in
|
|||||||
arch="sparc"
|
arch="sparc"
|
||||||
subarch="sparc64"
|
subarch="sparc64"
|
||||||
;;
|
;;
|
||||||
i[3-6]86|i86pc|BePC|x86pc|x86_64|amd64)
|
i[3-6]86|i86pc|BePC|x86pc|x86_64|x86_32|amd64)
|
||||||
arch="x86"
|
arch="x86"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -2269,7 +2284,7 @@ elif enabled x86; then
|
|||||||
disable cmov
|
disable cmov
|
||||||
;;
|
;;
|
||||||
# targets that do support conditional mov (cmov)
|
# targets that do support conditional mov (cmov)
|
||||||
i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2|amdfam10|barcelona|atom)
|
i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom)
|
||||||
cpuflags="-march=$cpu"
|
cpuflags="-march=$cpu"
|
||||||
enable cmov
|
enable cmov
|
||||||
enable fast_cmov
|
enable fast_cmov
|
||||||
@@ -2306,7 +2321,7 @@ elif enabled arm; then
|
|||||||
case $cpu in
|
case $cpu in
|
||||||
cortex-a*) subarch=armv7a ;;
|
cortex-a*) subarch=armv7a ;;
|
||||||
cortex-r*) subarch=armv7r ;;
|
cortex-r*) subarch=armv7r ;;
|
||||||
cortex-m*) subarch=armv7m ;;
|
cortex-m*) enable thumb; subarch=armv7m ;;
|
||||||
arm11*) subarch=armv6 ;;
|
arm11*) subarch=armv6 ;;
|
||||||
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
|
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
|
||||||
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
|
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
|
||||||
@@ -2474,12 +2489,11 @@ case $target_os in
|
|||||||
SLIBSUF=".dll"
|
SLIBSUF=".dll"
|
||||||
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
|
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
|
||||||
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
|
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
|
||||||
SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
|
SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
|
||||||
SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
|
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
|
||||||
install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
|
SLIB_INSTALL_LINKS=
|
||||||
install -d "$(LIBDIR)"; \
|
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
|
||||||
install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"'
|
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
|
||||||
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
|
|
||||||
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
|
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
|
||||||
objformat="win32"
|
objformat="win32"
|
||||||
enable dos_paths
|
enable dos_paths
|
||||||
@@ -2537,8 +2551,7 @@ case $target_os in
|
|||||||
emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
|
emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
|
||||||
SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
|
SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
|
||||||
emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
|
emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
|
||||||
SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
|
SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib'
|
||||||
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
|
|
||||||
enable dos_paths
|
enable dos_paths
|
||||||
;;
|
;;
|
||||||
gnu/kfreebsd)
|
gnu/kfreebsd)
|
||||||
@@ -2554,7 +2567,14 @@ case $target_os in
|
|||||||
symbian)
|
symbian)
|
||||||
SLIBSUF=".dll"
|
SLIBSUF=".dll"
|
||||||
enable dos_paths
|
enable dos_paths
|
||||||
add_cflags --include=$sysinclude/gcce/gcce.h
|
add_cflags --include=$sysinclude/gcce/gcce.h -fvisibility=default
|
||||||
|
add_cppflags -D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS
|
||||||
|
add_ldflags -Wl,--target1-abs,--no-undefined \
|
||||||
|
-Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \
|
||||||
|
-Wl,--entry=_E32Startup -Wl,-u,_E32Startup
|
||||||
|
add_extralibs -l:eexe.lib -l:usrt2_2.lib -l:dfpaeabi.dso \
|
||||||
|
-l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \
|
||||||
|
-l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib
|
||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
;;
|
;;
|
||||||
@@ -2580,8 +2600,6 @@ EOF
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
disabled static && LIBNAME=""
|
|
||||||
|
|
||||||
die_license_disabled() {
|
die_license_disabled() {
|
||||||
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
|
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
|
||||||
}
|
}
|
||||||
@@ -2648,7 +2666,7 @@ if enabled alpha; then
|
|||||||
|
|
||||||
elif enabled arm; then
|
elif enabled arm; then
|
||||||
|
|
||||||
check_cflags -marm
|
enabled thumb && check_cflags -mthumb || check_cflags -marm
|
||||||
nogas=die
|
nogas=die
|
||||||
|
|
||||||
if check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
|
if check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
|
||||||
@@ -2664,9 +2682,6 @@ EOF
|
|||||||
warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
|
warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We have to check if pld is a nop and disable it.
|
|
||||||
check_asm pld '"pld [r0]"'
|
|
||||||
|
|
||||||
enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
|
enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
|
||||||
enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
|
enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
|
||||||
enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
|
enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
|
||||||
@@ -2743,18 +2758,6 @@ EOF
|
|||||||
# check whether xmm clobbers are supported
|
# check whether xmm clobbers are supported
|
||||||
check_asm xmm_clobbers '"":::"%xmm0"'
|
check_asm xmm_clobbers '"":::"%xmm0"'
|
||||||
|
|
||||||
# check whether more than 10 operands are supported
|
|
||||||
check_cc <<EOF && enable ten_operands
|
|
||||||
int main(void) {
|
|
||||||
int x=0;
|
|
||||||
__asm__ volatile(
|
|
||||||
""
|
|
||||||
:"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
|
|
||||||
);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# check whether binutils is new enough to compile SSSE3/MMX2
|
# check whether binutils is new enough to compile SSSE3/MMX2
|
||||||
enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
|
enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
|
||||||
enabled mmx2 && check_asm mmx2 '"pmaxub %mm0, %mm1"'
|
enabled mmx2 && check_asm mmx2 '"pmaxub %mm0, %mm1"'
|
||||||
@@ -2849,6 +2852,7 @@ check_func mmap
|
|||||||
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
|
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
|
||||||
check_func setrlimit
|
check_func setrlimit
|
||||||
check_func strerror_r
|
check_func strerror_r
|
||||||
|
check_func strptime
|
||||||
check_func strtok_r
|
check_func strtok_r
|
||||||
check_func_headers conio.h kbhit
|
check_func_headers conio.h kbhit
|
||||||
check_func_headers io.h setmode
|
check_func_headers io.h setmode
|
||||||
@@ -2955,6 +2959,11 @@ enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
|
|||||||
die "ERROR: libx264 version must be >= 0.115."; }
|
die "ERROR: libx264 version must be >= 0.115."; }
|
||||||
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
|
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
|
||||||
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
|
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
|
||||||
|
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
|
||||||
|
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
|
||||||
|
die "ERROR: openal not found"; } &&
|
||||||
|
{ check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
|
||||||
|
die "ERROR: openal version must be 1.1 or compatible"; }
|
||||||
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
|
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
|
||||||
|
|
||||||
SDL_CONFIG="${cross_prefix}sdl-config"
|
SDL_CONFIG="${cross_prefix}sdl-config"
|
||||||
@@ -3043,6 +3052,7 @@ check_cflags -Wdeclaration-after-statement
|
|||||||
check_cflags -Wall
|
check_cflags -Wall
|
||||||
check_cflags -Wno-parentheses
|
check_cflags -Wno-parentheses
|
||||||
check_cflags -Wno-switch
|
check_cflags -Wno-switch
|
||||||
|
check_cflags -Wno-format-zero-length
|
||||||
check_cflags -Wdisabled-optimization
|
check_cflags -Wdisabled-optimization
|
||||||
check_cflags -Wpointer-arith
|
check_cflags -Wpointer-arith
|
||||||
check_cflags -Wredundant-decls
|
check_cflags -Wredundant-decls
|
||||||
@@ -3057,7 +3067,7 @@ enabled extra_warnings && check_cflags -Winline
|
|||||||
|
|
||||||
# add some linker flags
|
# add some linker flags
|
||||||
check_ldflags -Wl,--warn-common
|
check_ldflags -Wl,--warn-common
|
||||||
check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
|
check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
|
||||||
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
|
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
|
||||||
|
|
||||||
echo "X{};" > $TMPV
|
echo "X{};" > $TMPV
|
||||||
@@ -3073,7 +3083,9 @@ void ff_foo(void) {}
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if enabled small; then
|
if [ -n "$optflags" ]; then
|
||||||
|
add_cflags $optflags
|
||||||
|
elif enabled small; then
|
||||||
add_cflags $size_cflags
|
add_cflags $size_cflags
|
||||||
elif enabled optimizations; then
|
elif enabled optimizations; then
|
||||||
add_cflags $speed_cflags
|
add_cflags $speed_cflags
|
||||||
@@ -3164,7 +3176,7 @@ check_deps $CONFIG_LIST \
|
|||||||
|
|
||||||
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
|
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
|
||||||
|
|
||||||
if test $target_os == "haiku"; then
|
if test $target_os = "haiku"; then
|
||||||
disable memalign
|
disable memalign
|
||||||
disable posix_memalign
|
disable posix_memalign
|
||||||
fi
|
fi
|
||||||
@@ -3197,7 +3209,6 @@ if enabled x86; then
|
|||||||
echo "CMOV is fast ${fast_cmov-no}"
|
echo "CMOV is fast ${fast_cmov-no}"
|
||||||
echo "EBX available ${ebx_available-no}"
|
echo "EBX available ${ebx_available-no}"
|
||||||
echo "EBP available ${ebp_available-no}"
|
echo "EBP available ${ebp_available-no}"
|
||||||
echo "10 operands supported ${ten_operands-no}"
|
|
||||||
fi
|
fi
|
||||||
if enabled arm; then
|
if enabled arm; then
|
||||||
echo "ARMv5TE enabled ${armv5te-no}"
|
echo "ARMv5TE enabled ${armv5te-no}"
|
||||||
@@ -3230,6 +3241,9 @@ echo "network support ${network-no}"
|
|||||||
echo "threading support ${thread_type-no}"
|
echo "threading support ${thread_type-no}"
|
||||||
echo "SDL support ${sdl-no}"
|
echo "SDL support ${sdl-no}"
|
||||||
echo "Sun medialib support ${mlib-no}"
|
echo "Sun medialib support ${mlib-no}"
|
||||||
|
echo "libdxva2 enabled ${dxva2-no}"
|
||||||
|
echo "libva enabled ${vaapi-no}"
|
||||||
|
echo "libvdpau enabled ${vdpau-no}"
|
||||||
echo "AVISynth enabled ${avisynth-no}"
|
echo "AVISynth enabled ${avisynth-no}"
|
||||||
echo "libcelt enabled ${libcelt-no}"
|
echo "libcelt enabled ${libcelt-no}"
|
||||||
echo "frei0r enabled ${frei0r-no}"
|
echo "frei0r enabled ${frei0r-no}"
|
||||||
@@ -3248,7 +3262,6 @@ echo "librtmp enabled ${librtmp-no}"
|
|||||||
echo "libschroedinger enabled ${libschroedinger-no}"
|
echo "libschroedinger enabled ${libschroedinger-no}"
|
||||||
echo "libspeex enabled ${libspeex-no}"
|
echo "libspeex enabled ${libspeex-no}"
|
||||||
echo "libtheora enabled ${libtheora-no}"
|
echo "libtheora enabled ${libtheora-no}"
|
||||||
echo "libva enabled ${vaapi-no}"
|
|
||||||
echo "libvo-aacenc support ${libvo_aacenc-no}"
|
echo "libvo-aacenc support ${libvo_aacenc-no}"
|
||||||
echo "libvo-amrwbenc support ${libvo_amrwbenc-no}"
|
echo "libvo-amrwbenc support ${libvo_amrwbenc-no}"
|
||||||
echo "libvorbis enabled ${libvorbis-no}"
|
echo "libvorbis enabled ${libvorbis-no}"
|
||||||
@@ -3256,6 +3269,7 @@ echo "libvpx enabled ${libvpx-no}"
|
|||||||
echo "libx264 enabled ${libx264-no}"
|
echo "libx264 enabled ${libx264-no}"
|
||||||
echo "libxavs enabled ${libxavs-no}"
|
echo "libxavs enabled ${libxavs-no}"
|
||||||
echo "libxvid enabled ${libxvid-no}"
|
echo "libxvid enabled ${libxvid-no}"
|
||||||
|
echo "openal enabled ${openal-no}"
|
||||||
echo "zlib enabled ${zlib-no}"
|
echo "zlib enabled ${zlib-no}"
|
||||||
echo "bzlib enabled ${bzlib-no}"
|
echo "bzlib enabled ${bzlib-no}"
|
||||||
echo
|
echo
|
||||||
@@ -3282,46 +3296,7 @@ echo "License: $license"
|
|||||||
|
|
||||||
echo "Creating config.mak and config.h..."
|
echo "Creating config.mak and config.h..."
|
||||||
|
|
||||||
# build tree in object directory if source path is different from current one
|
test -e Makefile || $ln_s "$source_path/Makefile" .
|
||||||
if enabled source_path_used; then
|
|
||||||
DIRS="
|
|
||||||
doc
|
|
||||||
libavcodec
|
|
||||||
libavcodec/$arch
|
|
||||||
libavcodec/mlib
|
|
||||||
libavdevice
|
|
||||||
libavfilter
|
|
||||||
libavfilter/$arch
|
|
||||||
libavfilter/libmpcodecs
|
|
||||||
libavfilter/libmpcodecs/libvo
|
|
||||||
libavformat
|
|
||||||
libavutil
|
|
||||||
libavutil/$arch
|
|
||||||
libpostproc
|
|
||||||
libswscale
|
|
||||||
libswscale/$arch
|
|
||||||
libswscale/mlib
|
|
||||||
tests
|
|
||||||
tools
|
|
||||||
"
|
|
||||||
FILES="
|
|
||||||
Makefile
|
|
||||||
common.mak
|
|
||||||
subdir.mak
|
|
||||||
doc/texi2pod.pl
|
|
||||||
libavcodec/Makefile
|
|
||||||
libavcodec/${arch}/Makefile
|
|
||||||
libavdevice/Makefile
|
|
||||||
libavfilter/Makefile
|
|
||||||
libavfilter/${arch}/Makefile
|
|
||||||
libavformat/Makefile
|
|
||||||
libavutil/Makefile
|
|
||||||
libpostproc/Makefile
|
|
||||||
libswscale/Makefile
|
|
||||||
"
|
|
||||||
map 'mkdir -p $v' $DIRS;
|
|
||||||
map 'test -f "$source_path/$v" && $ln_s "$source_path/$v" $v' $FILES
|
|
||||||
fi
|
|
||||||
|
|
||||||
enabled stripping || strip="echo skipping strip"
|
enabled stripping || strip="echo skipping strip"
|
||||||
|
|
||||||
@@ -3339,8 +3314,10 @@ INCDIR=\$(DESTDIR)$incdir
|
|||||||
BINDIR=\$(DESTDIR)$bindir
|
BINDIR=\$(DESTDIR)$bindir
|
||||||
DATADIR=\$(DESTDIR)$datadir
|
DATADIR=\$(DESTDIR)$datadir
|
||||||
MANDIR=\$(DESTDIR)$mandir
|
MANDIR=\$(DESTDIR)$mandir
|
||||||
SRC_PATH="$source_path"
|
SRC_PATH=$source_path
|
||||||
SRC_PATH_BARE=$source_path
|
ifndef MAIN_MAKEFILE
|
||||||
|
SRC_PATH:=\$(SRC_PATH:.%=..%)
|
||||||
|
endif
|
||||||
CC_IDENT=$cc_ident
|
CC_IDENT=$cc_ident
|
||||||
ARCH=$arch
|
ARCH=$arch
|
||||||
CC=$cc
|
CC=$cc
|
||||||
@@ -3357,6 +3334,7 @@ STRIP=$strip
|
|||||||
CPPFLAGS=$CPPFLAGS
|
CPPFLAGS=$CPPFLAGS
|
||||||
CFLAGS=$CFLAGS
|
CFLAGS=$CFLAGS
|
||||||
ASFLAGS=$ASFLAGS
|
ASFLAGS=$ASFLAGS
|
||||||
|
AS_O=$CC_O
|
||||||
CC_O=$CC_O
|
CC_O=$CC_O
|
||||||
LDFLAGS=$LDFLAGS
|
LDFLAGS=$LDFLAGS
|
||||||
FFSERVERLDFLAGS=$FFSERVERLDFLAGS
|
FFSERVERLDFLAGS=$FFSERVERLDFLAGS
|
||||||
@@ -3394,8 +3372,10 @@ SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
|
|||||||
SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}
|
SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}
|
||||||
SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}
|
SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}
|
||||||
SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
|
SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
|
||||||
SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}
|
SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
|
||||||
SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}
|
SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
|
||||||
|
SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
|
||||||
|
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
|
||||||
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
|
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
|
||||||
NOREDZONE_FLAGS=$noredzone_flags
|
NOREDZONE_FLAGS=$noredzone_flags
|
||||||
EOF
|
EOF
|
||||||
@@ -3507,6 +3487,7 @@ version=$3
|
|||||||
libs=$4
|
libs=$4
|
||||||
requires=$5
|
requires=$5
|
||||||
enabled ${name#lib} || return 0
|
enabled ${name#lib} || return 0
|
||||||
|
mkdir -p $name
|
||||||
cat <<EOF > $name/$name.pc
|
cat <<EOF > $name/$name.pc
|
||||||
prefix=$prefix
|
prefix=$prefix
|
||||||
exec_prefix=\${prefix}
|
exec_prefix=\${prefix}
|
||||||
@@ -3544,5 +3525,5 @@ pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$ext
|
|||||||
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
|
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
|
||||||
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
|
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
|
||||||
pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
|
pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
|
||||||
pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
|
pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
|
||||||
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
|
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
|
||||||
|
@@ -13,6 +13,21 @@ libavutil: 2011-04-18
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2011-08-02 - 9d39cbf - lavc 53.7.1
|
||||||
|
Add AV_PKT_FLAG_CORRUPT AVPacket flag.
|
||||||
|
|
||||||
|
2011-07-10 - a67c061 - lavf 53.3.0
|
||||||
|
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||||
|
|
||||||
|
2011-07-10 - 0b950fe - lavc 53.6.0
|
||||||
|
Add avcodec_open2(), deprecate avcodec_open().
|
||||||
|
|
||||||
|
2011-07-01 - b442ca6 - lavf 53.5.0 - avformat.h
|
||||||
|
Add function av_get_output_timestamp().
|
||||||
|
|
||||||
|
2011-06-28 - 5129336 - lavu 51.11.0 - avutil.h
|
||||||
|
Define the AV_PICTURE_TYPE_NONE value in AVPictureType enum.
|
||||||
|
|
||||||
2011-06-19 - xxxxxxx - lavfi 2.23.0 - avfilter.h
|
2011-06-19 - xxxxxxx - lavfi 2.23.0 - avfilter.h
|
||||||
Add layout negotiation fields and helper functions.
|
Add layout negotiation fields and helper functions.
|
||||||
|
|
||||||
@@ -43,17 +58,20 @@ API changes, most recent first:
|
|||||||
2011-06-12 - xxxxxxx - lavfi 2.16.0 - avfilter_graph_parse()
|
2011-06-12 - xxxxxxx - lavfi 2.16.0 - avfilter_graph_parse()
|
||||||
Change avfilter_graph_parse() signature.
|
Change avfilter_graph_parse() signature.
|
||||||
|
|
||||||
2011-06-xx - xxxxxxx - lavf 53.2.0 - avformat.h
|
2011-06-23 - 67e9ae1 - lavu 51.8.0 - attributes.h
|
||||||
|
Add av_printf_format().
|
||||||
|
|
||||||
|
2011-06-16 - 05e84c9, 25de595 - lavf 53.2.0 - avformat.h
|
||||||
Add avformat_open_input and avformat_write_header().
|
Add avformat_open_input and avformat_write_header().
|
||||||
Deprecate av_open_input_stream, av_open_input_file,
|
Deprecate av_open_input_stream, av_open_input_file,
|
||||||
AVFormatParameters and av_write_header.
|
AVFormatParameters and av_write_header.
|
||||||
|
|
||||||
2011-06-xx - xxxxxxx - lavu 51.7.0 - opt.h
|
2011-06-16 - 7e83e1c, dc59ec5 - lavu 51.7.0 - opt.h
|
||||||
Add av_opt_set_dict() and av_opt_find().
|
Add av_opt_set_dict() and av_opt_find().
|
||||||
Deprecate av_find_opt().
|
Deprecate av_find_opt().
|
||||||
Add AV_DICT_APPEND flag.
|
Add AV_DICT_APPEND flag.
|
||||||
|
|
||||||
2011-06-xx - xxxxxxx - lavu 51.6.0 - opt.h
|
2011-06-10 - cb7c11c - lavu 51.6.0 - opt.h
|
||||||
Add av_opt_flag_is_set().
|
Add av_opt_flag_is_set().
|
||||||
|
|
||||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||||
|
46
doc/Makefile
Normal file
46
doc/Makefile
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
||||||
|
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
||||||
|
HTMLPAGES = $(PROGS-yes:%=doc/%.html)
|
||||||
|
|
||||||
|
DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
||||||
|
|
||||||
|
all-$(CONFIG_DOC): documentation
|
||||||
|
|
||||||
|
documentation: $(DOCS)
|
||||||
|
|
||||||
|
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
||||||
|
|
||||||
|
doc/%.html: TAG = HTML
|
||||||
|
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
|
||||||
|
$(Q)$(TEXIDEP)
|
||||||
|
$(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
||||||
|
|
||||||
|
doc/%.pod: TAG = POD
|
||||||
|
doc/%.pod: doc/%.texi
|
||||||
|
$(Q)$(TEXIDEP)
|
||||||
|
$(M)$(SRC_PATH)/doc/texi2pod.pl $< $@
|
||||||
|
|
||||||
|
doc/%.1: TAG = MAN
|
||||||
|
doc/%.1: doc/%.pod
|
||||||
|
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
||||||
|
|
||||||
|
$(DOCS): | doc
|
||||||
|
OBJDIRS += doc
|
||||||
|
|
||||||
|
install-progs-$(CONFIG_DOC): install-man
|
||||||
|
|
||||||
|
install-man: $(MANPAGES)
|
||||||
|
$(Q)mkdir -p "$(MANDIR)/man1"
|
||||||
|
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||||
|
|
||||||
|
uninstall: uninstall-man
|
||||||
|
|
||||||
|
uninstall-man:
|
||||||
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||||
|
|
||||||
|
clean::
|
||||||
|
$(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
|
||||||
|
|
||||||
|
-include $(wildcard $(DOCS:%=%.d))
|
||||||
|
|
||||||
|
.PHONY: documentation
|
@@ -2,7 +2,7 @@ Release Notes
|
|||||||
=============
|
=============
|
||||||
|
|
||||||
* 0.8 "Love" June, 2011
|
* 0.8 "Love" June, 2011
|
||||||
* 0.7 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
* 0.7.1 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
||||||
|
|
||||||
|
|
||||||
General notes
|
General notes
|
||||||
|
82
doc/TODO
82
doc/TODO
@@ -1,82 +0,0 @@
|
|||||||
ffmpeg TODO list:
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Fabrice's TODO list: (unordered)
|
|
||||||
-------------------
|
|
||||||
Short term:
|
|
||||||
|
|
||||||
- use AVFMTCTX_DISCARD_PKT in ffplay so that DV has a chance to work
|
|
||||||
- add RTSP regression test (both client and server)
|
|
||||||
- make ffserver allocate AVFormatContext
|
|
||||||
- clean up (incompatible change, for 0.5.0):
|
|
||||||
* AVStream -> AVComponent
|
|
||||||
* AVFormatContext -> AVInputStream/AVOutputStream
|
|
||||||
* suppress rate_emu from AVCodecContext
|
|
||||||
- add new float/integer audio filterting and conversion : suppress
|
|
||||||
CODEC_ID_PCM_xxc and use CODEC_ID_RAWAUDIO.
|
|
||||||
- fix telecine and frame rate conversion
|
|
||||||
|
|
||||||
Long term (ask me if you want to help):
|
|
||||||
|
|
||||||
- commit new imgconvert API and new PIX_FMT_xxx alpha formats
|
|
||||||
- commit new LGPL'ed float and integer-only AC3 decoder
|
|
||||||
- add WMA integer-only decoder
|
|
||||||
- add new MPEG4-AAC audio decoder (both integer-only and float version)
|
|
||||||
|
|
||||||
Michael's TODO list: (unordered) (if anyone wanna help with sth, just ask)
|
|
||||||
-------------------
|
|
||||||
- optimize H264 CABAC
|
|
||||||
- more optimizations
|
|
||||||
- simper rate control
|
|
||||||
|
|
||||||
Philip'a TODO list: (alphabetically ordered) (please help)
|
|
||||||
------------------
|
|
||||||
- Add a multi-ffm filetype so that feeds can be recorded into multiple files rather
|
|
||||||
than one big file.
|
|
||||||
- Authenticated users support -- where the authentication is in the URL
|
|
||||||
- Change ASF files so that the embedded timestamp in the frames is right rather
|
|
||||||
than being an offset from the start of the stream
|
|
||||||
- Make ffm files more resilient to changes in the codec structures so that you
|
|
||||||
can play old ffm files.
|
|
||||||
|
|
||||||
Baptiste's TODO list:
|
|
||||||
-----------------
|
|
||||||
- mov edit list support (AVEditList)
|
|
||||||
- YUV 10 bit per component support "2vuy"
|
|
||||||
- mxf muxer
|
|
||||||
- mpeg2 non linear quantizer
|
|
||||||
|
|
||||||
unassigned TODO: (unordered)
|
|
||||||
---------------
|
|
||||||
- use AVFrame for audio codecs too
|
|
||||||
- rework aviobuf.c buffering strategy and fix url_fskip
|
|
||||||
- generate optimal huffman tables for mjpeg encoding
|
|
||||||
- fix ffserver regression tests
|
|
||||||
- support xvids motion estimation
|
|
||||||
- support x264s motion estimation
|
|
||||||
- support x264s rate control
|
|
||||||
- SNOW: non translational motion compensation
|
|
||||||
- SNOW: more optimal quantization
|
|
||||||
- SNOW: 4x4 block support
|
|
||||||
- SNOW: 1/8 pel motion compensation support
|
|
||||||
- SNOW: iterative motion estimation based on subsampled images
|
|
||||||
- SNOW: try B frames and MCTF and see how their PSNR/bitrate/complexity behaves
|
|
||||||
- SNOW: try to use the wavelet transformed MC-ed reference frame as context for the entropy coder
|
|
||||||
- SNOW: think about/analyize how to make snow use multiple cpus/threads
|
|
||||||
- SNOW: finish spec
|
|
||||||
- FLAC: lossy encoding (viterbi and naive scalar quantization)
|
|
||||||
- libavfilter
|
|
||||||
- JPEG2000 decoder & encoder
|
|
||||||
- MPEG4 GMC encoding support
|
|
||||||
- macroblock based pixel format (better cache locality, somewhat complex, one paper claimed it faster for high res)
|
|
||||||
- regression tests for codecs which do not have an encoder (I+P-frame bitstream in the 'master' branch)
|
|
||||||
- add support for using mplayers video filters to ffmpeg
|
|
||||||
- H264 encoder
|
|
||||||
- per MB ratecontrol (so VCD and such do work better)
|
|
||||||
- write a script which iteratively changes all functions between always_inline and noinline and benchmarks the result to find the best set of inlined functions
|
|
||||||
- convert all the non SIMD asm into small asm vs. C testcases and submit them to the gcc devels so they can improve gcc
|
|
||||||
- generic audio mixing API
|
|
||||||
- extract PES packetizer from PS muxer and use it for new TS muxer
|
|
||||||
- implement automatic AVBistreamFilter activation
|
|
||||||
- make cabac encoder use bytestream (see http://trac.videolan.org/x264/changeset/?format=diff&new=651)
|
|
||||||
- merge imdct and windowing, the current code does considerable amounts of redundant work
|
|
@@ -34,6 +34,7 @@ You can use libavcodec or libavformat in your commercial program, but
|
|||||||
@emph{any patch you make must be published}. The best way to proceed is
|
@emph{any patch you make must be published}. The best way to proceed is
|
||||||
to send your patches to the FFmpeg mailing list.
|
to send your patches to the FFmpeg mailing list.
|
||||||
|
|
||||||
|
|
||||||
@anchor{Coding Rules}
|
@anchor{Coding Rules}
|
||||||
@section Coding Rules
|
@section Coding Rules
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ above them explaining what the function does, even if it is just one sentence.
|
|||||||
All structures and their member variables should be documented, too.
|
All structures and their member variables should be documented, too.
|
||||||
@example
|
@example
|
||||||
/**
|
/**
|
||||||
* @@file mpeg.c
|
* @@file
|
||||||
* MPEG codec.
|
* MPEG codec.
|
||||||
* @@author ...
|
* @@author ...
|
||||||
*/
|
*/
|
||||||
@@ -242,7 +243,8 @@ Note, these rules are mostly borrowed from the MPlayer project.
|
|||||||
|
|
||||||
@section Submitting patches
|
@section Submitting patches
|
||||||
|
|
||||||
First, read the (@pxref{Coding Rules}) above if you did not yet.
|
First, read the @ref{Coding Rules} above if you did not yet, in particular
|
||||||
|
the rules regarding patch submission.
|
||||||
|
|
||||||
When you submit your patch, please use @code{git format-patch} or
|
When you submit your patch, please use @code{git format-patch} or
|
||||||
@code{git send-email}. We cannot read other diffs :-)
|
@code{git send-email}. We cannot read other diffs :-)
|
||||||
@@ -257,8 +259,8 @@ for us and greatly increases your chances of getting your patch applied.
|
|||||||
Use the patcheck tool of FFmpeg to check your patch.
|
Use the patcheck tool of FFmpeg to check your patch.
|
||||||
The tool is located in the tools directory.
|
The tool is located in the tools directory.
|
||||||
|
|
||||||
Run the regression tests before submitting a patch so that you can
|
Run the @ref{Regression Tests} before submitting a patch in order to verify
|
||||||
verify that there are no big problems.
|
it does not cause unexpected problems.
|
||||||
|
|
||||||
Patches should be posted as base64 encoded attachments (or any other
|
Patches should be posted as base64 encoded attachments (or any other
|
||||||
encoding which ensures that the patch will not be trashed during
|
encoding which ensures that the patch will not be trashed during
|
||||||
@@ -337,7 +339,7 @@ send a reminder by email. Your patch should eventually be dealt with.
|
|||||||
@item
|
@item
|
||||||
Is the patch against latest FFmpeg git master branch?
|
Is the patch against latest FFmpeg git master branch?
|
||||||
@item
|
@item
|
||||||
Are you subscribed to ffmpeg-dev?
|
Are you subscribed to ffmpeg-devel?
|
||||||
(the list is subscribers only due to spam)
|
(the list is subscribers only due to spam)
|
||||||
@item
|
@item
|
||||||
Have you checked that the changes are minimal, so that the same cannot be
|
Have you checked that the changes are minimal, so that the same cannot be
|
||||||
|
@@ -3,7 +3,7 @@ FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
|
|||||||
CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
|
CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
|
||||||
LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
|
LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
|
||||||
|
|
||||||
EXAMPLES=encoding-example muxing-example
|
EXAMPLES=encoding filtering metadata muxing
|
||||||
|
|
||||||
OBJS=$(addsuffix .o,$(EXAMPLES))
|
OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||||
|
|
||||||
|
@@ -1,40 +1,34 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Fabrice Bellard
|
* Copyright (c) 2001 Fabrice Bellard
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* FFmpeg is free software; you can redistribute it and/or
|
* The above copyright notice and this permission notice shall be included in
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* all copies or substantial portions of the Software.
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* FFmpeg is distributed in the hope that it will be useful,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
* Lesser General Public License for more details.
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
*
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* License along with FFmpeg; if not, write to the Free Software
|
* THE SOFTWARE.
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* avcodec API use example.
|
* libavcodec API use example.
|
||||||
*
|
*
|
||||||
* Note that this library only handles codecs (mpeg, mpeg4, etc...),
|
* Note that libavcodec only handles codecs (mpeg, mpeg4, etc...),
|
||||||
* not file formats (avi, vob, etc...). See library 'libavformat' for the
|
* not file formats (avi, vob, etc...). See library 'libavformat' for the
|
||||||
* format handling
|
* format handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_AV_CONFIG_H
|
|
||||||
#undef HAVE_AV_CONFIG_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavutil/mathematics.h"
|
#include "libavutil/mathematics.h"
|
||||||
|
|
||||||
@@ -64,12 +58,13 @@ static void audio_encode_example(const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c= avcodec_alloc_context();
|
c = avcodec_alloc_context3(codec);
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
c->bit_rate = 64000;
|
c->bit_rate = 64000;
|
||||||
c->sample_rate = 44100;
|
c->sample_rate = 44100;
|
||||||
c->channels = 2;
|
c->channels = 2;
|
||||||
|
c->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open(c, codec) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
@@ -134,7 +129,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c= avcodec_alloc_context();
|
c = avcodec_alloc_context3(codec);
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open(c, codec) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
@@ -204,7 +199,7 @@ static void video_encode_example(const char *filename)
|
|||||||
int i, out_size, size, x, y, outbuf_size;
|
int i, out_size, size, x, y, outbuf_size;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
AVFrame *picture;
|
AVFrame *picture;
|
||||||
uint8_t *outbuf, *picture_buf;
|
uint8_t *outbuf;
|
||||||
|
|
||||||
printf("Video encoding\n");
|
printf("Video encoding\n");
|
||||||
|
|
||||||
@@ -215,7 +210,7 @@ static void video_encode_example(const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c= avcodec_alloc_context();
|
c = avcodec_alloc_context3(codec);
|
||||||
picture= avcodec_alloc_frame();
|
picture= avcodec_alloc_frame();
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
@@ -244,15 +239,11 @@ static void video_encode_example(const char *filename)
|
|||||||
/* alloc image and output buffer */
|
/* alloc image and output buffer */
|
||||||
outbuf_size = 100000;
|
outbuf_size = 100000;
|
||||||
outbuf = malloc(outbuf_size);
|
outbuf = malloc(outbuf_size);
|
||||||
size = c->width * c->height;
|
|
||||||
picture_buf = malloc((size * 3) / 2); /* size for YUV 420 */
|
|
||||||
|
|
||||||
picture->data[0] = picture_buf;
|
/* the image can be allocated by any means and av_image_alloc() is
|
||||||
picture->data[1] = picture->data[0] + size;
|
* just the most convenient way if av_malloc() is to be used */
|
||||||
picture->data[2] = picture->data[1] + size / 4;
|
av_image_alloc(picture->data, picture->linesize,
|
||||||
picture->linesize[0] = c->width;
|
c->width, c->height, c->pix_fmt, 1);
|
||||||
picture->linesize[1] = c->width / 2;
|
|
||||||
picture->linesize[2] = c->width / 2;
|
|
||||||
|
|
||||||
/* encode 1 second of video */
|
/* encode 1 second of video */
|
||||||
for(i=0;i<25;i++) {
|
for(i=0;i<25;i++) {
|
||||||
@@ -295,11 +286,11 @@ static void video_encode_example(const char *filename)
|
|||||||
outbuf[3] = 0xb7;
|
outbuf[3] = 0xb7;
|
||||||
fwrite(outbuf, 1, 4, f);
|
fwrite(outbuf, 1, 4, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
free(picture_buf);
|
|
||||||
free(outbuf);
|
free(outbuf);
|
||||||
|
|
||||||
avcodec_close(c);
|
avcodec_close(c);
|
||||||
av_free(c);
|
av_free(c);
|
||||||
|
av_free(picture->data[0]);
|
||||||
av_free(picture);
|
av_free(picture);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@@ -346,7 +337,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c= avcodec_alloc_context();
|
c = avcodec_alloc_context3(codec);
|
||||||
picture= avcodec_alloc_frame();
|
picture= avcodec_alloc_frame();
|
||||||
|
|
||||||
if(codec->capabilities&CODEC_CAP_TRUNCATED)
|
if(codec->capabilities&CODEC_CAP_TRUNCATED)
|
230
doc/examples/filtering.c
Normal file
230
doc/examples/filtering.c
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2010 Nicolas George
|
||||||
|
* Copyright (c) 2011 Stefano Sabatini
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* API example for decoding and filtering
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _XOPEN_SOURCE 600 /* for usleep */
|
||||||
|
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
#include <libavfilter/avfiltergraph.h>
|
||||||
|
#include <libavfilter/vsink_buffer.h>
|
||||||
|
#include <libavfilter/vsrc_buffer.h>
|
||||||
|
|
||||||
|
const char *filter_descr = "scale=78:24";
|
||||||
|
|
||||||
|
static AVFormatContext *fmt_ctx;
|
||||||
|
static AVCodecContext *dec_ctx;
|
||||||
|
AVFilterContext *buffersink_ctx;
|
||||||
|
AVFilterContext *buffersrc_ctx;
|
||||||
|
AVFilterGraph *filter_graph;
|
||||||
|
static int video_stream_index = -1;
|
||||||
|
static int64_t last_pts = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
|
static int open_input_file(const char *filename)
|
||||||
|
{
|
||||||
|
int ret, i;
|
||||||
|
AVCodec *dec;
|
||||||
|
|
||||||
|
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ret = av_find_stream_info(fmt_ctx)) < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* select the video stream */
|
||||||
|
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
video_stream_index = ret;
|
||||||
|
dec_ctx = fmt_ctx->streams[video_stream_index]->codec;
|
||||||
|
|
||||||
|
/* init the video decoder */
|
||||||
|
if ((ret = avcodec_open(dec_ctx, dec)) < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int init_filters(const char *filters_descr)
|
||||||
|
{
|
||||||
|
char args[512];
|
||||||
|
int ret;
|
||||||
|
AVFilter *buffersrc = avfilter_get_by_name("buffer");
|
||||||
|
AVFilter *buffersink = avfilter_get_by_name("buffersink");
|
||||||
|
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||||
|
AVFilterInOut *inputs = avfilter_inout_alloc();
|
||||||
|
enum PixelFormat pix_fmts[] = { PIX_FMT_GRAY8, PIX_FMT_NONE };
|
||||||
|
filter_graph = avfilter_graph_alloc();
|
||||||
|
|
||||||
|
/* buffer video source: the decoded frames from the decoder will be inserted here. */
|
||||||
|
snprintf(args, sizeof(args), "%d:%d:%d:%d:%d:%d:%d",
|
||||||
|
dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
|
||||||
|
dec_ctx->time_base.num, dec_ctx->time_base.den,
|
||||||
|
dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);
|
||||||
|
ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in",
|
||||||
|
args, NULL, filter_graph);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer source\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* buffer video sink: to terminate the filter chain. */
|
||||||
|
ret = avfilter_graph_create_filter(&buffersink_ctx, buffersink, "out",
|
||||||
|
NULL, pix_fmts, filter_graph);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer sink\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Endpoints for the filter graph. */
|
||||||
|
outputs->name = av_strdup("in");
|
||||||
|
outputs->filter_ctx = buffersrc_ctx;
|
||||||
|
outputs->pad_idx = 0;
|
||||||
|
outputs->next = NULL;
|
||||||
|
|
||||||
|
inputs->name = av_strdup("out");
|
||||||
|
inputs->filter_ctx = buffersink_ctx;
|
||||||
|
inputs->pad_idx = 0;
|
||||||
|
inputs->next = NULL;
|
||||||
|
|
||||||
|
if ((ret = avfilter_graph_parse(filter_graph, filter_descr,
|
||||||
|
&inputs, &outputs, NULL)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
if ((ret = avfilter_graph_config(filter_graph, NULL)) < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void display_picref(AVFilterBufferRef *picref, AVRational time_base)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
uint8_t *p0, *p;
|
||||||
|
int64_t delay;
|
||||||
|
|
||||||
|
if (picref->pts != AV_NOPTS_VALUE) {
|
||||||
|
if (last_pts != AV_NOPTS_VALUE) {
|
||||||
|
/* sleep roughly the right amount of time;
|
||||||
|
* usleep is in microseconds, just like AV_TIME_BASE. */
|
||||||
|
delay = av_rescale_q(picref->pts - last_pts,
|
||||||
|
time_base, AV_TIME_BASE_Q);
|
||||||
|
if (delay > 0 && delay < 1000000)
|
||||||
|
usleep(delay);
|
||||||
|
}
|
||||||
|
last_pts = picref->pts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trivial ASCII grayscale display. */
|
||||||
|
p0 = picref->data[0];
|
||||||
|
puts("\033c");
|
||||||
|
for (y = 0; y < picref->video->h; y++) {
|
||||||
|
p = p0;
|
||||||
|
for (x = 0; x < picref->video->w; x++)
|
||||||
|
putchar(" .-+#"[*(p++) / 52]);
|
||||||
|
putchar('\n');
|
||||||
|
p0 += picref->linesize[0];
|
||||||
|
}
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
AVPacket packet;
|
||||||
|
AVFrame frame;
|
||||||
|
int got_frame;
|
||||||
|
|
||||||
|
if (argc != 2) {
|
||||||
|
fprintf(stderr, "Usage: %s file\n", argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
avcodec_register_all();
|
||||||
|
av_register_all();
|
||||||
|
avfilter_register_all();
|
||||||
|
|
||||||
|
if ((ret = open_input_file(argv[1]) < 0))
|
||||||
|
goto end;
|
||||||
|
if ((ret = init_filters(filter_descr)) < 0)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
/* read all packets */
|
||||||
|
while (1) {
|
||||||
|
AVFilterBufferRef *picref;
|
||||||
|
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (packet.stream_index == video_stream_index) {
|
||||||
|
avcodec_get_frame_defaults(&frame);
|
||||||
|
got_frame = 0;
|
||||||
|
ret = avcodec_decode_video2(dec_ctx, &frame, &got_frame, &packet);
|
||||||
|
av_free_packet(&packet);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Error decoding video\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (got_frame) {
|
||||||
|
if (frame.pts == AV_NOPTS_VALUE)
|
||||||
|
frame.pts = frame.pkt_dts == AV_NOPTS_VALUE ?
|
||||||
|
frame.pkt_dts : frame.pkt_pts;
|
||||||
|
/* push the decoded frame into the filtergraph */
|
||||||
|
av_vsrc_buffer_add_frame(buffersrc_ctx, &frame);
|
||||||
|
|
||||||
|
/* pull filtered pictures from the filtergraph */
|
||||||
|
while (avfilter_poll_frame(buffersink_ctx->inputs[0])) {
|
||||||
|
av_vsink_buffer_get_video_buffer_ref(buffersink_ctx, &picref, 0);
|
||||||
|
if (picref) {
|
||||||
|
display_picref(picref, buffersink_ctx->inputs[0]->time_base);
|
||||||
|
avfilter_unref_buffer(picref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end:
|
||||||
|
avfilter_graph_free(&filter_graph);
|
||||||
|
if (dec_ctx)
|
||||||
|
avcodec_close(dec_ctx);
|
||||||
|
av_close_input_file(fmt_ctx);
|
||||||
|
|
||||||
|
if (ret < 0 && ret != AVERROR_EOF) {
|
||||||
|
char buf[1024];
|
||||||
|
av_strerror(ret, buf, sizeof(buf));
|
||||||
|
fprintf(stderr, "Error occurred: %s\n", buf);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
55
doc/examples/metadata.c
Normal file
55
doc/examples/metadata.c
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 Reinhard Tartler
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Shows how the metadata API can be used in application programs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
#include <libavutil/dict.h>
|
||||||
|
|
||||||
|
int main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
AVFormatContext *fmt_ctx = NULL;
|
||||||
|
AVDictionaryEntry *tag = NULL;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (argc != 2) {
|
||||||
|
printf("usage: %s <input_file>\n"
|
||||||
|
"example program to demonstrate the use of the libavformat metadata API.\n"
|
||||||
|
"\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
av_register_all();
|
||||||
|
if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL)))
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||||
|
printf("%s=%s\n", tag->key, tag->value);
|
||||||
|
|
||||||
|
avformat_free_context(fmt_ctx);
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -22,8 +22,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Libavformat API example: Output a media file in any supported
|
* libavformat API example.
|
||||||
* libavformat format. The default codecs are used.
|
*
|
||||||
|
* Output a media file in any supported libavformat format.
|
||||||
|
* The default codecs are used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -31,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
|
|
||||||
@@ -78,7 +81,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
|
|||||||
c->channels = 2;
|
c->channels = 2;
|
||||||
|
|
||||||
// some formats want stream headers to be separate
|
// some formats want stream headers to be separate
|
||||||
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
|
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
|
||||||
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
@@ -141,7 +144,7 @@ static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
|
|||||||
int16_t *q;
|
int16_t *q;
|
||||||
|
|
||||||
q = samples;
|
q = samples;
|
||||||
for(j=0;j<frame_size;j++) {
|
for (j = 0; j < frame_size; j++) {
|
||||||
v = (int)(sin(t) * 10000);
|
v = (int)(sin(t) * 10000);
|
||||||
for(i = 0; i < nb_channels; i++)
|
for(i = 0; i < nb_channels; i++)
|
||||||
*q++ = v;
|
*q++ = v;
|
||||||
@@ -160,13 +163,13 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
|
|
||||||
get_audio_frame(samples, audio_input_frame_size, c->channels);
|
get_audio_frame(samples, audio_input_frame_size, c->channels);
|
||||||
|
|
||||||
pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
|
pkt.size = avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
|
||||||
|
|
||||||
if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
|
if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
|
||||||
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
||||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
pkt.stream_index= st->index;
|
pkt.stream_index = st->index;
|
||||||
pkt.data= audio_outbuf;
|
pkt.data = audio_outbuf;
|
||||||
|
|
||||||
/* write the compressed frame in the media file */
|
/* write the compressed frame in the media file */
|
||||||
if (av_interleaved_write_frame(oc, &pkt) != 0) {
|
if (av_interleaved_write_frame(oc, &pkt) != 0) {
|
||||||
@@ -230,7 +233,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
|
|||||||
c->mb_decision=2;
|
c->mb_decision=2;
|
||||||
}
|
}
|
||||||
// some formats want stream headers to be separate
|
// some formats want stream headers to be separate
|
||||||
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
|
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
|
||||||
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
@@ -316,15 +319,15 @@ static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height
|
|||||||
i = frame_index;
|
i = frame_index;
|
||||||
|
|
||||||
/* Y */
|
/* Y */
|
||||||
for(y=0;y<height;y++) {
|
for (y = 0; y < height; y++) {
|
||||||
for(x=0;x<width;x++) {
|
for (x = 0; x < width; x++) {
|
||||||
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
|
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cb and Cr */
|
/* Cb and Cr */
|
||||||
for(y=0;y<height/2;y++) {
|
for (y = 0; y < height/2; y++) {
|
||||||
for(x=0;x<width/2;x++) {
|
for (x = 0; x < width/2; x++) {
|
||||||
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;
|
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;
|
||||||
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;
|
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;
|
||||||
}
|
}
|
||||||
@@ -369,14 +372,14 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
|
|
||||||
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
|
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
|
||||||
/* raw video case. The API will change slightly in the near
|
/* raw video case. The API will change slightly in the near
|
||||||
futur for that */
|
future for that. */
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
|
|
||||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
pkt.stream_index= st->index;
|
pkt.stream_index = st->index;
|
||||||
pkt.data= (uint8_t *)picture;
|
pkt.data = (uint8_t *)picture;
|
||||||
pkt.size= sizeof(AVPicture);
|
pkt.size = sizeof(AVPicture);
|
||||||
|
|
||||||
ret = av_interleaved_write_frame(oc, &pkt);
|
ret = av_interleaved_write_frame(oc, &pkt);
|
||||||
} else {
|
} else {
|
||||||
@@ -391,9 +394,9 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
||||||
if(c->coded_frame->key_frame)
|
if(c->coded_frame->key_frame)
|
||||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
pkt.stream_index= st->index;
|
pkt.stream_index = st->index;
|
||||||
pkt.data= video_outbuf;
|
pkt.data = video_outbuf;
|
||||||
pkt.size= out_size;
|
pkt.size = out_size;
|
||||||
|
|
||||||
/* write the compressed frame in the media file */
|
/* write the compressed frame in the media file */
|
||||||
ret = av_interleaved_write_frame(oc, &pkt);
|
ret = av_interleaved_write_frame(oc, &pkt);
|
||||||
@@ -455,7 +458,7 @@ int main(int argc, char **argv)
|
|||||||
if (!oc) {
|
if (!oc) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
fmt= oc->oformat;
|
fmt = oc->oformat;
|
||||||
|
|
||||||
/* add the audio and video streams using the default format codecs
|
/* add the audio and video streams using the default format codecs
|
||||||
and initialize the codecs */
|
and initialize the codecs */
|
||||||
@@ -479,7 +482,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* open the output file, if needed */
|
/* open the output file, if needed */
|
||||||
if (!(fmt->flags & AVFMT_NOFILE)) {
|
if (!(fmt->flags & AVFMT_NOFILE)) {
|
||||||
if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
|
if (avio_open(&oc->pb, filename, AVIO_WRONLY) < 0) {
|
||||||
fprintf(stderr, "Could not open '%s'\n", filename);
|
fprintf(stderr, "Could not open '%s'\n", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
10
doc/faq.texi
10
doc/faq.texi
@@ -47,7 +47,7 @@ Likely reasons
|
|||||||
@item We are busy and haven't had time yet to read your report or
|
@item We are busy and haven't had time yet to read your report or
|
||||||
investigate the issue.
|
investigate the issue.
|
||||||
@item You didn't follow @url{http://ffmpeg.org/bugreports.html}.
|
@item You didn't follow @url{http://ffmpeg.org/bugreports.html}.
|
||||||
@item You didn't use git HEAD.
|
@item You didn't use git master.
|
||||||
@item You reported a segmentation fault without gdb output.
|
@item You reported a segmentation fault without gdb output.
|
||||||
@item You describe a problem but not how to reproduce it.
|
@item You describe a problem but not how to reproduce it.
|
||||||
@item It's unclear if you use ffmpeg as command line tool or use
|
@item It's unclear if you use ffmpeg as command line tool or use
|
||||||
@@ -123,7 +123,8 @@ problem and an NP-hard problem...
|
|||||||
|
|
||||||
@section ffmpeg does not work; what is wrong?
|
@section ffmpeg does not work; what is wrong?
|
||||||
|
|
||||||
Try a @code{make distclean} in the ffmpeg source directory before the build. If this does not help see
|
Try a @code{make distclean} in the ffmpeg source directory before the build.
|
||||||
|
If this does not help see
|
||||||
(@url{http://ffmpeg.org/bugreports.html}).
|
(@url{http://ffmpeg.org/bugreports.html}).
|
||||||
|
|
||||||
@section How do I encode single pictures into movies?
|
@section How do I encode single pictures into movies?
|
||||||
@@ -285,7 +286,8 @@ Just create an "input.avs" text file with this single line ...
|
|||||||
ffmpeg -i input.avs
|
ffmpeg -i input.avs
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}.
|
For ANY other help on Avisynth, please visit the
|
||||||
|
@uref{http://www.avisynth.org/, Avisynth homepage}.
|
||||||
|
|
||||||
@section How can I join video files?
|
@section How can I join video files?
|
||||||
|
|
||||||
@@ -417,7 +419,7 @@ No. These tools are too bloated and they complicate the build.
|
|||||||
FFmpeg is already organized in a highly modular manner and does not need to
|
FFmpeg is already organized in a highly modular manner and does not need to
|
||||||
be rewritten in a formal object language. Further, many of the developers
|
be rewritten in a formal object language. Further, many of the developers
|
||||||
favor straight C; it works for them. For more arguments on this matter,
|
favor straight C; it works for them. For more arguments on this matter,
|
||||||
read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}).
|
read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}.
|
||||||
|
|
||||||
@section Why are the ffmpeg programs devoid of debugging symbols?
|
@section Why are the ffmpeg programs devoid of debugging symbols?
|
||||||
|
|
||||||
|
@@ -159,8 +159,6 @@ Set the ISO 639 language code (3 letters) of the current subtitle stream.
|
|||||||
@section Video Options
|
@section Video Options
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
@item -b @var{bitrate}
|
|
||||||
Set the video bitrate in bit/s (default = 200 kb/s).
|
|
||||||
@item -vframes @var{number}
|
@item -vframes @var{number}
|
||||||
Set the number of video frames to record.
|
Set the number of video frames to record.
|
||||||
@item -r @var{fps}
|
@item -r @var{fps}
|
||||||
@@ -476,7 +474,7 @@ FF_ER_COMPLIANT
|
|||||||
@item 3
|
@item 3
|
||||||
FF_ER_AGGRESSIVE
|
FF_ER_AGGRESSIVE
|
||||||
@item 4
|
@item 4
|
||||||
FF_ER_VERY_AGGRESSIVE
|
FF_ER_EXPLODE
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item -ec @var{bit_mask}
|
@item -ec @var{bit_mask}
|
||||||
@@ -556,16 +554,17 @@ The timestamps must be specified in ascending order.
|
|||||||
@item -aframes @var{number}
|
@item -aframes @var{number}
|
||||||
Set the number of audio frames to record.
|
Set the number of audio frames to record.
|
||||||
@item -ar @var{freq}
|
@item -ar @var{freq}
|
||||||
Set the audio sampling frequency. there is no default for input streams,
|
Set the audio sampling frequency. For output streams it is set by
|
||||||
for output streams it is set by default to the frequency of the input stream.
|
default to the frequency of the corresponding input stream. For input
|
||||||
@item -ab @var{bitrate}
|
streams this option only makes sense for audio grabbing devices and raw
|
||||||
Set the audio bitrate in bit/s (default = 64k).
|
demuxers and is mapped to the corresponding demuxer options.
|
||||||
@item -aq @var{q}
|
@item -aq @var{q}
|
||||||
Set the audio quality (codec-specific, VBR).
|
Set the audio quality (codec-specific, VBR).
|
||||||
@item -ac @var{channels}
|
@item -ac @var{channels}
|
||||||
Set the number of audio channels. For input streams it is set by
|
Set the number of audio channels. For output streams it is set by
|
||||||
default to 1, for output streams it is set by default to the same
|
default to the number of input audio channels. For input streams
|
||||||
number of audio channels in input.
|
this option only makes sense for audio grabbing devices and raw demuxers
|
||||||
|
and is mapped to the corresponding demuxer options.
|
||||||
@item -an
|
@item -an
|
||||||
Disable audio recording.
|
Disable audio recording.
|
||||||
@item -acodec @var{codec}
|
@item -acodec @var{codec}
|
||||||
@@ -764,9 +763,11 @@ Read input at native frame rate. Mainly used to simulate a grab device.
|
|||||||
@item -loop_input
|
@item -loop_input
|
||||||
Loop over the input stream. Currently it works only for image
|
Loop over the input stream. Currently it works only for image
|
||||||
streams. This option is used for automatic FFserver testing.
|
streams. This option is used for automatic FFserver testing.
|
||||||
|
This option is deprecated, use -loop 1.
|
||||||
@item -loop_output @var{number_of_times}
|
@item -loop_output @var{number_of_times}
|
||||||
Repeatedly loop output for formats that support looping such as animated GIF
|
Repeatedly loop output for formats that support looping such as animated GIF
|
||||||
(0 will loop the output infinitely).
|
(0 will loop the output infinitely).
|
||||||
|
This option is deprecated, use -loop.
|
||||||
@item -threads @var{count}
|
@item -threads @var{count}
|
||||||
Thread count.
|
Thread count.
|
||||||
@item -vsync @var{parameter}
|
@item -vsync @var{parameter}
|
||||||
@@ -914,8 +915,8 @@ ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note that you must activate the right video source and channel before
|
Note that you must activate the right video source and channel before
|
||||||
launching ffmpeg with any TV viewer such as xawtv
|
launching ffmpeg with any TV viewer such as
|
||||||
(@url{http://linux.bytesex.org/xawtv/}) by Gerd Knorr. You also
|
@uref{http://linux.bytesex.org/xawtv/, xawtv} by Gerd Knorr. You also
|
||||||
have to set the audio recording levels correctly with a
|
have to set the audio recording levels correctly with a
|
||||||
standard mixer.
|
standard mixer.
|
||||||
|
|
||||||
@@ -934,8 +935,34 @@ the DISPLAY environment variable.
|
|||||||
ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
|
ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
0.0 is display.screen number of your X11 server, same as the DISPLAY environment
|
10 is the x-offset and 20 the y-offset for the grabbing.
|
||||||
variable. 10 is the x-offset and 20 the y-offset for the grabbing.
|
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -follow_mouse centered -s cif -r 25 -i :0.0 /tmp/out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The grabbing region follows the mouse pointer, which stays at the center of
|
||||||
|
region.
|
||||||
|
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -follow_mouse 100 -s cif -r 25 -i :0.0 /tmp/out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Only follows when mouse pointer reaches within 100 pixels to the edge of
|
||||||
|
region.
|
||||||
|
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -show_region 1 -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The grabbing region will be indicated on screen.
|
||||||
|
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -s cif -r 25 -i :0.0 /tmp/out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The grabbing region indication will follow the mouse pointer.
|
||||||
|
|
||||||
|
|
||||||
@section Video and Audio file format conversion
|
@section Video and Audio file format conversion
|
||||||
|
|
||||||
|
@@ -38,8 +38,9 @@ Force displayed width.
|
|||||||
@item -y @var{height}
|
@item -y @var{height}
|
||||||
Force displayed height.
|
Force displayed height.
|
||||||
@item -s @var{size}
|
@item -s @var{size}
|
||||||
Set frame size (WxH or abbreviation), needed for videos which don't
|
Set frame size (WxH or abbreviation), needed for videos which do
|
||||||
contain a header with the frame size like raw YUV.
|
not contain a header with the frame size like raw YUV. This option
|
||||||
|
has been deprecated in favor of private options, try -video_size.
|
||||||
@item -an
|
@item -an
|
||||||
Disable audio.
|
Disable audio.
|
||||||
@item -vn
|
@item -vn
|
||||||
@@ -90,6 +91,7 @@ Read @var{input_file}.
|
|||||||
@table @option
|
@table @option
|
||||||
@item -pix_fmt @var{format}
|
@item -pix_fmt @var{format}
|
||||||
Set pixel format.
|
Set pixel format.
|
||||||
|
This option has been deprecated in favor of private options, try -pixel_format.
|
||||||
@item -stats
|
@item -stats
|
||||||
Show the stream duration, the codec parameters, the current position in
|
Show the stream duration, the codec parameters, the current position in
|
||||||
the stream and the audio/video synchronisation drift.
|
the stream and the audio/video synchronisation drift.
|
||||||
|
@@ -91,3 +91,28 @@ The use of the environment variable @env{NO_COLOR} is deprecated and
|
|||||||
will be dropped in a following FFmpeg version.
|
will be dropped in a following FFmpeg version.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@section AVOptions
|
||||||
|
|
||||||
|
These options are provided directly by the libavformat, libavdevice and
|
||||||
|
libavcodec libraries. To see the list of available AVOptions, use the
|
||||||
|
@option{-help} option. They are separated into two categories:
|
||||||
|
@table @option
|
||||||
|
@item generic
|
||||||
|
These options can be set for any container, codec or device. Generic options are
|
||||||
|
listed under AVFormatContext options for containers/devices and under
|
||||||
|
AVCodecContext options for codecs.
|
||||||
|
@item private
|
||||||
|
These options are specific to the given container, device or codec. Private
|
||||||
|
options are listed under their corresponding containers/devices/codecs.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
For example to write an ID3v2.3 header instead of a default ID3v2.4 to
|
||||||
|
an MP3 file, use the @option{id3v2_version} private option of the MP3
|
||||||
|
muxer:
|
||||||
|
@example
|
||||||
|
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Note -nooption syntax cannot be used for boolean AVOptions, use -option
|
||||||
|
0/-option 1.
|
||||||
|
176
doc/filters.texi
176
doc/filters.texi
@@ -18,8 +18,8 @@ output pads is called a "sink".
|
|||||||
|
|
||||||
A filtergraph can be represented using a textual representation, which
|
A filtergraph can be represented using a textual representation, which
|
||||||
is recognized by the @code{-vf} and @code{-af} options of the ff*
|
is recognized by the @code{-vf} and @code{-af} options of the ff*
|
||||||
tools, and by the @code{av_parse_graph()} function defined in
|
tools, and by the @code{avfilter_graph_parse()} function defined in
|
||||||
@file{libavfilter/avfiltergraph}.
|
@file{libavfilter/avfiltergraph.h}.
|
||||||
|
|
||||||
A filterchain consists of a sequence of connected filters, each one
|
A filterchain consists of a sequence of connected filters, each one
|
||||||
connected to the previous one in the sequence. A filterchain is
|
connected to the previous one in the sequence. A filterchain is
|
||||||
@@ -183,6 +183,66 @@ threshold, and defaults to 98.
|
|||||||
@var{threshold} is the threshold below which a pixel value is
|
@var{threshold} is the threshold below which a pixel value is
|
||||||
considered black, and defaults to 32.
|
considered black, and defaults to 32.
|
||||||
|
|
||||||
|
@section boxblur
|
||||||
|
|
||||||
|
Apply boxblur algorithm to the input video.
|
||||||
|
|
||||||
|
This filter accepts the parameters:
|
||||||
|
@var{luma_power}:@var{luma_radius}:@var{chroma_radius}:@var{chroma_power}:@var{alpha_radius}:@var{alpha_power}
|
||||||
|
|
||||||
|
Chroma and alpha parameters are optional, if not specified they default
|
||||||
|
to the corresponding values set for @var{luma_radius} and
|
||||||
|
@var{luma_power}.
|
||||||
|
|
||||||
|
@var{luma_radius}, @var{chroma_radius}, and @var{alpha_radius} represent
|
||||||
|
the radius in pixels of the box used for blurring the corresponding
|
||||||
|
input plane. They are expressions, and can contain the following
|
||||||
|
constants:
|
||||||
|
@table @option
|
||||||
|
@item w, h
|
||||||
|
the input width and heigth in pixels
|
||||||
|
|
||||||
|
@item cw, ch
|
||||||
|
the input chroma image width and height in pixels
|
||||||
|
|
||||||
|
@item hsub, vsub
|
||||||
|
horizontal and vertical chroma subsample values. For example for the
|
||||||
|
pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
The radius must be a non-negative number, and must be not greater than
|
||||||
|
the value of the expression @code{min(w,h)/2} for the luma and alpha planes,
|
||||||
|
and of @code{min(cw,ch)/2} for the chroma planes.
|
||||||
|
|
||||||
|
@var{luma_power}, @var{chroma_power}, and @var{alpha_power} represent
|
||||||
|
how many times the boxblur filter is applied to the corresponding
|
||||||
|
plane.
|
||||||
|
|
||||||
|
Some examples follow:
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
|
||||||
|
@item
|
||||||
|
Apply a boxblur filter with luma, chroma, and alpha radius
|
||||||
|
set to 2:
|
||||||
|
@example
|
||||||
|
boxblur=2:1
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
Set luma radius to 2, alpha and chroma radius to 0
|
||||||
|
@example
|
||||||
|
boxblur=2:1:0:0:0:0
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
Set luma and chroma radius to a fraction of the video dimension
|
||||||
|
@example
|
||||||
|
boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@end itemize
|
||||||
|
|
||||||
@section copy
|
@section copy
|
||||||
|
|
||||||
Copy the input source unchanged to the output. Mainly useful for
|
Copy the input source unchanged to the output. Mainly useful for
|
||||||
@@ -215,6 +275,19 @@ the output (cropped) width and heigth
|
|||||||
@item ow, oh
|
@item ow, oh
|
||||||
same as @var{out_w} and @var{out_h}
|
same as @var{out_w} and @var{out_h}
|
||||||
|
|
||||||
|
@item a
|
||||||
|
same as @var{iw} / @var{ih}
|
||||||
|
|
||||||
|
@item sar
|
||||||
|
input sample aspect ratio
|
||||||
|
|
||||||
|
@item dar
|
||||||
|
input display aspect ratio, it is the same as (@var{iw} / @var{ih}) * @var{sar}
|
||||||
|
|
||||||
|
@item hsub, vsub
|
||||||
|
horizontal and vertical chroma subsample values. For example for the
|
||||||
|
pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1.
|
||||||
|
|
||||||
@item n
|
@item n
|
||||||
the number of input frame, starting from 0
|
the number of input frame, starting from 0
|
||||||
|
|
||||||
@@ -835,9 +908,6 @@ the named filter.
|
|||||||
The list of the currently supported filters follows:
|
The list of the currently supported filters follows:
|
||||||
@table @var
|
@table @var
|
||||||
@item 2xsai
|
@item 2xsai
|
||||||
@item blackframe
|
|
||||||
@item boxblur
|
|
||||||
@item cropdetect
|
|
||||||
@item decimate
|
@item decimate
|
||||||
@item delogo
|
@item delogo
|
||||||
@item denoise3d
|
@item denoise3d
|
||||||
@@ -874,7 +944,6 @@ The list of the currently supported filters follows:
|
|||||||
@item qp
|
@item qp
|
||||||
@item rectangle
|
@item rectangle
|
||||||
@item remove-logo
|
@item remove-logo
|
||||||
@item rgbtest
|
|
||||||
@item rotate
|
@item rotate
|
||||||
@item sab
|
@item sab
|
||||||
@item screenshot
|
@item screenshot
|
||||||
@@ -1013,8 +1082,7 @@ Erode an image by using a specific structuring element.
|
|||||||
This filter corresponds to the libopencv function @code{cvErode}.
|
This filter corresponds to the libopencv function @code{cvErode}.
|
||||||
|
|
||||||
The filter accepts the parameters: @var{struct_el}:@var{nb_iterations},
|
The filter accepts the parameters: @var{struct_el}:@var{nb_iterations},
|
||||||
with the same meaning and use of those of the dilate filter
|
with the same syntax and semantics as the @ref{dilate} filter.
|
||||||
(@pxref{dilate}).
|
|
||||||
|
|
||||||
@subsection smooth
|
@subsection smooth
|
||||||
|
|
||||||
@@ -1130,7 +1198,13 @@ x and y offsets as specified by the @var{x} and @var{y}
|
|||||||
expressions, or NAN if not yet specified
|
expressions, or NAN if not yet specified
|
||||||
|
|
||||||
@item a
|
@item a
|
||||||
input display aspect ratio, same as @var{iw} / @var{ih}
|
same as @var{iw} / @var{ih}
|
||||||
|
|
||||||
|
@item sar
|
||||||
|
input sample aspect ratio
|
||||||
|
|
||||||
|
@item dar
|
||||||
|
input display aspect ratio, it is the same as (@var{iw} / @var{ih}) * @var{sar}
|
||||||
|
|
||||||
@item hsub, vsub
|
@item hsub, vsub
|
||||||
horizontal and vertical chroma subsample values. For example for the
|
horizontal and vertical chroma subsample values. For example for the
|
||||||
@@ -1190,6 +1264,12 @@ pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
|
|||||||
# pad the input to get a final w/h ratio of 16:9
|
# pad the input to get a final w/h ratio of 16:9
|
||||||
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
|
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
|
||||||
|
|
||||||
|
# for anamorphic video, in order to set the output display aspect ratio,
|
||||||
|
# it is necessary to use sar in the expression, according to the relation:
|
||||||
|
# (ih * X / ih) * sar = output_dar
|
||||||
|
# X = output_dar / sar
|
||||||
|
pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
|
||||||
|
|
||||||
# double output size and put the input video in the bottom-right
|
# double output size and put the input video in the bottom-right
|
||||||
# corner of the output padded area
|
# corner of the output padded area
|
||||||
pad="2*iw:2*ih:ow-iw:oh-ih"
|
pad="2*iw:2*ih:ow-iw:oh-ih"
|
||||||
@@ -1232,7 +1312,13 @@ the output (cropped) width and heigth
|
|||||||
same as @var{out_w} and @var{out_h}
|
same as @var{out_w} and @var{out_h}
|
||||||
|
|
||||||
@item a
|
@item a
|
||||||
input display aspect ratio, same as @var{iw} / @var{ih}
|
same as @var{iw} / @var{ih}
|
||||||
|
|
||||||
|
@item sar
|
||||||
|
input sample aspect ratio
|
||||||
|
|
||||||
|
@item dar
|
||||||
|
input display aspect ratio, it is the same as (@var{iw} / @var{ih}) * @var{sar}
|
||||||
|
|
||||||
@item hsub, vsub
|
@item hsub, vsub
|
||||||
horizontal and vertical chroma subsample values. For example for the
|
horizontal and vertical chroma subsample values. For example for the
|
||||||
@@ -1426,7 +1512,7 @@ setdar=16:9
|
|||||||
setdar=1.77777
|
setdar=1.77777
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also the "setsar" filter documentation (@pxref{setsar}).
|
See also the @ref{setsar} filter documentation.
|
||||||
|
|
||||||
@section setpts
|
@section setpts
|
||||||
|
|
||||||
@@ -1737,7 +1823,7 @@ Flip the input video vertically.
|
|||||||
Deinterlace the input video ("yadif" means "yet another deinterlacing
|
Deinterlace the input video ("yadif" means "yet another deinterlacing
|
||||||
filter").
|
filter").
|
||||||
|
|
||||||
It accepts the optional parameters: @var{mode}:@var{parity}.
|
It accepts the optional parameters: @var{mode}:@var{parity}:@var{auto}.
|
||||||
|
|
||||||
@var{mode} specifies the interlacing mode to adopt, accepts one of the
|
@var{mode} specifies the interlacing mode to adopt, accepts one of the
|
||||||
following values:
|
following values:
|
||||||
@@ -1760,9 +1846,9 @@ interlaced video, accepts one of the following values:
|
|||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
@item 0
|
@item 0
|
||||||
assume bottom field first
|
|
||||||
@item 1
|
|
||||||
assume top field first
|
assume top field first
|
||||||
|
@item 1
|
||||||
|
assume bottom field first
|
||||||
@item -1
|
@item -1
|
||||||
enable automatic detection
|
enable automatic detection
|
||||||
@end table
|
@end table
|
||||||
@@ -1771,6 +1857,18 @@ Default value is -1.
|
|||||||
If interlacing is unknown or decoder does not export this information,
|
If interlacing is unknown or decoder does not export this information,
|
||||||
top field first will be assumed.
|
top field first will be assumed.
|
||||||
|
|
||||||
|
@var{auto} specifies if deinterlacer should trust the interlaced flag
|
||||||
|
and only deinterlace frames marked as interlaced
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item 0
|
||||||
|
deinterlace all frames
|
||||||
|
@item 1
|
||||||
|
only deinterlace frames marked as interlaced
|
||||||
|
@end table
|
||||||
|
|
||||||
|
Default value is 0.
|
||||||
|
|
||||||
@c man end VIDEO FILTERS
|
@c man end VIDEO FILTERS
|
||||||
|
|
||||||
@chapter Video Sources
|
@chapter Video Sources
|
||||||
@@ -1960,8 +2058,7 @@ form @var{width}x@var{height} or a frame size abbreviation.
|
|||||||
the form @var{num}/@var{den} or a frame rate abbreviation.
|
the form @var{num}/@var{den} or a frame rate abbreviation.
|
||||||
@var{src_name} is the name to the frei0r source to load. For more
|
@var{src_name} is the name to the frei0r source to load. For more
|
||||||
information regarding frei0r and how to set the parameters read the
|
information regarding frei0r and how to set the parameters read the
|
||||||
section "frei0r" (@pxref{frei0r}) in the description of the video
|
section @ref{frei0r} in the description of the video filters.
|
||||||
filters.
|
|
||||||
|
|
||||||
Some examples follow:
|
Some examples follow:
|
||||||
@example
|
@example
|
||||||
@@ -1970,6 +2067,53 @@ Some examples follow:
|
|||||||
frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
|
frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@section rgbtestsrc, testsrc
|
||||||
|
|
||||||
|
The @code{rgbtestsrc} source generates an RGB test pattern useful for
|
||||||
|
detecting RGB vs BGR issues. You should see a red, green and blue
|
||||||
|
stripe from top to bottom.
|
||||||
|
|
||||||
|
The @code{testsrc} source generates a test video pattern, showing a
|
||||||
|
color pattern, a scrolling gradient and a timestamp. This is mainly
|
||||||
|
intended for testing purposes.
|
||||||
|
|
||||||
|
Both sources accept an optional sequence of @var{key}=@var{value} pairs,
|
||||||
|
separated by ":". The description of the accepted options follows.
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item size, s
|
||||||
|
Specify the size of the sourced video, it may be a string of the form
|
||||||
|
@var{width}x@var{heigth}, or the name of a size abbreviation. The
|
||||||
|
default value is "320x240".
|
||||||
|
|
||||||
|
@item rate, r
|
||||||
|
Specify the frame rate of the sourced video, as the number of frames
|
||||||
|
generated per second. It has to be a string in the format
|
||||||
|
@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
|
||||||
|
number or a valid video frame rate abbreviation. The default value is
|
||||||
|
"25".
|
||||||
|
|
||||||
|
@item duration
|
||||||
|
Set the video duration of the sourced video. The accepted syntax is:
|
||||||
|
@example
|
||||||
|
[-]HH[:MM[:SS[.m...]]]
|
||||||
|
[-]S+[.m...]
|
||||||
|
@end example
|
||||||
|
See also the function @code{av_parse_time()}.
|
||||||
|
|
||||||
|
If not specified, or the expressed duration is negative, the video is
|
||||||
|
supposed to be generated forever.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
For example the following:
|
||||||
|
@example
|
||||||
|
testsrc=duration=5.3:size=qcif:rate=10
|
||||||
|
@end example
|
||||||
|
|
||||||
|
will generate a video with a duration of 5.3 seconds, with size
|
||||||
|
176x144 and a framerate of 10 frames per second.
|
||||||
|
|
||||||
@c man end VIDEO SOURCES
|
@c man end VIDEO SOURCES
|
||||||
|
|
||||||
@chapter Video Sinks
|
@chapter Video Sinks
|
||||||
|
@@ -66,6 +66,7 @@ library:
|
|||||||
@tab Used in Z and Z95 games.
|
@tab Used in Z and Z95 games.
|
||||||
@item Brute Force & Ignorance @tab @tab X
|
@item Brute Force & Ignorance @tab @tab X
|
||||||
@tab Used in the game Flash Traffic: City of Angels.
|
@tab Used in the game Flash Traffic: City of Angels.
|
||||||
|
@item BWF @tab X @tab X
|
||||||
@item Interplay C93 @tab @tab X
|
@item Interplay C93 @tab @tab X
|
||||||
@tab Used in the game Cyberia from Interplay.
|
@tab Used in the game Cyberia from Interplay.
|
||||||
@item Delphine Software International CIN @tab @tab X
|
@item Delphine Software International CIN @tab @tab X
|
||||||
@@ -400,7 +401,7 @@ following image formats are supported:
|
|||||||
@tab experimental lossless codec (fourcc: FFV1)
|
@tab experimental lossless codec (fourcc: FFV1)
|
||||||
@item Flash Screen Video v1 @tab X @tab X
|
@item Flash Screen Video v1 @tab X @tab X
|
||||||
@tab fourcc: FSV1
|
@tab fourcc: FSV1
|
||||||
@item Flash Screen Video v2 @tab X
|
@item Flash Screen Video v2 @tab X @tab X
|
||||||
@item Flash Video (FLV) @tab X @tab X
|
@item Flash Video (FLV) @tab X @tab X
|
||||||
@tab Sorenson H.263 used in Flash
|
@tab Sorenson H.263 used in Flash
|
||||||
@item Fraps @tab @tab X
|
@item Fraps @tab @tab X
|
||||||
@@ -821,8 +822,8 @@ the FFmpeg Windows Help Forum at
|
|||||||
|
|
||||||
FFmpeg can be built to run natively on Windows using the MinGW tools. Install
|
FFmpeg can be built to run natively on Windows using the MinGW tools. Install
|
||||||
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
|
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
|
||||||
You can find detailed installation
|
You can find detailed installation instructions in the download
|
||||||
instructions in the download section and the FAQ.
|
section and the FAQ.
|
||||||
|
|
||||||
FFmpeg does not build out-of-the-box with the packages the automated MinGW
|
FFmpeg does not build out-of-the-box with the packages the automated MinGW
|
||||||
installer provides. It also requires coreutils to be installed and many other
|
installer provides. It also requires coreutils to be installed and many other
|
||||||
@@ -850,13 +851,14 @@ noticeable when running make for a second time (for example in
|
|||||||
@code{make install}).
|
@code{make install}).
|
||||||
|
|
||||||
@item In order to compile FFplay, you must have the MinGW development library
|
@item In order to compile FFplay, you must have the MinGW development library
|
||||||
of SDL. Get it from @url{http://www.libsdl.org}.
|
of @uref{http://www.libsdl.org/, SDL}.
|
||||||
Edit the @file{bin/sdl-config} script so that it points to the correct prefix
|
Edit the @file{bin/sdl-config} script so that it points to the correct prefix
|
||||||
where SDL was installed. Verify that @file{sdl-config} can be launched from
|
where SDL was installed. Verify that @file{sdl-config} can be launched from
|
||||||
the MSYS command line.
|
the MSYS command line.
|
||||||
|
|
||||||
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
||||||
you can build libavutil, libavcodec and libavformat as DLLs.
|
you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
|
||||||
|
libavformat) as DLLs.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@@ -971,7 +973,8 @@ make install
|
|||||||
Your install path (@file{/usr/local/} by default) should now have the
|
Your install path (@file{/usr/local/} by default) should now have the
|
||||||
necessary DLL and LIB files under the @file{bin} directory.
|
necessary DLL and LIB files under the @file{bin} directory.
|
||||||
|
|
||||||
@end enumerate
|
Alternatively, build the libraries with a cross compiler, according to
|
||||||
|
the instructions below in @ref{Cross compilation for Windows with Linux}.
|
||||||
|
|
||||||
To use those files with MSVC++, do the same as you would do with
|
To use those files with MSVC++, do the same as you would do with
|
||||||
the static libraries, as described above. But in Step 4,
|
the static libraries, as described above. But in Step 4,
|
||||||
@@ -984,10 +987,7 @@ libraries (@file{libxxx.a} files) you should add the MSVC import libraries
|
|||||||
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
||||||
reference errors. There should be no need for @file{libmingwex.a},
|
reference errors. There should be no need for @file{libmingwex.a},
|
||||||
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
||||||
statically linked into the DLLs. The @file{bin} directory contains a bunch
|
statically linked into the DLLs.
|
||||||
of DLL files, but the ones that are actually used to run your application
|
|
||||||
are the ones with a major version number in their filenames
|
|
||||||
(i.e. @file{avcodec-51.dll}).
|
|
||||||
|
|
||||||
FFmpeg headers do not declare global data for Windows DLLs through the usual
|
FFmpeg headers do not declare global data for Windows DLLs through the usual
|
||||||
dllexport/dllimport interface. Such data will be exported properly while
|
dllexport/dllimport interface. Such data will be exported properly while
|
||||||
@@ -1006,6 +1006,35 @@ required when using import libraries generated by lib.exe.
|
|||||||
This issue is reported upstream at
|
This issue is reported upstream at
|
||||||
@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
|
@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
|
||||||
|
|
||||||
|
To create import libraries that work with the @code{/OPT:REF} option
|
||||||
|
(which is enabled by default in Release mode), follow these steps:
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
|
||||||
|
@item Open @file{Visual Studio 2005 Command Prompt}.
|
||||||
|
|
||||||
|
Alternatively, in a normal command line prompt, call @file{vcvars32.bat}
|
||||||
|
which sets up the environment variables for the Visual C++ tools
|
||||||
|
(the standard location for this file is
|
||||||
|
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat}).
|
||||||
|
|
||||||
|
@item Enter the @file{bin} directory where the created LIB and DLL files
|
||||||
|
are stored.
|
||||||
|
|
||||||
|
@item Generate new import libraries with @file{lib.exe}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
lib /machine:i386 /def:..\lib\avcodec-53.def /out:avcodec.lib
|
||||||
|
lib /machine:i386 /def:..\lib\avdevice-53.def /out:avdevice.lib
|
||||||
|
lib /machine:i386 /def:..\lib\avfilter-2.def /out:avfilter.lib
|
||||||
|
lib /machine:i386 /def:..\lib\avformat-53.def /out:avformat.lib
|
||||||
|
lib /machine:i386 /def:..\lib\avutil-51.def /out:avutil.lib
|
||||||
|
lib /machine:i386 /def:..\lib\swscale-2.def /out:swscale.lib
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
@anchor{Cross compilation for Windows with Linux}
|
||||||
@subsection Cross compilation for Windows with Linux
|
@subsection Cross compilation for Windows with Linux
|
||||||
|
|
||||||
You must use the MinGW cross compilation tools available at
|
You must use the MinGW cross compilation tools available at
|
||||||
@@ -1018,8 +1047,7 @@ Then configure FFmpeg with the following options:
|
|||||||
(you can change the cross-prefix according to the prefix chosen for the
|
(you can change the cross-prefix according to the prefix chosen for the
|
||||||
MinGW tools).
|
MinGW tools).
|
||||||
|
|
||||||
Then you can easily test FFmpeg with Wine
|
Then you can easily test FFmpeg with @uref{http://www.winehq.com/, Wine}.
|
||||||
(@url{http://www.winehq.com/}).
|
|
||||||
|
|
||||||
@subsection Compilation under Cygwin
|
@subsection Compilation under Cygwin
|
||||||
|
|
||||||
@@ -1058,8 +1086,8 @@ If you want to build FFmpeg with additional libraries, download Cygwin
|
|||||||
libogg-devel, libvorbis-devel
|
libogg-devel, libvorbis-devel
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
These library packages are only available from Cygwin Ports
|
These library packages are only available from
|
||||||
(@url{http://sourceware.org/cygwinports/}) :
|
@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-devel, libgsm-devel,
|
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-devel, libgsm-devel,
|
||||||
|
130
doc/indevs.texi
130
doc/indevs.texi
@@ -137,6 +137,95 @@ For more information read:
|
|||||||
|
|
||||||
IIDC1394 input device, based on libdc1394 and libraw1394.
|
IIDC1394 input device, based on libdc1394 and libraw1394.
|
||||||
|
|
||||||
|
@section openal
|
||||||
|
|
||||||
|
The OpenAL input device provides audio capture on all systems with a
|
||||||
|
working OpenAL 1.1 implementation.
|
||||||
|
|
||||||
|
To enable this input device during configuration, you need OpenAL
|
||||||
|
headers and libraries installed on your system, and need to configure
|
||||||
|
FFmpeg with @code{--enable-openal}.
|
||||||
|
|
||||||
|
OpenAL headers and libraries should be provided as part of your OpenAL
|
||||||
|
implementation, or as an additional download (an SDK). Depending on your
|
||||||
|
installation you may need to specify additional flags via the
|
||||||
|
@code{--extra-cflags} and @code{--extra-ldflags} for allowing the build
|
||||||
|
system to locate the OpenAL headers and libraries.
|
||||||
|
|
||||||
|
An incomplete list of OpenAL implementations follows:
|
||||||
|
|
||||||
|
@table @strong
|
||||||
|
@item Creative
|
||||||
|
The official Windows implementation, providing hardware acceleration
|
||||||
|
with supported devices and software fallback.
|
||||||
|
See @url{http://openal.org/}.
|
||||||
|
@item OpenAL Soft
|
||||||
|
Portable, open source (LGPL) software implementation. Includes
|
||||||
|
backends for the most common sound APIs on the Windows, Linux,
|
||||||
|
Solaris, and BSD operating systems.
|
||||||
|
See @url{http://kcat.strangesoft.net/openal.html}.
|
||||||
|
@item Apple
|
||||||
|
OpenAL is part of Core Audio, the official Mac OS X Audio interface.
|
||||||
|
See @url{http://developer.apple.com/technologies/mac/audio-and-video.html}
|
||||||
|
@end table
|
||||||
|
|
||||||
|
This device allows to capture from an audio input device handled
|
||||||
|
through OpenAL.
|
||||||
|
|
||||||
|
You need to specify the name of the device to capture in the provided
|
||||||
|
filename. If the empty string is provided, the device will
|
||||||
|
automatically select the default device. You can get the list of the
|
||||||
|
supported devices by using the option @var{list_devices}.
|
||||||
|
|
||||||
|
@subsection Options
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item channels
|
||||||
|
Set the number of channels in the captured audio. Only the values
|
||||||
|
@option{1} (monaural) and @option{2} (stereo) are currently supported.
|
||||||
|
Defaults to @option{2}.
|
||||||
|
|
||||||
|
@item sample_size
|
||||||
|
Set the sample size (in bits) of the captured audio. Only the values
|
||||||
|
@option{8} and @option{16} are currently supported. Defaults to
|
||||||
|
@option{16}.
|
||||||
|
|
||||||
|
@item sample_rate
|
||||||
|
Set the sample rate (in Hz) of the captured audio.
|
||||||
|
Defaults to @option{44.1k}.
|
||||||
|
|
||||||
|
@item list_devices
|
||||||
|
If set to @option{true}, print a list of devices and exit.
|
||||||
|
Defaults to @option{false}.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@subsection Examples
|
||||||
|
|
||||||
|
Print the list of OpenAL supported devices and exit:
|
||||||
|
@example
|
||||||
|
$ ffmpeg -list_devices true -f openal -i dummy out.ogg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Capture from the OpenAL device @file{DR-BT101 via PulseAudio}:
|
||||||
|
@example
|
||||||
|
$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Capture from the default device (note the empty string '' as filename):
|
||||||
|
@example
|
||||||
|
$ ffmpeg -f openal -i '' out.ogg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Capture from two devices simultaneously, writing to two different files,
|
||||||
|
within the same @file{ffmpeg} command:
|
||||||
|
@example
|
||||||
|
$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
|
||||||
|
@end example
|
||||||
|
Note: not all OpenAL implementations support multiple simultaneous capture -
|
||||||
|
try the latest OpenAL Soft if the above does not work.
|
||||||
|
|
||||||
@section oss
|
@section oss
|
||||||
|
|
||||||
Open Sound System input device.
|
Open Sound System input device.
|
||||||
@@ -248,7 +337,46 @@ For example to grab from @file{:0.0} using @file{ffmpeg}:
|
|||||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||||
|
|
||||||
# Grab at position 10,20.
|
# Grab at position 10,20.
|
||||||
ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection @var{follow_mouse} AVOption
|
||||||
|
|
||||||
|
The syntax is:
|
||||||
|
@example
|
||||||
|
-follow_mouse centered|@var{PIXELS}
|
||||||
|
@end example
|
||||||
|
|
||||||
|
When it is specified with "centered", the grabbing region follows the mouse
|
||||||
|
pointer and keeps the pointer at the center of region; otherwise, the region
|
||||||
|
follows only when the mouse pointer reaches within @var{PIXELS} (greater than
|
||||||
|
zero) to the edge of region.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
|
||||||
|
|
||||||
|
# Follows only when the mouse pointer reaches within 100 pixels to edge
|
||||||
|
ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection @var{show_region} AVOption
|
||||||
|
|
||||||
|
The syntax is:
|
||||||
|
@example
|
||||||
|
-show_region 1
|
||||||
|
@end example
|
||||||
|
|
||||||
|
If @var{show_region} AVOption is specified with @var{1}, then the grabbing
|
||||||
|
region will be indicated on screen. With this option, it's easy to know what is
|
||||||
|
being grabbed if only a portion of the screen is grabbed.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
@example
|
||||||
|
ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||||
|
|
||||||
|
# With follow_mouse
|
||||||
|
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@c man end INPUT DEVICES
|
@c man end INPUT DEVICES
|
||||||
|
@@ -51,7 +51,7 @@ and the input video converted to MPEG-2 video, use the command:
|
|||||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
|
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also the @code{framecrc} muxer (@pxref{framecrc}).
|
See also the @ref{framecrc} muxer.
|
||||||
|
|
||||||
@anchor{framecrc}
|
@anchor{framecrc}
|
||||||
@section framecrc
|
@section framecrc
|
||||||
@@ -88,7 +88,7 @@ MPEG-2 video, use the command:
|
|||||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
|
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also the @code{crc} muxer (@pxref{crc}).
|
See also the @ref{crc} muxer.
|
||||||
|
|
||||||
@section image2
|
@section image2
|
||||||
|
|
||||||
|
@@ -242,7 +242,7 @@ data transferred over RDT).
|
|||||||
|
|
||||||
The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
||||||
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
||||||
RTSP server, @url{http://github.com/revmischa/rtsp-server}).
|
@uref{http://github.com/revmischa/rtsp-server, RTSP server}).
|
||||||
|
|
||||||
The required syntax for a RTSP url is:
|
The required syntax for a RTSP url is:
|
||||||
@example
|
@example
|
||||||
|
@@ -352,6 +352,7 @@ sub postprocess
|
|||||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||||
|
s/\@ref\{([^\}]*)\}/$1/g;
|
||||||
s/\@noindent\s*//g;
|
s/\@noindent\s*//g;
|
||||||
s/\@refill//g;
|
s/\@refill//g;
|
||||||
s/\@gol//g;
|
s/\@gol//g;
|
||||||
|
83
ffplay.c
83
ffplay.c
@@ -25,6 +25,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/colorspace.h"
|
#include "libavutil/colorspace.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#include "libavcodec/audioconvert.h"
|
#include "libavcodec/audioconvert.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "libavcodec/avfft.h"
|
#include "libavcodec/avfft.h"
|
||||||
|
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
@@ -222,9 +223,6 @@ static int fs_screen_width;
|
|||||||
static int fs_screen_height;
|
static int fs_screen_height;
|
||||||
static int screen_width = 0;
|
static int screen_width = 0;
|
||||||
static int screen_height = 0;
|
static int screen_height = 0;
|
||||||
static int frame_width = 0;
|
|
||||||
static int frame_height = 0;
|
|
||||||
static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
|
|
||||||
static int audio_disable;
|
static int audio_disable;
|
||||||
static int video_disable;
|
static int video_disable;
|
||||||
static int wanted_stream[AVMEDIA_TYPE_NB]={
|
static int wanted_stream[AVMEDIA_TYPE_NB]={
|
||||||
@@ -1430,7 +1428,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts1, int64_
|
|||||||
|
|
||||||
static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacket *pkt)
|
static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
int len1 av_unused, got_picture, i;
|
int got_picture, i;
|
||||||
|
|
||||||
if (packet_queue_get(&is->videoq, pkt, 1) < 0)
|
if (packet_queue_get(&is->videoq, pkt, 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1457,9 +1455,7 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
len1 = avcodec_decode_video2(is->video_st->codec,
|
avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt);
|
||||||
frame, &got_picture,
|
|
||||||
pkt);
|
|
||||||
|
|
||||||
if (got_picture) {
|
if (got_picture) {
|
||||||
if (decoder_reorder_pts == -1) {
|
if (decoder_reorder_pts == -1) {
|
||||||
@@ -1656,6 +1652,7 @@ static int input_config_props(AVFilterLink *link)
|
|||||||
|
|
||||||
link->w = c->width;
|
link->w = c->width;
|
||||||
link->h = c->height;
|
link->h = c->height;
|
||||||
|
link->sample_aspect_ratio = priv->is->video_st->sample_aspect_ratio;
|
||||||
link->time_base = priv->is->video_st->time_base;
|
link->time_base = priv->is->video_st->time_base;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1691,10 +1688,10 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
|
|||||||
|
|
||||||
if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src",
|
if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src",
|
||||||
NULL, is, graph)) < 0)
|
NULL, is, graph)) < 0)
|
||||||
goto the_end;
|
return ret;
|
||||||
if ((ret = avfilter_graph_create_filter(&filt_out, avfilter_get_by_name("buffersink"), "out",
|
if ((ret = avfilter_graph_create_filter(&filt_out, avfilter_get_by_name("buffersink"), "out",
|
||||||
NULL, pix_fmts, graph)) < 0)
|
NULL, pix_fmts, graph)) < 0)
|
||||||
goto the_end;
|
return ret;
|
||||||
|
|
||||||
if(vfilters) {
|
if(vfilters) {
|
||||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||||
@@ -1711,18 +1708,18 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
|
|||||||
inputs->next = NULL;
|
inputs->next = NULL;
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse(graph, vfilters, &inputs, &outputs, NULL)) < 0)
|
if ((ret = avfilter_graph_parse(graph, vfilters, &inputs, &outputs, NULL)) < 0)
|
||||||
goto the_end;
|
return ret;
|
||||||
av_freep(&vfilters);
|
av_freep(&vfilters);
|
||||||
} else {
|
} else {
|
||||||
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
|
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
|
||||||
goto the_end;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = avfilter_graph_config(graph, NULL)) < 0)
|
if ((ret = avfilter_graph_config(graph, NULL)) < 0)
|
||||||
goto the_end;
|
return ret;
|
||||||
|
|
||||||
is->out_video_filter = filt_out;
|
is->out_video_filter = filt_out;
|
||||||
the_end:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1808,7 +1805,7 @@ static int subtitle_thread(void *arg)
|
|||||||
VideoState *is = arg;
|
VideoState *is = arg;
|
||||||
SubPicture *sp;
|
SubPicture *sp;
|
||||||
AVPacket pkt1, *pkt = &pkt1;
|
AVPacket pkt1, *pkt = &pkt1;
|
||||||
int len1 av_unused, got_subtitle;
|
int got_subtitle;
|
||||||
double pts;
|
double pts;
|
||||||
int i, j;
|
int i, j;
|
||||||
int r, g, b, y, u, v, a;
|
int r, g, b, y, u, v, a;
|
||||||
@@ -1832,7 +1829,7 @@ static int subtitle_thread(void *arg)
|
|||||||
SDL_UnlockMutex(is->subpq_mutex);
|
SDL_UnlockMutex(is->subpq_mutex);
|
||||||
|
|
||||||
if (is->subtitleq.abort_request)
|
if (is->subtitleq.abort_request)
|
||||||
goto the_end;
|
return 0;
|
||||||
|
|
||||||
sp = &is->subpq[is->subpq_windex];
|
sp = &is->subpq[is->subpq_windex];
|
||||||
|
|
||||||
@@ -1842,9 +1839,9 @@ static int subtitle_thread(void *arg)
|
|||||||
if (pkt->pts != AV_NOPTS_VALUE)
|
if (pkt->pts != AV_NOPTS_VALUE)
|
||||||
pts = av_q2d(is->subtitle_st->time_base)*pkt->pts;
|
pts = av_q2d(is->subtitle_st->time_base)*pkt->pts;
|
||||||
|
|
||||||
len1 = avcodec_decode_subtitle2(is->subtitle_st->codec,
|
avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
|
||||||
&sp->sub, &got_subtitle,
|
&got_subtitle, pkt);
|
||||||
pkt);
|
|
||||||
if (got_subtitle && sp->sub.format == 0) {
|
if (got_subtitle && sp->sub.format == 0) {
|
||||||
sp->pts = pts;
|
sp->pts = pts;
|
||||||
|
|
||||||
@@ -1869,7 +1866,6 @@ static int subtitle_thread(void *arg)
|
|||||||
}
|
}
|
||||||
av_free_packet(pkt);
|
av_free_packet(pkt);
|
||||||
}
|
}
|
||||||
the_end:
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2115,11 +2111,15 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
SDL_AudioSpec wanted_spec, spec;
|
SDL_AudioSpec wanted_spec, spec;
|
||||||
|
AVDictionary *opts;
|
||||||
|
AVDictionaryEntry *t = NULL;
|
||||||
|
|
||||||
if (stream_index < 0 || stream_index >= ic->nb_streams)
|
if (stream_index < 0 || stream_index >= ic->nb_streams)
|
||||||
return -1;
|
return -1;
|
||||||
avctx = ic->streams[stream_index]->codec;
|
avctx = ic->streams[stream_index]->codec;
|
||||||
|
|
||||||
|
opts = filter_codec_opts(codec_opts, avctx->codec_id, 0);
|
||||||
|
|
||||||
/* prepare audio output */
|
/* prepare audio output */
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||||
if (avctx->channels > 0) {
|
if (avctx->channels > 0) {
|
||||||
@@ -2135,7 +2135,12 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
|
|
||||||
avctx->workaround_bugs = workaround_bugs;
|
avctx->workaround_bugs = workaround_bugs;
|
||||||
avctx->lowres = lowres;
|
avctx->lowres = lowres;
|
||||||
if(lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
if(avctx->lowres > codec->max_lowres){
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
|
||||||
|
codec->max_lowres);
|
||||||
|
avctx->lowres= codec->max_lowres;
|
||||||
|
}
|
||||||
|
if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||||
avctx->idct_algo= idct;
|
avctx->idct_algo= idct;
|
||||||
if(fast) avctx->flags2 |= CODEC_FLAG2_FAST;
|
if(fast) avctx->flags2 |= CODEC_FLAG2_FAST;
|
||||||
avctx->skip_frame= skip_frame;
|
avctx->skip_frame= skip_frame;
|
||||||
@@ -2145,13 +2150,16 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
avctx->error_concealment= error_concealment;
|
avctx->error_concealment= error_concealment;
|
||||||
avctx->thread_count= thread_count;
|
avctx->thread_count= thread_count;
|
||||||
|
|
||||||
set_context_opts(avctx, avcodec_opts[avctx->codec_type], 0, codec);
|
|
||||||
|
|
||||||
if(codec->capabilities & CODEC_CAP_DR1)
|
if(codec->capabilities & CODEC_CAP_DR1)
|
||||||
avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||||
|
|
||||||
if (avcodec_open(avctx, codec) < 0)
|
if (!codec ||
|
||||||
|
avcodec_open2(avctx, codec, &opts) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);
|
||||||
|
return AVERROR_OPTION_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
/* prepare audio output */
|
/* prepare audio output */
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||||
@@ -2305,6 +2313,8 @@ static int read_thread(void *arg)
|
|||||||
int eof=0;
|
int eof=0;
|
||||||
int pkt_in_play_range = 0;
|
int pkt_in_play_range = 0;
|
||||||
AVDictionaryEntry *t;
|
AVDictionaryEntry *t;
|
||||||
|
AVDictionary **opts;
|
||||||
|
int orig_nb_streams;
|
||||||
|
|
||||||
memset(st_index, -1, sizeof(st_index));
|
memset(st_index, -1, sizeof(st_index));
|
||||||
is->video_stream = -1;
|
is->video_stream = -1;
|
||||||
@@ -2330,12 +2340,19 @@ static int read_thread(void *arg)
|
|||||||
if(genpts)
|
if(genpts)
|
||||||
ic->flags |= AVFMT_FLAG_GENPTS;
|
ic->flags |= AVFMT_FLAG_GENPTS;
|
||||||
|
|
||||||
err = av_find_stream_info(ic);
|
opts = setup_find_stream_info_opts(ic, codec_opts);
|
||||||
|
orig_nb_streams = ic->nb_streams;
|
||||||
|
|
||||||
|
err = avformat_find_stream_info(ic, opts);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
fprintf(stderr, "%s: could not find codec parameters\n", is->filename);
|
fprintf(stderr, "%s: could not find codec parameters\n", is->filename);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
for (i = 0; i < orig_nb_streams; i++)
|
||||||
|
av_dict_free(&opts[i]);
|
||||||
|
av_freep(&opts);
|
||||||
|
|
||||||
if(ic->pb)
|
if(ic->pb)
|
||||||
ic->pb->eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end
|
ic->pb->eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end
|
||||||
|
|
||||||
@@ -2801,15 +2818,8 @@ static void event_loop(void)
|
|||||||
|
|
||||||
static int opt_frame_size(const char *opt, const char *arg)
|
static int opt_frame_size(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) {
|
av_log(NULL, AV_LOG_WARNING, "Option -s is deprecated, use -video_size.\n");
|
||||||
fprintf(stderr, "Incorrect frame size\n");
|
return opt_default("video_size", arg);
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
if ((frame_width % 2) != 0 || (frame_height % 2) != 0) {
|
|
||||||
fprintf(stderr, "Frame size must be a multiple of 2\n");
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opt_width(const char *opt, const char *arg)
|
static int opt_width(const char *opt, const char *arg)
|
||||||
@@ -2836,8 +2846,8 @@ static int opt_format(const char *opt, const char *arg)
|
|||||||
|
|
||||||
static int opt_frame_pix_fmt(const char *opt, const char *arg)
|
static int opt_frame_pix_fmt(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
frame_pix_fmt = av_get_pix_fmt(arg);
|
av_log(NULL, AV_LOG_WARNING, "Option -pix_fmt is deprecated, use -pixel_format.\n");
|
||||||
return 0;
|
return opt_default("pixel_format", arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opt_sync(const char *opt, const char *arg)
|
static int opt_sync(const char *opt, const char *arg)
|
||||||
@@ -3028,6 +3038,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
if (SDL_Init (flags)) {
|
if (SDL_Init (flags)) {
|
||||||
fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
|
fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
|
||||||
|
fprintf(stderr, "(Did you set the DISPLAY variable?)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
coder=0
|
|
||||||
bf=0
|
|
||||||
flags2=-wpred-dct8x8
|
|
||||||
wpredp=0
|
|
11
ffprobe.c
11
ffprobe.c
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
@@ -143,6 +143,7 @@ static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt)
|
|||||||
printf("pos=%"PRId64"\n" , pkt->pos);
|
printf("pos=%"PRId64"\n" , pkt->pos);
|
||||||
printf("flags=%c\n" , pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_');
|
printf("flags=%c\n" , pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_');
|
||||||
printf("[/PACKET]\n");
|
printf("[/PACKET]\n");
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_packets(AVFormatContext *fmt_ctx)
|
static void show_packets(AVFormatContext *fmt_ctx)
|
||||||
@@ -201,6 +202,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
|
|||||||
}
|
}
|
||||||
printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ?
|
printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ?
|
||||||
av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
|
av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
|
||||||
|
printf("level=%d\n", dec_ctx->level);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
@@ -231,6 +233,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
|
|||||||
printf("TAG:%s=%s\n", tag->key, tag->value);
|
printf("TAG:%s=%s\n", tag->key, tag->value);
|
||||||
|
|
||||||
printf("[/STREAM]\n");
|
printf("[/STREAM]\n");
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_format(AVFormatContext *fmt_ctx)
|
static void show_format(AVFormatContext *fmt_ctx)
|
||||||
@@ -257,6 +260,7 @@ static void show_format(AVFormatContext *fmt_ctx)
|
|||||||
printf("TAG:%s=%s\n", tag->key, tag->value);
|
printf("TAG:%s=%s\n", tag->key, tag->value);
|
||||||
|
|
||||||
printf("[/FORMAT]\n");
|
printf("[/FORMAT]\n");
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
||||||
@@ -291,7 +295,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
|||||||
if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
||||||
fprintf(stderr, "Unsupported codec with id %d for input stream %d\n",
|
fprintf(stderr, "Unsupported codec with id %d for input stream %d\n",
|
||||||
stream->codec->codec_id, stream->index);
|
stream->codec->codec_id, stream->index);
|
||||||
} else if (avcodec_open(stream->codec, codec) < 0) {
|
} else if (avcodec_open2(stream->codec, codec, NULL) < 0) {
|
||||||
fprintf(stderr, "Error while opening codec for input stream %d\n",
|
fprintf(stderr, "Error while opening codec for input stream %d\n",
|
||||||
stream->index);
|
stream->index);
|
||||||
}
|
}
|
||||||
@@ -364,12 +368,13 @@ static int opt_help(const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_pretty(void)
|
static int opt_pretty(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
show_value_unit = 1;
|
show_value_unit = 1;
|
||||||
use_value_prefix = 1;
|
use_value_prefix = 1;
|
||||||
use_byte_value_binary_prefix = 1;
|
use_byte_value_binary_prefix = 1;
|
||||||
use_value_sexagesimal_format = 1;
|
use_value_sexagesimal_format = 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
|
75
ffserver.c
75
ffserver.c
@@ -37,9 +37,10 @@
|
|||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/lfg.h"
|
#include "libavutil/lfg.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
#include "libavutil/random_seed.h"
|
#include "libavutil/random_seed.h"
|
||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -94,7 +95,9 @@ static const char *http_state[] = {
|
|||||||
"RTSP_SEND_PACKET",
|
"RTSP_SEND_PACKET",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
#define MAX_STREAMS 20
|
#define MAX_STREAMS 20
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IOBUFFER_INIT_SIZE 8192
|
#define IOBUFFER_INIT_SIZE 8192
|
||||||
|
|
||||||
@@ -2116,7 +2119,7 @@ static void open_parser(AVFormatContext *s, int i)
|
|||||||
codec = avcodec_find_decoder(st->codec->codec_id);
|
codec = avcodec_find_decoder(st->codec->codec_id);
|
||||||
if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) {
|
if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) {
|
||||||
st->codec->parse_only = 1;
|
st->codec->parse_only = 1;
|
||||||
if (avcodec_open(st->codec, codec) < 0)
|
if (avcodec_open2(st->codec, codec, NULL) < 0)
|
||||||
st->codec->parse_only = 0;
|
st->codec->parse_only = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2127,13 +2130,12 @@ static int open_input_stream(HTTPContext *c, const char *info)
|
|||||||
char buf[128];
|
char buf[128];
|
||||||
char input_filename[1024];
|
char input_filename[1024];
|
||||||
AVFormatContext *s = NULL;
|
AVFormatContext *s = NULL;
|
||||||
int buf_size, i, ret;
|
int i, ret;
|
||||||
int64_t stream_pos;
|
int64_t stream_pos;
|
||||||
|
|
||||||
/* find file name */
|
/* find file name */
|
||||||
if (c->stream->feed) {
|
if (c->stream->feed) {
|
||||||
strcpy(input_filename, c->stream->feed->feed_filename);
|
strcpy(input_filename, c->stream->feed->feed_filename);
|
||||||
buf_size = FFM_PACKET_SIZE;
|
|
||||||
/* compute position (absolute time) */
|
/* compute position (absolute time) */
|
||||||
if (av_find_info_tag(buf, sizeof(buf), "date", info)) {
|
if (av_find_info_tag(buf, sizeof(buf), "date", info)) {
|
||||||
if ((ret = av_parse_time(&stream_pos, buf, 0)) < 0)
|
if ((ret = av_parse_time(&stream_pos, buf, 0)) < 0)
|
||||||
@@ -2145,7 +2147,6 @@ static int open_input_stream(HTTPContext *c, const char *info)
|
|||||||
stream_pos = av_gettime() - c->stream->prebuffer * (int64_t)1000;
|
stream_pos = av_gettime() - c->stream->prebuffer * (int64_t)1000;
|
||||||
} else {
|
} else {
|
||||||
strcpy(input_filename, c->stream->feed_filename);
|
strcpy(input_filename, c->stream->feed_filename);
|
||||||
buf_size = 0;
|
|
||||||
/* compute position (relative time) */
|
/* compute position (relative time) */
|
||||||
if (av_find_info_tag(buf, sizeof(buf), "date", info)) {
|
if (av_find_info_tag(buf, sizeof(buf), "date", info)) {
|
||||||
if ((ret = av_parse_time(&stream_pos, buf, 1)) < 0)
|
if ((ret = av_parse_time(&stream_pos, buf, 1)) < 0)
|
||||||
@@ -2229,11 +2230,11 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0);
|
av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0);
|
||||||
av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0);
|
av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0);
|
||||||
|
|
||||||
c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams);
|
|
||||||
|
|
||||||
for(i=0;i<c->stream->nb_streams;i++) {
|
for(i=0;i<c->stream->nb_streams;i++) {
|
||||||
|
AVStream *st;
|
||||||
AVStream *src;
|
AVStream *src;
|
||||||
c->fmt_ctx.streams[i] = av_mallocz(sizeof(AVStream));
|
st = av_mallocz(sizeof(AVStream));
|
||||||
|
c->fmt_ctx.streams[i] = st;
|
||||||
/* if file or feed, then just take streams from FFStream struct */
|
/* if file or feed, then just take streams from FFStream struct */
|
||||||
if (!c->stream->feed ||
|
if (!c->stream->feed ||
|
||||||
c->stream->feed == c->stream)
|
c->stream->feed == c->stream)
|
||||||
@@ -2241,9 +2242,9 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
else
|
else
|
||||||
src = c->stream->feed->streams[c->stream->feed_streams[i]];
|
src = c->stream->feed->streams[c->stream->feed_streams[i]];
|
||||||
|
|
||||||
*(c->fmt_ctx.streams[i]) = *src;
|
*st = *src;
|
||||||
c->fmt_ctx.streams[i]->priv_data = 0;
|
st->priv_data = 0;
|
||||||
c->fmt_ctx.streams[i]->codec->frame_number = 0; /* XXX: should be done in
|
st->codec->frame_number = 0; /* XXX: should be done in
|
||||||
AVStream, not in codec */
|
AVStream, not in codec */
|
||||||
}
|
}
|
||||||
/* set output format parameters */
|
/* set output format parameters */
|
||||||
@@ -2941,9 +2942,11 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
|
|||||||
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) ||
|
if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) ||
|
||||||
!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams))))
|
!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams))))
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
|
#endif
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avs) ||
|
if (avc->nb_streams >= INT_MAX/sizeof(*avs) ||
|
||||||
!(avs = av_malloc(avc->nb_streams * sizeof(*avs))))
|
!(avs = av_malloc(avc->nb_streams * sizeof(*avs))))
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
@@ -2956,8 +2959,10 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
|
|||||||
av_sdp_create(&avc, 1, *pbuffer, 2048);
|
av_sdp_create(&avc, 1, *pbuffer, 2048);
|
||||||
|
|
||||||
sdp_done:
|
sdp_done:
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
av_free(avc->streams);
|
av_free(avc->streams);
|
||||||
av_dict_free(&avc->metadata);
|
#endif
|
||||||
|
av_metadata_free(&avc->metadata);
|
||||||
av_free(avc);
|
av_free(avc);
|
||||||
av_free(avs);
|
av_free(avs);
|
||||||
|
|
||||||
@@ -3385,9 +3390,6 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
if (!st)
|
if (!st)
|
||||||
goto fail;
|
goto fail;
|
||||||
ctx->nb_streams = 1;
|
ctx->nb_streams = 1;
|
||||||
ctx->streams = av_mallocz(sizeof(AVStream *) * ctx->nb_streams);
|
|
||||||
if (!ctx->streams)
|
|
||||||
goto fail;
|
|
||||||
ctx->streams[0] = st;
|
ctx->streams[0] = st;
|
||||||
|
|
||||||
if (!c->stream->feed ||
|
if (!c->stream->feed ||
|
||||||
@@ -3421,7 +3423,7 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0)
|
if (url_open(&h, ctx->filename, AVIO_WRONLY) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
c->rtp_handles[stream_index] = h;
|
c->rtp_handles[stream_index] = h;
|
||||||
max_packet_size = url_get_max_packet_size(h);
|
max_packet_size = url_get_max_packet_size(h);
|
||||||
@@ -3469,7 +3471,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop
|
|||||||
if (!fst)
|
if (!fst)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (copy) {
|
if (copy) {
|
||||||
fst->codec= avcodec_alloc_context();
|
fst->codec = avcodec_alloc_context3(NULL);
|
||||||
memcpy(fst->codec, codec, sizeof(AVCodecContext));
|
memcpy(fst->codec, codec, sizeof(AVCodecContext));
|
||||||
if (codec->extradata_size) {
|
if (codec->extradata_size) {
|
||||||
fst->codec->extradata = av_malloc(codec->extradata_size);
|
fst->codec->extradata = av_malloc(codec->extradata_size);
|
||||||
@@ -3509,7 +3511,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
if (av1->channels == av->channels &&
|
if (av1->channels == av->channels &&
|
||||||
av1->sample_rate == av->sample_rate)
|
av1->sample_rate == av->sample_rate)
|
||||||
goto found;
|
return i;
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
if (av1->width == av->width &&
|
if (av1->width == av->width &&
|
||||||
@@ -3517,7 +3519,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
av1->time_base.den == av->time_base.den &&
|
av1->time_base.den == av->time_base.den &&
|
||||||
av1->time_base.num == av->time_base.num &&
|
av1->time_base.num == av->time_base.num &&
|
||||||
av1->gop_size == av->gop_size)
|
av1->gop_size == av->gop_size)
|
||||||
goto found;
|
return i;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
@@ -3529,8 +3531,6 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
if (!fst)
|
if (!fst)
|
||||||
return -1;
|
return -1;
|
||||||
return feed->nb_streams - 1;
|
return feed->nb_streams - 1;
|
||||||
found:
|
|
||||||
return i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void remove_stream(FFStream *stream)
|
static void remove_stream(FFStream *stream)
|
||||||
@@ -3647,18 +3647,6 @@ static void build_feed_streams(void)
|
|||||||
FFStream *stream, *feed;
|
FFStream *stream, *feed;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* gather all streams */
|
|
||||||
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
|
||||||
feed = stream->feed;
|
|
||||||
if (feed) {
|
|
||||||
if (!stream->is_feed) {
|
|
||||||
/* we handle a stream coming from a feed */
|
|
||||||
for(i=0;i<stream->nb_streams;i++)
|
|
||||||
stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* gather all streams */
|
/* gather all streams */
|
||||||
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
||||||
feed = stream->feed;
|
feed = stream->feed;
|
||||||
@@ -3666,6 +3654,10 @@ static void build_feed_streams(void)
|
|||||||
if (stream->is_feed) {
|
if (stream->is_feed) {
|
||||||
for(i=0;i<stream->nb_streams;i++)
|
for(i=0;i<stream->nb_streams;i++)
|
||||||
stream->feed_streams[i] = i;
|
stream->feed_streams[i] = i;
|
||||||
|
} else {
|
||||||
|
/* we handle a stream coming from a feed */
|
||||||
|
for(i=0;i<stream->nb_streams;i++)
|
||||||
|
stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3674,7 +3666,7 @@ static void build_feed_streams(void)
|
|||||||
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (avio_check(feed->feed_filename, AVIO_FLAG_READ) > 0) {
|
if (url_exist(feed->feed_filename)) {
|
||||||
/* See if it matches */
|
/* See if it matches */
|
||||||
AVFormatContext *s = NULL;
|
AVFormatContext *s = NULL;
|
||||||
int matches = 0;
|
int matches = 0;
|
||||||
@@ -3747,7 +3739,7 @@ static void build_feed_streams(void)
|
|||||||
unlink(feed->feed_filename);
|
unlink(feed->feed_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (avio_check(feed->feed_filename, AVIO_FLAG_WRITE) <= 0) {
|
if (!url_exist(feed->feed_filename)) {
|
||||||
AVFormatContext s1 = {0}, *s = &s1;
|
AVFormatContext s1 = {0}, *s = &s1;
|
||||||
|
|
||||||
if (feed->readonly) {
|
if (feed->readonly) {
|
||||||
@@ -3757,15 +3749,20 @@ static void build_feed_streams(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* only write the header of the ffm file */
|
/* only write the header of the ffm file */
|
||||||
if (avio_open(&s->pb, feed->feed_filename, AVIO_FLAG_WRITE) < 0) {
|
if (avio_open(&s->pb, feed->feed_filename, AVIO_WRONLY) < 0) {
|
||||||
http_log("Could not open output feed file '%s'\n",
|
http_log("Could not open output feed file '%s'\n",
|
||||||
feed->feed_filename);
|
feed->feed_filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
s->oformat = feed->fmt;
|
s->oformat = feed->fmt;
|
||||||
s->nb_streams = feed->nb_streams;
|
s->nb_streams = feed->nb_streams;
|
||||||
s->streams = feed->streams;
|
for(i=0;i<s->nb_streams;i++) {
|
||||||
if (avformat_write_header(s, NULL) < 0) {
|
AVStream *st;
|
||||||
|
st = feed->streams[i];
|
||||||
|
s->streams[i] = st;
|
||||||
|
}
|
||||||
|
av_set_parameters(s, NULL);
|
||||||
|
if (av_write_header(s) < 0) {
|
||||||
http_log("Container doesn't supports the required parameters\n");
|
http_log("Container doesn't supports the required parameters\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -3886,7 +3883,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
|
|||||||
st = av_mallocz(sizeof(AVStream));
|
st = av_mallocz(sizeof(AVStream));
|
||||||
if (!st)
|
if (!st)
|
||||||
return;
|
return;
|
||||||
st->codec = avcodec_alloc_context();
|
st->codec = avcodec_alloc_context3(NULL);
|
||||||
stream->streams[stream->nb_streams++] = st;
|
stream->streams[stream->nb_streams++] = st;
|
||||||
memcpy(st->codec, av, sizeof(AVCodecContext));
|
memcpy(st->codec, av, sizeof(AVCodecContext));
|
||||||
}
|
}
|
||||||
|
28
ffserver.h
28
ffserver.h
@@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* Multiple format streaming server
|
|
||||||
* copyright (c) 2002 Fabrice Bellard
|
|
||||||
*
|
|
||||||
* This file is part of FFmpeg.
|
|
||||||
*
|
|
||||||
* FFmpeg is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* FFmpeg is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with FFmpeg; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
#ifndef FFMPEG_FFSERVER_H
|
|
||||||
#define FFMPEG_FFSERVER_H
|
|
||||||
|
|
||||||
/* interface between ffserver and modules */
|
|
||||||
|
|
||||||
void ffserver_module_init(void);
|
|
||||||
|
|
||||||
#endif /* FFMPEG_FFSERVER_H */
|
|
@@ -279,7 +279,7 @@ static void init_mv(FourXContext *f){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, int dc){
|
static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, unsigned dc){
|
||||||
int i;
|
int i;
|
||||||
dc*= 0x10001;
|
dc*= 0x10001;
|
||||||
|
|
||||||
@@ -923,15 +923,14 @@ static av_cold int decode_end(AVCodecContext *avctx){
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_fourxm_decoder = {
|
AVCodec ff_fourxm_decoder = {
|
||||||
"4xm",
|
.name = "4xm",
|
||||||
AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
CODEC_ID_4XM,
|
.id = CODEC_ID_4XM,
|
||||||
sizeof(FourXContext),
|
.priv_data_size = sizeof(FourXContext),
|
||||||
decode_init,
|
.init = decode_init,
|
||||||
NULL,
|
.close = decode_end,
|
||||||
decode_end,
|
.decode = decode_frame,
|
||||||
decode_frame,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
CODEC_CAP_DR1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -50,8 +50,6 @@ typedef struct EightBpsContext {
|
|||||||
|
|
||||||
unsigned char planes;
|
unsigned char planes;
|
||||||
unsigned char planemap[4];
|
unsigned char planemap[4];
|
||||||
|
|
||||||
uint32_t pal[256];
|
|
||||||
} EightBpsContext;
|
} EightBpsContext;
|
||||||
|
|
||||||
|
|
||||||
@@ -131,16 +129,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->bits_per_coded_sample <= 8) {
|
if (avctx->palctrl) {
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
memcpy (c->pic.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||||
AV_PKT_DATA_PALETTE,
|
if (avctx->palctrl->palette_changed) {
|
||||||
NULL);
|
|
||||||
if (pal) {
|
|
||||||
c->pic.palette_has_changed = 1;
|
c->pic.palette_has_changed = 1;
|
||||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
avctx->palctrl->palette_changed = 0;
|
||||||
}
|
} else
|
||||||
|
c->pic.palette_has_changed = 0;
|
||||||
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
*data_size = sizeof(AVFrame);
|
||||||
@@ -170,6 +165,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||||
c->planes = 1;
|
c->planes = 1;
|
||||||
c->planemap[0] = 0; // 1st plane is palette indexes
|
c->planemap[0] = 0; // 1st plane is palette indexes
|
||||||
|
if (avctx->palctrl == NULL) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Error: PAL8 format but no palette from demuxer.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
||||||
@@ -222,14 +221,13 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
|
|
||||||
AVCodec ff_eightbps_decoder = {
|
AVCodec ff_eightbps_decoder = {
|
||||||
"8bps",
|
.name = "8bps",
|
||||||
AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
CODEC_ID_8BPS,
|
.id = CODEC_ID_8BPS,
|
||||||
sizeof(EightBpsContext),
|
.priv_data_size = sizeof(EightBpsContext),
|
||||||
decode_init,
|
.init = decode_init,
|
||||||
NULL,
|
.close = decode_end,
|
||||||
decode_end,
|
.decode = decode_frame,
|
||||||
decode_frame,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
CODEC_CAP_DR1,
|
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
|
||||||
};
|
};
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* 8svx audio decoder
|
* 8svx audio decoder
|
||||||
|
* @author Jaikrishnan Menon
|
||||||
|
*
|
||||||
* supports: fibonacci delta encoding
|
* supports: fibonacci delta encoding
|
||||||
* : exponential encoding
|
* : exponential encoding
|
||||||
*
|
*
|
||||||
|
@@ -15,6 +15,7 @@ OBJS = allcodecs.o \
|
|||||||
fmtconvert.o \
|
fmtconvert.o \
|
||||||
imgconvert.o \
|
imgconvert.o \
|
||||||
jrevdct.o \
|
jrevdct.o \
|
||||||
|
opt.o \
|
||||||
options.o \
|
options.o \
|
||||||
parser.o \
|
parser.o \
|
||||||
raw.o \
|
raw.o \
|
||||||
@@ -93,7 +94,7 @@ OBJS-$(CONFIG_AURA2_DECODER) += aura.o
|
|||||||
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
||||||
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
||||||
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
||||||
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkidct.o
|
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkdsp.o
|
||||||
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o
|
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o
|
||||||
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o
|
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o
|
||||||
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
||||||
@@ -127,9 +128,9 @@ OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o
|
|||||||
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o
|
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o
|
||||||
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o
|
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o
|
||||||
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
||||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3dec_data.o
|
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3_data.o
|
||||||
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
||||||
ac3tab.o ac3.o kbdwin.o
|
ac3tab.o ac3.o kbdwin.o eac3_data.o
|
||||||
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
||||||
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
||||||
mpeg12data.o mpegvideo.o \
|
mpeg12data.o mpegvideo.o \
|
||||||
@@ -153,6 +154,7 @@ OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_dat
|
|||||||
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
||||||
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
||||||
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
||||||
|
OBJS-$(CONFIG_FLASHSV2_DECODER) += flashsv.o
|
||||||
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
||||||
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
||||||
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
||||||
@@ -550,6 +552,7 @@ OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
|||||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
||||||
flacdec.o flacdata.o flac.o \
|
flacdec.o flacdata.o flac.o \
|
||||||
mpegaudiodata.o vorbis_data.o
|
mpegaudiodata.o vorbis_data.o
|
||||||
|
OBJS-$(CONFIG_MP3_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
||||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
||||||
@@ -668,7 +671,7 @@ OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
|
|||||||
# well.
|
# well.
|
||||||
OBJS-$(!CONFIG_SMALL) += inverse.o
|
OBJS-$(!CONFIG_SMALL) += inverse.o
|
||||||
|
|
||||||
-include $(SUBDIR)$(ARCH)/Makefile
|
-include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile
|
||||||
|
|
||||||
SKIPHEADERS += %_tablegen.h \
|
SKIPHEADERS += %_tablegen.h \
|
||||||
%_tables.h \
|
%_tables.h \
|
||||||
@@ -695,7 +698,7 @@ DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
|
|||||||
|
|
||||||
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
||||||
|
|
||||||
include $(SUBDIR)../subdir.mak
|
include $(SRC_PATH)/subdir.mak
|
||||||
|
|
||||||
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
||||||
|
|
||||||
|
@@ -346,7 +346,7 @@ static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce
|
|||||||
float cost_stay_here, cost_get_here;
|
float cost_stay_here, cost_get_here;
|
||||||
float rd = 0.0f;
|
float rd = 0.0f;
|
||||||
for (w = 0; w < group_len; w++) {
|
for (w = 0; w < group_len; w++) {
|
||||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(win+w)*16+swb];
|
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(win+w)*16+swb];
|
||||||
rd += quantize_band_cost(s, sce->coeffs + start + w*128,
|
rd += quantize_band_cost(s, sce->coeffs + start + w*128,
|
||||||
s->scoefs + start + w*128, size,
|
s->scoefs + start + w*128, size,
|
||||||
sce->sf_idx[(win+w)*16+swb], cb,
|
sce->sf_idx[(win+w)*16+swb], cb,
|
||||||
@@ -433,10 +433,26 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
|
|||||||
for (swb = 0; swb < max_sfb; swb++) {
|
for (swb = 0; swb < max_sfb; swb++) {
|
||||||
size = sce->ics.swb_sizes[swb];
|
size = sce->ics.swb_sizes[swb];
|
||||||
if (sce->zeroes[win*16 + swb]) {
|
if (sce->zeroes[win*16 + swb]) {
|
||||||
for (cb = 0; cb < 12; cb++) {
|
float cost_stay_here = path[swb][0].cost;
|
||||||
path[swb+1][cb].prev_idx = cb;
|
float cost_get_here = next_minrd + run_bits + 4;
|
||||||
path[swb+1][cb].cost = path[swb][cb].cost;
|
if ( run_value_bits[sce->ics.num_windows == 8][path[swb][0].run]
|
||||||
path[swb+1][cb].run = path[swb][cb].run + 1;
|
!= run_value_bits[sce->ics.num_windows == 8][path[swb][0].run+1])
|
||||||
|
cost_stay_here += run_bits;
|
||||||
|
if (cost_get_here < cost_stay_here) {
|
||||||
|
path[swb+1][0].prev_idx = next_mincb;
|
||||||
|
path[swb+1][0].cost = cost_get_here;
|
||||||
|
path[swb+1][0].run = 1;
|
||||||
|
} else {
|
||||||
|
path[swb+1][0].prev_idx = 0;
|
||||||
|
path[swb+1][0].cost = cost_stay_here;
|
||||||
|
path[swb+1][0].run = path[swb][0].run + 1;
|
||||||
|
}
|
||||||
|
next_minrd = path[swb+1][0].cost;
|
||||||
|
next_mincb = 0;
|
||||||
|
for (cb = 1; cb < 12; cb++) {
|
||||||
|
path[swb+1][cb].cost = 61450;
|
||||||
|
path[swb+1][cb].prev_idx = -1;
|
||||||
|
path[swb+1][cb].run = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
float minrd = next_minrd;
|
float minrd = next_minrd;
|
||||||
@@ -610,7 +626,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
|
|||||||
qmin = INT_MAX;
|
qmin = INT_MAX;
|
||||||
qmax = 0.0f;
|
qmax = 0.0f;
|
||||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||||
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
||||||
sce->zeroes[(w+w2)*16+g] = 1;
|
sce->zeroes[(w+w2)*16+g] = 1;
|
||||||
continue;
|
continue;
|
||||||
@@ -639,7 +655,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
|
|||||||
float dist = 0;
|
float dist = 0;
|
||||||
int cb = find_min_book(maxval, sce->sf_idx[w*16+g]);
|
int cb = find_min_book(maxval, sce->sf_idx[w*16+g]);
|
||||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||||
dist += quantize_band_cost(s, coefs + w2*128, s->scoefs + start + w2*128, sce->ics.swb_sizes[g],
|
dist += quantize_band_cost(s, coefs + w2*128, s->scoefs + start + w2*128, sce->ics.swb_sizes[g],
|
||||||
q + q0, cb, lambda / band->threshold, INFINITY, NULL);
|
q + q0, cb, lambda / band->threshold, INFINITY, NULL);
|
||||||
}
|
}
|
||||||
@@ -712,7 +728,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
|
|||||||
int nz = 0;
|
int nz = 0;
|
||||||
float uplim = 0.0f;
|
float uplim = 0.0f;
|
||||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||||
uplim += band->threshold;
|
uplim += band->threshold;
|
||||||
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
||||||
sce->zeroes[(w+w2)*16+g] = 1;
|
sce->zeroes[(w+w2)*16+g] = 1;
|
||||||
@@ -1012,7 +1028,7 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
|
|||||||
for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
|
for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
|
||||||
for (g = 0; g < sce->ics.num_swb; g++) {
|
for (g = 0; g < sce->ics.num_swb; g++) {
|
||||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||||
if (band->energy <= band->threshold) {
|
if (band->energy <= band->threshold) {
|
||||||
sce->sf_idx[(w+w2)*16+g] = 218;
|
sce->sf_idx[(w+w2)*16+g] = 218;
|
||||||
sce->zeroes[(w+w2)*16+g] = 1;
|
sce->zeroes[(w+w2)*16+g] = 1;
|
||||||
@@ -1050,8 +1066,8 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
|
|||||||
if (!cpe->ch[0].zeroes[w*16+g] && !cpe->ch[1].zeroes[w*16+g]) {
|
if (!cpe->ch[0].zeroes[w*16+g] && !cpe->ch[1].zeroes[w*16+g]) {
|
||||||
float dist1 = 0.0f, dist2 = 0.0f;
|
float dist1 = 0.0f, dist2 = 0.0f;
|
||||||
for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) {
|
for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) {
|
||||||
FFPsyBand *band0 = &s->psy.psy_bands[(s->cur_channel+0)*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band0 = &s->psy.ch[s->cur_channel+0].psy_bands[(w+w2)*16+g];
|
||||||
FFPsyBand *band1 = &s->psy.psy_bands[(s->cur_channel+1)*PSY_MAX_BANDS+(w+w2)*16+g];
|
FFPsyBand *band1 = &s->psy.ch[s->cur_channel+1].psy_bands[(w+w2)*16+g];
|
||||||
float minthr = FFMIN(band0->threshold, band1->threshold);
|
float minthr = FFMIN(band0->threshold, band1->threshold);
|
||||||
float maxthr = FFMAX(band0->threshold, band1->threshold);
|
float maxthr = FFMAX(band0->threshold, band1->threshold);
|
||||||
for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
|
for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
|
||||||
|
@@ -532,6 +532,22 @@ static void reset_all_predictors(PredictorState *ps)
|
|||||||
reset_predict_state(&ps[i]);
|
reset_predict_state(&ps[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int sample_rate_idx (int rate)
|
||||||
|
{
|
||||||
|
if (92017 <= rate) return 0;
|
||||||
|
else if (75132 <= rate) return 1;
|
||||||
|
else if (55426 <= rate) return 2;
|
||||||
|
else if (46009 <= rate) return 3;
|
||||||
|
else if (37566 <= rate) return 4;
|
||||||
|
else if (27713 <= rate) return 5;
|
||||||
|
else if (23004 <= rate) return 6;
|
||||||
|
else if (18783 <= rate) return 7;
|
||||||
|
else if (13856 <= rate) return 8;
|
||||||
|
else if (11502 <= rate) return 9;
|
||||||
|
else if (9391 <= rate) return 10;
|
||||||
|
else return 11;
|
||||||
|
}
|
||||||
|
|
||||||
static void reset_predictor_group(PredictorState *ps, int group_num)
|
static void reset_predictor_group(PredictorState *ps, int group_num)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -558,6 +574,26 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
|||||||
avctx->extradata,
|
avctx->extradata,
|
||||||
avctx->extradata_size) < 0)
|
avctx->extradata_size) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
} else {
|
||||||
|
int sr, i;
|
||||||
|
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID];
|
||||||
|
|
||||||
|
sr = sample_rate_idx(avctx->sample_rate);
|
||||||
|
ac->m4ac.sampling_index = sr;
|
||||||
|
ac->m4ac.channels = avctx->channels;
|
||||||
|
|
||||||
|
for (i = 0; i < FF_ARRAY_ELEMS(ff_mpeg4audio_channels); i++)
|
||||||
|
if (ff_mpeg4audio_channels[i] == avctx->channels)
|
||||||
|
break;
|
||||||
|
if (i == FF_ARRAY_ELEMS(ff_mpeg4audio_channels)) {
|
||||||
|
i = 0;
|
||||||
|
}
|
||||||
|
ac->m4ac.chan_config = i;
|
||||||
|
|
||||||
|
if (ac->m4ac.chan_config) {
|
||||||
|
set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config);
|
||||||
|
output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) {
|
if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) {
|
||||||
@@ -1090,7 +1126,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024],
|
|||||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||||
cb_idx = cb_vector_idx[code];
|
cb_idx = cb_vector_idx[code];
|
||||||
nnz = cb_idx >> 8 & 15;
|
nnz = cb_idx >> 8 & 15;
|
||||||
bits = SHOW_UBITS(re, gb, nnz) << (32-nnz);
|
bits = nnz ? GET_CACHE(re, gb) : 0;
|
||||||
LAST_SKIP_BITS(re, gb, nnz);
|
LAST_SKIP_BITS(re, gb, nnz);
|
||||||
cf = VMUL4S(cf, vq, cb_idx, bits, sf + idx);
|
cf = VMUL4S(cf, vq, cb_idx, bits, sf + idx);
|
||||||
} while (len -= 4);
|
} while (len -= 4);
|
||||||
@@ -1130,7 +1166,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024],
|
|||||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||||
cb_idx = cb_vector_idx[code];
|
cb_idx = cb_vector_idx[code];
|
||||||
nnz = cb_idx >> 8 & 15;
|
nnz = cb_idx >> 8 & 15;
|
||||||
sign = SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12);
|
sign = nnz ? SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12) : 0;
|
||||||
LAST_SKIP_BITS(re, gb, nnz);
|
LAST_SKIP_BITS(re, gb, nnz);
|
||||||
cf = VMUL2S(cf, vq, cb_idx, sign, sf + idx);
|
cf = VMUL2S(cf, vq, cb_idx, sign, sf + idx);
|
||||||
} while (len -= 2);
|
} while (len -= 2);
|
||||||
@@ -2047,6 +2083,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
|||||||
if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config, OC_TRIAL_FRAME))
|
if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config, OC_TRIAL_FRAME))
|
||||||
return -7;
|
return -7;
|
||||||
} else if (ac->output_configured != OC_LOCKED) {
|
} else if (ac->output_configured != OC_LOCKED) {
|
||||||
|
ac->m4ac.chan_config = 0;
|
||||||
ac->output_configured = OC_NONE;
|
ac->output_configured = OC_NONE;
|
||||||
}
|
}
|
||||||
if (ac->output_configured != OC_LOCKED) {
|
if (ac->output_configured != OC_LOCKED) {
|
||||||
@@ -2505,18 +2542,18 @@ av_cold static int latm_decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
|
|
||||||
AVCodec ff_aac_decoder = {
|
AVCodec ff_aac_decoder = {
|
||||||
"aac",
|
.name = "aac",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_AAC,
|
.id = CODEC_ID_AAC,
|
||||||
sizeof(AACContext),
|
.priv_data_size = sizeof(AACContext),
|
||||||
aac_decode_init,
|
.init = aac_decode_init,
|
||||||
NULL,
|
.close = aac_decode_close,
|
||||||
aac_decode_close,
|
.decode = aac_decode_frame,
|
||||||
aac_decode_frame,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
|
.capabilities = CODEC_CAP_CHANNEL_CONF,
|
||||||
.channel_layouts = aac_channel_layout,
|
.channel_layouts = aac_channel_layout,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2537,5 +2574,6 @@ AVCodec ff_aac_latm_decoder = {
|
|||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
|
.capabilities = CODEC_CAP_CHANNEL_CONF,
|
||||||
.channel_layouts = aac_channel_layout,
|
.channel_layouts = aac_channel_layout,
|
||||||
};
|
};
|
||||||
|
@@ -208,8 +208,9 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
|||||||
ff_init_ff_sine_windows(10);
|
ff_init_ff_sine_windows(10);
|
||||||
ff_init_ff_sine_windows(7);
|
ff_init_ff_sine_windows(7);
|
||||||
|
|
||||||
|
s->chan_map = aac_chan_configs[avctx->channels-1];
|
||||||
s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
|
s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
|
||||||
s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);
|
s->cpe = av_mallocz(sizeof(ChannelElement) * s->chan_map[0]);
|
||||||
avctx->extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
|
avctx->extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
avctx->extradata_size = 5;
|
avctx->extradata_size = 5;
|
||||||
put_audio_specific_config(avctx);
|
put_audio_specific_config(avctx);
|
||||||
@@ -218,7 +219,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
|||||||
sizes[1] = swb_size_128[i];
|
sizes[1] = swb_size_128[i];
|
||||||
lengths[0] = ff_aac_num_swb_1024[i];
|
lengths[0] = ff_aac_num_swb_1024[i];
|
||||||
lengths[1] = ff_aac_num_swb_128[i];
|
lengths[1] = ff_aac_num_swb_128[i];
|
||||||
ff_psy_init(&s->psy, avctx, 2, sizes, lengths);
|
ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], &s->chan_map[1]);
|
||||||
s->psypp = ff_psy_preprocess_init(avctx);
|
s->psypp = ff_psy_preprocess_init(avctx);
|
||||||
s->coder = &ff_aac_coders[2];
|
s->coder = &ff_aac_coders[2];
|
||||||
|
|
||||||
@@ -372,7 +373,7 @@ static void adjust_frame_information(AACEncContext *apc, ChannelElement *cpe, in
|
|||||||
if (msc == 0 || ics0->max_sfb == 0)
|
if (msc == 0 || ics0->max_sfb == 0)
|
||||||
cpe->ms_mode = 0;
|
cpe->ms_mode = 0;
|
||||||
else
|
else
|
||||||
cpe->ms_mode = msc < ics0->max_sfb ? 1 : 2;
|
cpe->ms_mode = msc < ics0->max_sfb * ics0->num_windows ? 1 : 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +501,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
|||||||
int16_t *samples = s->samples, *samples2, *la;
|
int16_t *samples = s->samples, *samples2, *la;
|
||||||
ChannelElement *cpe;
|
ChannelElement *cpe;
|
||||||
int i, ch, w, g, chans, tag, start_ch;
|
int i, ch, w, g, chans, tag, start_ch;
|
||||||
const uint8_t *chan_map = aac_chan_configs[avctx->channels-1];
|
|
||||||
int chan_el_counter[4];
|
int chan_el_counter[4];
|
||||||
FFPsyWindowInfo windows[AAC_MAX_CHANNELS];
|
FFPsyWindowInfo windows[AAC_MAX_CHANNELS];
|
||||||
|
|
||||||
@@ -521,8 +521,8 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
|||||||
} else {
|
} else {
|
||||||
start_ch = 0;
|
start_ch = 0;
|
||||||
samples2 = s->samples + 1024 * avctx->channels;
|
samples2 = s->samples + 1024 * avctx->channels;
|
||||||
for (i = 0; i < chan_map[0]; i++) {
|
for (i = 0; i < s->chan_map[0]; i++) {
|
||||||
tag = chan_map[i+1];
|
tag = s->chan_map[i+1];
|
||||||
chans = tag == TYPE_CPE ? 2 : 1;
|
chans = tag == TYPE_CPE ? 2 : 1;
|
||||||
ff_psy_preprocess(s->psypp,
|
ff_psy_preprocess(s->psypp,
|
||||||
(uint16_t*)data + channel_maps[avctx->channels-1][start_ch],
|
(uint16_t*)data + channel_maps[avctx->channels-1][start_ch],
|
||||||
@@ -538,9 +538,9 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_ch = 0;
|
start_ch = 0;
|
||||||
for (i = 0; i < chan_map[0]; i++) {
|
for (i = 0; i < s->chan_map[0]; i++) {
|
||||||
FFPsyWindowInfo* wi = windows + start_ch;
|
FFPsyWindowInfo* wi = windows + start_ch;
|
||||||
tag = chan_map[i+1];
|
tag = s->chan_map[i+1];
|
||||||
chans = tag == TYPE_CPE ? 2 : 1;
|
chans = tag == TYPE_CPE ? 2 : 1;
|
||||||
cpe = &s->cpe[i];
|
cpe = &s->cpe[i];
|
||||||
for (ch = 0; ch < chans; ch++) {
|
for (ch = 0; ch < chans; ch++) {
|
||||||
@@ -580,16 +580,19 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
|||||||
put_bitstream_info(avctx, s, LIBAVCODEC_IDENT);
|
put_bitstream_info(avctx, s, LIBAVCODEC_IDENT);
|
||||||
start_ch = 0;
|
start_ch = 0;
|
||||||
memset(chan_el_counter, 0, sizeof(chan_el_counter));
|
memset(chan_el_counter, 0, sizeof(chan_el_counter));
|
||||||
for (i = 0; i < chan_map[0]; i++) {
|
for (i = 0; i < s->chan_map[0]; i++) {
|
||||||
FFPsyWindowInfo* wi = windows + start_ch;
|
FFPsyWindowInfo* wi = windows + start_ch;
|
||||||
tag = chan_map[i+1];
|
const float *coeffs[2];
|
||||||
|
tag = s->chan_map[i+1];
|
||||||
chans = tag == TYPE_CPE ? 2 : 1;
|
chans = tag == TYPE_CPE ? 2 : 1;
|
||||||
cpe = &s->cpe[i];
|
cpe = &s->cpe[i];
|
||||||
put_bits(&s->pb, 3, tag);
|
put_bits(&s->pb, 3, tag);
|
||||||
put_bits(&s->pb, 4, chan_el_counter[tag]++);
|
put_bits(&s->pb, 4, chan_el_counter[tag]++);
|
||||||
|
for (ch = 0; ch < chans; ch++)
|
||||||
|
coeffs[ch] = cpe->ch[ch].coeffs;
|
||||||
|
s->psy.model->analyze(&s->psy, start_ch, coeffs, wi);
|
||||||
for (ch = 0; ch < chans; ch++) {
|
for (ch = 0; ch < chans; ch++) {
|
||||||
s->cur_channel = start_ch + ch;
|
s->cur_channel = start_ch * 2 + ch;
|
||||||
s->psy.model->analyze(&s->psy, s->cur_channel, cpe->ch[ch].coeffs, &wi[ch]);
|
|
||||||
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
|
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
|
||||||
}
|
}
|
||||||
cpe->common_window = 0;
|
cpe->common_window = 0;
|
||||||
@@ -605,7 +608,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s->cur_channel = start_ch;
|
s->cur_channel = start_ch * 2;
|
||||||
if (s->options.stereo_mode && cpe->common_window) {
|
if (s->options.stereo_mode && cpe->common_window) {
|
||||||
if (s->options.stereo_mode > 0) {
|
if (s->options.stereo_mode > 0) {
|
||||||
IndividualChannelStream *ics = &cpe->ch[0].ics;
|
IndividualChannelStream *ics = &cpe->ch[0].ics;
|
||||||
@@ -689,13 +692,13 @@ static const AVClass aacenc_class = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AVCodec ff_aac_encoder = {
|
AVCodec ff_aac_encoder = {
|
||||||
"aac",
|
.name = "aac",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_AAC,
|
.id = CODEC_ID_AAC,
|
||||||
sizeof(AACEncContext),
|
.priv_data_size = sizeof(AACEncContext),
|
||||||
aac_encode_init,
|
.init = aac_encode_init,
|
||||||
aac_encode_frame,
|
.encode = aac_encode_frame,
|
||||||
aac_encode_end,
|
.close = aac_encode_end,
|
||||||
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
|
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
||||||
|
@@ -61,6 +61,7 @@ typedef struct AACEncContext {
|
|||||||
int16_t *samples; ///< saved preprocessed input
|
int16_t *samples; ///< saved preprocessed input
|
||||||
|
|
||||||
int samplerate_index; ///< MPEG-4 samplerate index
|
int samplerate_index; ///< MPEG-4 samplerate index
|
||||||
|
const uint8_t *chan_map; ///< channel configuration map
|
||||||
|
|
||||||
ChannelElement *cpe; ///< channel elements
|
ChannelElement *cpe; ///< channel elements
|
||||||
FFPsyContext psy;
|
FFPsyContext psy;
|
||||||
|
@@ -69,19 +69,19 @@ static const int huff_iid[] = {
|
|||||||
|
|
||||||
static VLC vlc_ps[10];
|
static VLC vlc_ps[10];
|
||||||
|
|
||||||
/**
|
|
||||||
* Read Inter-channel Intensity Difference/Inter-Channel Coherence/
|
|
||||||
* Inter-channel Phase Difference/Overall Phase Difference parameters from the
|
|
||||||
* bitstream.
|
|
||||||
*
|
|
||||||
* @param avctx contains the current codec context
|
|
||||||
* @param gb pointer to the input bitstream
|
|
||||||
* @param ps pointer to the Parametric Stereo context
|
|
||||||
* @param par pointer to the parameter to be read
|
|
||||||
* @param e envelope to decode
|
|
||||||
* @param dt 1: time delta-coded, 0: frequency delta-coded
|
|
||||||
*/
|
|
||||||
#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION) \
|
#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION) \
|
||||||
|
/** \
|
||||||
|
* Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \
|
||||||
|
* Inter-channel Phase Difference/Overall Phase Difference parameters from the \
|
||||||
|
* bitstream. \
|
||||||
|
* \
|
||||||
|
* @param avctx contains the current codec context \
|
||||||
|
* @param gb pointer to the input bitstream \
|
||||||
|
* @param ps pointer to the Parametric Stereo context \
|
||||||
|
* @param PAR pointer to the parameter to be read \
|
||||||
|
* @param e envelope to decode \
|
||||||
|
* @param dt 1: time delta-coded, 0: frequency delta-coded \
|
||||||
|
*/ \
|
||||||
static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, \
|
static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, \
|
||||||
int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
|
int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
|
||||||
{ \
|
{ \
|
||||||
|
@@ -377,9 +377,10 @@ static const uint8_t window_grouping[9] = {
|
|||||||
* Tell encoder which window types to use.
|
* Tell encoder which window types to use.
|
||||||
* @see 3GPP TS26.403 5.4.1 "Blockswitching"
|
* @see 3GPP TS26.403 5.4.1 "Blockswitching"
|
||||||
*/
|
*/
|
||||||
static FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
|
static av_unused FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
|
||||||
const int16_t *audio, const int16_t *la,
|
const int16_t *audio,
|
||||||
int channel, int prev_type)
|
const int16_t *la,
|
||||||
|
int channel, int prev_type)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int br = ctx->avctx->bit_rate / ctx->avctx->channels;
|
int br = ctx->avctx->bit_rate / ctx->avctx->channels;
|
||||||
@@ -556,8 +557,8 @@ static float calc_reduced_thr_3gpp(AacPsyBand *band, float min_snr,
|
|||||||
/**
|
/**
|
||||||
* Calculate band thresholds as suggested in 3GPP TS26.403
|
* Calculate band thresholds as suggested in 3GPP TS26.403
|
||||||
*/
|
*/
|
||||||
static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||||
const float *coefs, const FFPsyWindowInfo *wi)
|
const float *coefs, const FFPsyWindowInfo *wi)
|
||||||
{
|
{
|
||||||
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
|
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
|
||||||
AacPsyChannel *pch = &pctx->ch[channel];
|
AacPsyChannel *pch = &pctx->ch[channel];
|
||||||
@@ -626,7 +627,7 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 5.6.1.3.2 "Calculation of the desired perceptual entropy" */
|
/* 5.6.1.3.2 "Calculation of the desired perceptual entropy" */
|
||||||
ctx->pe[channel] = pe;
|
ctx->ch[channel].entropy = pe;
|
||||||
desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8);
|
desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8);
|
||||||
desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits);
|
desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits);
|
||||||
/* NOTE: PE correction is kept simple. During initial testing it had very
|
/* NOTE: PE correction is kept simple. During initial testing it had very
|
||||||
@@ -730,7 +731,7 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
|||||||
for (w = 0; w < wi->num_windows*16; w += 16) {
|
for (w = 0; w < wi->num_windows*16; w += 16) {
|
||||||
for (g = 0; g < num_bands; g++) {
|
for (g = 0; g < num_bands; g++) {
|
||||||
AacPsyBand *band = &pch->band[w+g];
|
AacPsyBand *band = &pch->band[w+g];
|
||||||
FFPsyBand *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g];
|
FFPsyBand *psy_band = &ctx->ch[channel].psy_bands[w+g];
|
||||||
|
|
||||||
psy_band->threshold = band->thr;
|
psy_band->threshold = band->thr;
|
||||||
psy_band->energy = band->energy;
|
psy_band->energy = band->energy;
|
||||||
@@ -740,6 +741,16 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
|||||||
memcpy(pch->prev_band, pch->band, sizeof(pch->band));
|
memcpy(pch->prev_band, pch->band, sizeof(pch->band));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
||||||
|
const float **coeffs, const FFPsyWindowInfo *wi)
|
||||||
|
{
|
||||||
|
int ch;
|
||||||
|
FFPsyChannelGroup *group = ff_psy_find_group(ctx, channel);
|
||||||
|
|
||||||
|
for (ch = 0; ch < group->num_ch; ch++)
|
||||||
|
psy_3gpp_analyze_channel(ctx, channel + ch, coeffs[ch], &wi[ch]);
|
||||||
|
}
|
||||||
|
|
||||||
static av_cold void psy_3gpp_end(FFPsyContext *apc)
|
static av_cold void psy_3gpp_end(FFPsyContext *apc)
|
||||||
{
|
{
|
||||||
AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data;
|
AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data;
|
||||||
|
@@ -110,14 +110,13 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_aasc_decoder = {
|
AVCodec ff_aasc_decoder = {
|
||||||
"aasc",
|
.name = "aasc",
|
||||||
AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
CODEC_ID_AASC,
|
.id = CODEC_ID_AASC,
|
||||||
sizeof(AascContext),
|
.priv_data_size = sizeof(AascContext),
|
||||||
aasc_decode_init,
|
.init = aasc_decode_init,
|
||||||
NULL,
|
.close = aasc_decode_end,
|
||||||
aasc_decode_end,
|
.decode = aasc_decode_frame,
|
||||||
aasc_decode_frame,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
CODEC_CAP_DR1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
||||||
};
|
};
|
||||||
|
@@ -156,6 +156,8 @@ typedef struct AC3EncOptions {
|
|||||||
int dolby_surround_ex_mode;
|
int dolby_surround_ex_mode;
|
||||||
int dolby_headphone_mode;
|
int dolby_headphone_mode;
|
||||||
int ad_converter_type;
|
int ad_converter_type;
|
||||||
|
int eac3_mixing_metadata;
|
||||||
|
int eac3_info_metadata;
|
||||||
|
|
||||||
/* other encoding options */
|
/* other encoding options */
|
||||||
int allow_per_frame_metadata;
|
int allow_per_frame_metadata;
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "libavutil/crc.h"
|
#include "libavutil/crc.h"
|
||||||
|
#include "libavutil/opt.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "aac_ac3_parser.h"
|
#include "aac_ac3_parser.h"
|
||||||
#include "ac3_parser.h"
|
#include "ac3_parser.h"
|
||||||
@@ -1438,6 +1439,20 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define OFFSET(x) offsetof(AC3DecodeContext, x)
|
||||||
|
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)
|
||||||
|
static const AVOption options[] = {
|
||||||
|
{ "drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), FF_OPT_TYPE_FLOAT, {1.0}, 0.0, 1.0, PAR },
|
||||||
|
{ NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
static const AVClass ac3_decoder_class = {
|
||||||
|
.class_name = "(E-)AC3 decoder",
|
||||||
|
.item_name = av_default_item_name,
|
||||||
|
.option = options,
|
||||||
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
|
};
|
||||||
|
|
||||||
AVCodec ff_ac3_decoder = {
|
AVCodec ff_ac3_decoder = {
|
||||||
.name = "ac3",
|
.name = "ac3",
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
@@ -1450,6 +1465,7 @@ AVCodec ff_ac3_decoder = {
|
|||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
|
.priv_class = &ac3_decoder_class,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_EAC3_DECODER
|
#if CONFIG_EAC3_DECODER
|
||||||
@@ -1465,5 +1481,6 @@ AVCodec ff_eac3_decoder = {
|
|||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
|
.priv_class = &ac3_decoder_class,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@@ -66,6 +66,7 @@
|
|||||||
#define AC3_FRAME_BUFFER_SIZE 32768
|
#define AC3_FRAME_BUFFER_SIZE 32768
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
AVClass *class; ///< class for AVOptions
|
||||||
AVCodecContext *avctx; ///< parent context
|
AVCodecContext *avctx; ///< parent context
|
||||||
GetBitContext gbc; ///< bitstream reader
|
GetBitContext gbc; ///< bitstream reader
|
||||||
|
|
||||||
@@ -143,6 +144,7 @@ typedef struct {
|
|||||||
|
|
||||||
///@name Dynamic range
|
///@name Dynamic range
|
||||||
float dynamic_range[2]; ///< dynamic range
|
float dynamic_range[2]; ///< dynamic range
|
||||||
|
float drc_scale; ///< percentage of dynamic range compression to be applied
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@name Bandwidth
|
///@name Bandwidth
|
||||||
|
@@ -164,21 +164,8 @@ static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < nb_coefs; i++) {
|
for (i = 0; i < nb_coefs; i++) {
|
||||||
int e;
|
|
||||||
int v = abs(coef[i]);
|
int v = abs(coef[i]);
|
||||||
if (v == 0)
|
exp[i] = v ? 23 - av_log2(v) : 24;
|
||||||
e = 24;
|
|
||||||
else {
|
|
||||||
e = 23 - av_log2(v);
|
|
||||||
if (e >= 24) {
|
|
||||||
e = 24;
|
|
||||||
coef[i] = 0;
|
|
||||||
} else if (e < 0) {
|
|
||||||
e = 0;
|
|
||||||
coef[i] = av_clip(coef[i], -16777215, 16777215);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exp[i] = e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -50,22 +50,22 @@
|
|||||||
#if CONFIG_AC3ENC_FLOAT
|
#if CONFIG_AC3ENC_FLOAT
|
||||||
#define AC3_NAME(x) ff_ac3_float_ ## x
|
#define AC3_NAME(x) ff_ac3_float_ ## x
|
||||||
#define MAC_COEF(d,a,b) ((d)+=(a)*(b))
|
#define MAC_COEF(d,a,b) ((d)+=(a)*(b))
|
||||||
|
#define COEF_MIN (-16777215.0/16777216.0)
|
||||||
|
#define COEF_MAX ( 16777215.0/16777216.0)
|
||||||
typedef float SampleType;
|
typedef float SampleType;
|
||||||
typedef float CoefType;
|
typedef float CoefType;
|
||||||
typedef float CoefSumType;
|
typedef float CoefSumType;
|
||||||
#else
|
#else
|
||||||
#define AC3_NAME(x) ff_ac3_fixed_ ## x
|
#define AC3_NAME(x) ff_ac3_fixed_ ## x
|
||||||
#define MAC_COEF(d,a,b) MAC64(d,a,b)
|
#define MAC_COEF(d,a,b) MAC64(d,a,b)
|
||||||
|
#define COEF_MIN -16777215
|
||||||
|
#define COEF_MAX 16777215
|
||||||
typedef int16_t SampleType;
|
typedef int16_t SampleType;
|
||||||
typedef int32_t CoefType;
|
typedef int32_t CoefType;
|
||||||
typedef int64_t CoefSumType;
|
typedef int64_t CoefSumType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct AC3MDCTContext {
|
|
||||||
const SampleType *window; ///< MDCT window function
|
|
||||||
FFTContext fft; ///< FFT context for MDCT calculation
|
|
||||||
} AC3MDCTContext;
|
|
||||||
#if 0
|
#if 0
|
||||||
/**
|
/**
|
||||||
* Encoding Options used by AVOption.
|
* Encoding Options used by AVOption.
|
||||||
@@ -92,6 +92,8 @@ typedef struct AC3EncOptions {
|
|||||||
int dolby_surround_ex_mode;
|
int dolby_surround_ex_mode;
|
||||||
int dolby_headphone_mode;
|
int dolby_headphone_mode;
|
||||||
int ad_converter_type;
|
int ad_converter_type;
|
||||||
|
int eac3_mixing_metadata;
|
||||||
|
int eac3_info_metadata;
|
||||||
|
|
||||||
/* other encoding options */
|
/* other encoding options */
|
||||||
int allow_per_frame_metadata;
|
int allow_per_frame_metadata;
|
||||||
@@ -139,7 +141,8 @@ typedef struct AC3EncodeContext {
|
|||||||
PutBitContext pb; ///< bitstream writer context
|
PutBitContext pb; ///< bitstream writer context
|
||||||
DSPContext dsp;
|
DSPContext dsp;
|
||||||
AC3DSPContext ac3dsp; ///< AC-3 optimized functions
|
AC3DSPContext ac3dsp; ///< AC-3 optimized functions
|
||||||
AC3MDCTContext *mdct; ///< MDCT context
|
FFTContext mdct; ///< FFT context for MDCT calculation
|
||||||
|
const SampleType *mdct_window; ///< MDCT window function array
|
||||||
|
|
||||||
AC3Block blocks[AC3_MAX_BLOCKS]; ///< per-block info
|
AC3Block blocks[AC3_MAX_BLOCKS]; ///< per-block info
|
||||||
|
|
||||||
@@ -151,6 +154,8 @@ typedef struct AC3EncodeContext {
|
|||||||
int bit_rate; ///< target bit rate, in bits-per-second
|
int bit_rate; ///< target bit rate, in bits-per-second
|
||||||
int sample_rate; ///< sampling frequency, in Hz
|
int sample_rate; ///< sampling frequency, in Hz
|
||||||
|
|
||||||
|
int num_blks_code; ///< number of blocks code (numblkscod)
|
||||||
|
int num_blocks; ///< number of blocks per frame
|
||||||
int frame_size_min; ///< minimum frame size in case rounding is necessary
|
int frame_size_min; ///< minimum frame size in case rounding is necessary
|
||||||
int frame_size; ///< current frame size in bytes
|
int frame_size; ///< current frame size in bytes
|
||||||
int frame_size_code; ///< frame size code (frmsizecod)
|
int frame_size_code; ///< frame size code (frmsizecod)
|
||||||
@@ -212,31 +217,23 @@ typedef struct AC3EncodeContext {
|
|||||||
int16_t *psd_buffer;
|
int16_t *psd_buffer;
|
||||||
int16_t *band_psd_buffer;
|
int16_t *band_psd_buffer;
|
||||||
int16_t *mask_buffer;
|
int16_t *mask_buffer;
|
||||||
uint16_t *qmant_buffer;
|
int16_t *qmant_buffer;
|
||||||
uint8_t *cpl_coord_exp_buffer;
|
uint8_t *cpl_coord_exp_buffer;
|
||||||
uint8_t *cpl_coord_mant_buffer;
|
uint8_t *cpl_coord_mant_buffer;
|
||||||
|
|
||||||
uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies
|
uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies
|
||||||
|
uint8_t frame_exp_strategy[AC3_MAX_CHANNELS]; ///< frame exp strategy index
|
||||||
|
int use_frame_exp_strategy; ///< indicates use of frame exp strategy
|
||||||
uint8_t exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< reference blocks for EXP_REUSE
|
uint8_t exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< reference blocks for EXP_REUSE
|
||||||
uint8_t *ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< bit allocation pointers (bap)
|
uint8_t *ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< bit allocation pointers (bap)
|
||||||
int ref_bap_set; ///< indicates if ref_bap pointers have been set
|
int ref_bap_set; ///< indicates if ref_bap pointers have been set
|
||||||
|
|
||||||
/* fixed vs. float function pointers */
|
/* fixed vs. float function pointers */
|
||||||
void (*mdct_end)(AC3MDCTContext *mdct);
|
void (*mdct_end)(struct AC3EncodeContext *s);
|
||||||
int (*mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits);
|
int (*mdct_init)(struct AC3EncodeContext *s);
|
||||||
void (*apply_window)(DSPContext *dsp, SampleType *output,
|
|
||||||
const SampleType *input, const SampleType *window,
|
|
||||||
unsigned int len);
|
|
||||||
int (*normalize_samples)(struct AC3EncodeContext *s);
|
|
||||||
void (*scale_coefficients)(struct AC3EncodeContext *s);
|
|
||||||
|
|
||||||
/* fixed vs. float templated function pointers */
|
/* fixed vs. float templated function pointers */
|
||||||
int (*allocate_sample_buffers)(struct AC3EncodeContext *s);
|
int (*allocate_sample_buffers)(struct AC3EncodeContext *s);
|
||||||
void (*deinterleave_input_samples)(struct AC3EncodeContext *s,
|
|
||||||
const SampleType *samples);
|
|
||||||
void (*apply_mdct)(struct AC3EncodeContext *s);
|
|
||||||
void (*apply_channel_coupling)(struct AC3EncodeContext *s);
|
|
||||||
void (*compute_rematrixing_strategy)(struct AC3EncodeContext *s);
|
|
||||||
|
|
||||||
/* AC-3 vs. E-AC-3 function pointers */
|
/* AC-3 vs. E-AC-3 function pointers */
|
||||||
void (*output_frame_header)(struct AC3EncodeContext *s);
|
void (*output_frame_header)(struct AC3EncodeContext *s);
|
||||||
@@ -245,33 +242,32 @@ typedef struct AC3EncodeContext {
|
|||||||
|
|
||||||
int ff_ac3_encode_init(AVCodecContext *avctx);
|
int ff_ac3_encode_init(AVCodecContext *avctx);
|
||||||
|
|
||||||
int ff_ac3_encode_frame(AVCodecContext *avctx, unsigned char *frame,
|
|
||||||
int buf_size, void *data);
|
|
||||||
|
|
||||||
int ff_ac3_encode_close(AVCodecContext *avctx);
|
int ff_ac3_encode_close(AVCodecContext *avctx);
|
||||||
|
|
||||||
|
int ff_ac3_validate_metadata(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_adjust_frame_size(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_compute_coupling_strategy(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_apply_rematrixing(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_process_exponents(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
int ff_ac3_compute_bit_allocation(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_quantize_mantissas(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame);
|
||||||
|
|
||||||
|
|
||||||
/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */
|
/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */
|
||||||
|
|
||||||
void ff_ac3_fixed_mdct_end(AC3MDCTContext *mdct);
|
void ff_ac3_fixed_mdct_end(AC3EncodeContext *s);
|
||||||
void ff_ac3_float_mdct_end(AC3MDCTContext *mdct);
|
void ff_ac3_float_mdct_end(AC3EncodeContext *s);
|
||||||
|
|
||||||
int ff_ac3_fixed_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct,
|
int ff_ac3_fixed_mdct_init(AC3EncodeContext *s);
|
||||||
int nbits);
|
int ff_ac3_float_mdct_init(AC3EncodeContext *s);
|
||||||
int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct,
|
|
||||||
int nbits);
|
|
||||||
|
|
||||||
void ff_ac3_fixed_apply_window(DSPContext *dsp, SampleType *output,
|
|
||||||
const SampleType *input,
|
|
||||||
const SampleType *window, unsigned int len);
|
|
||||||
void ff_ac3_float_apply_window(DSPContext *dsp, SampleType *output,
|
|
||||||
const SampleType *input,
|
|
||||||
const SampleType *window, unsigned int len);
|
|
||||||
|
|
||||||
int ff_ac3_fixed_normalize_samples(AC3EncodeContext *s);
|
|
||||||
|
|
||||||
void ff_ac3_fixed_scale_coefficients(AC3EncodeContext *s);
|
|
||||||
void ff_ac3_float_scale_coefficients(AC3EncodeContext *s);
|
|
||||||
|
|
||||||
|
|
||||||
/* prototypes for functions in ac3enc_template.c */
|
/* prototypes for functions in ac3enc_template.c */
|
||||||
@@ -279,18 +275,9 @@ void ff_ac3_float_scale_coefficients(AC3EncodeContext *s);
|
|||||||
int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s);
|
int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s);
|
||||||
int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s);
|
int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s);
|
||||||
|
|
||||||
void ff_ac3_fixed_deinterleave_input_samples(AC3EncodeContext *s,
|
int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, unsigned char *frame,
|
||||||
const SampleType *samples);
|
int buf_size, void *data);
|
||||||
void ff_ac3_float_deinterleave_input_samples(AC3EncodeContext *s,
|
int ff_ac3_float_encode_frame(AVCodecContext *avctx, unsigned char *frame,
|
||||||
const SampleType *samples);
|
int buf_size, void *data);
|
||||||
|
|
||||||
void ff_ac3_fixed_apply_mdct(AC3EncodeContext *s);
|
|
||||||
void ff_ac3_float_apply_mdct(AC3EncodeContext *s);
|
|
||||||
|
|
||||||
void ff_ac3_fixed_apply_channel_coupling(AC3EncodeContext *s);
|
|
||||||
void ff_ac3_float_apply_channel_coupling(AC3EncodeContext *s);
|
|
||||||
|
|
||||||
void ff_ac3_fixed_compute_rematrixing_strategy(AC3EncodeContext *s);
|
|
||||||
void ff_ac3_float_compute_rematrixing_strategy(AC3EncodeContext *s);
|
|
||||||
|
|
||||||
#endif /* AVCODEC_AC3ENC_H */
|
#endif /* AVCODEC_AC3ENC_H */
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
#define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
|
#define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
|
||||||
#include "ac3enc_opts_template.c"
|
#include "ac3enc_opts_template.c"
|
||||||
static AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name,
|
static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name,
|
||||||
ac3fixed_options, LIBAVUTIL_VERSION_INT };
|
ac3fixed_options, LIBAVUTIL_VERSION_INT };
|
||||||
|
|
||||||
#include "ac3enc_template.c"
|
#include "ac3enc_template.c"
|
||||||
|
|
||||||
@@ -41,9 +41,9 @@ static AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name
|
|||||||
/**
|
/**
|
||||||
* Finalize MDCT and free allocated memory.
|
* Finalize MDCT and free allocated memory.
|
||||||
*/
|
*/
|
||||||
av_cold void AC3_NAME(mdct_end)(AC3MDCTContext *mdct)
|
av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
ff_mdct_end(&mdct->fft);
|
ff_mdct_end(&s->mdct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -51,11 +51,10 @@ av_cold void AC3_NAME(mdct_end)(AC3MDCTContext *mdct)
|
|||||||
* Initialize MDCT tables.
|
* Initialize MDCT tables.
|
||||||
* @param nbits log2(MDCT size)
|
* @param nbits log2(MDCT size)
|
||||||
*/
|
*/
|
||||||
av_cold int AC3_NAME(mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct,
|
av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s)
|
||||||
int nbits)
|
|
||||||
{
|
{
|
||||||
int ret = ff_mdct_init(&mdct->fft, nbits, 0, -1.0);
|
int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
|
||||||
mdct->window = ff_ac3_window;
|
s->mdct_window = ff_ac3_window;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,36 +62,23 @@ av_cold int AC3_NAME(mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct,
|
|||||||
/**
|
/**
|
||||||
* Apply KBD window to input samples prior to MDCT.
|
* Apply KBD window to input samples prior to MDCT.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(apply_window)(DSPContext *dsp, int16_t *output,
|
static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input,
|
||||||
const int16_t *input, const int16_t *window,
|
const int16_t *window, unsigned int len)
|
||||||
unsigned int len)
|
|
||||||
{
|
{
|
||||||
dsp->apply_window_int16(output, input, window, len);
|
dsp->apply_window_int16(output, input, window, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculate the log2() of the maximum absolute value in an array.
|
|
||||||
* @param tab input array
|
|
||||||
* @param n number of values in the array
|
|
||||||
* @return log2(max(abs(tab[])))
|
|
||||||
*/
|
|
||||||
static int log2_tab(AC3EncodeContext *s, int16_t *src, int len)
|
|
||||||
{
|
|
||||||
int v = s->ac3dsp.ac3_max_msb_abs_int16(src, len);
|
|
||||||
return av_log2(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize the input samples to use the maximum available precision.
|
* Normalize the input samples to use the maximum available precision.
|
||||||
* This assumes signed 16-bit input samples.
|
* This assumes signed 16-bit input samples.
|
||||||
*
|
*
|
||||||
* @return exponent shift
|
* @return exponent shift
|
||||||
*/
|
*/
|
||||||
int AC3_NAME(normalize_samples)(AC3EncodeContext *s)
|
static int normalize_samples(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int v = 14 - log2_tab(s, s->windowed_samples, AC3_WINDOW_SIZE);
|
int v = s->ac3dsp.ac3_max_msb_abs_int16(s->windowed_samples, AC3_WINDOW_SIZE);
|
||||||
|
v = 14 - av_log2(v);
|
||||||
if (v > 0)
|
if (v > 0)
|
||||||
s->ac3dsp.ac3_lshift_int16(s->windowed_samples, AC3_WINDOW_SIZE, v);
|
s->ac3dsp.ac3_lshift_int16(s->windowed_samples, AC3_WINDOW_SIZE, v);
|
||||||
/* +6 to right-shift from 31-bit to 25-bit */
|
/* +6 to right-shift from 31-bit to 25-bit */
|
||||||
@@ -103,11 +89,11 @@ int AC3_NAME(normalize_samples)(AC3EncodeContext *s)
|
|||||||
/**
|
/**
|
||||||
* Scale MDCT coefficients to 25-bit signed fixed-point.
|
* Scale MDCT coefficients to 25-bit signed fixed-point.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(scale_coefficients)(AC3EncodeContext *s)
|
static void scale_coefficients(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int blk, ch;
|
int blk, ch;
|
||||||
|
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
for (ch = 1; ch <= s->channels; ch++) {
|
for (ch = 1; ch <= s->channels; ch++) {
|
||||||
s->ac3dsp.ac3_rshift_int32(block->mdct_coef[ch], AC3_MAX_COEFS,
|
s->ac3dsp.ac3_rshift_int32(block->mdct_coef[ch], AC3_MAX_COEFS,
|
||||||
@@ -117,6 +103,15 @@ void AC3_NAME(scale_coefficients)(AC3EncodeContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clip MDCT coefficients to allowable range.
|
||||||
|
*/
|
||||||
|
static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len)
|
||||||
|
{
|
||||||
|
dsp->vector_clip_int32(coef, coef, COEF_MIN, COEF_MAX, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
AC3EncodeContext *s = avctx->priv_data;
|
AC3EncodeContext *s = avctx->priv_data;
|
||||||
@@ -126,14 +121,13 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
|
|
||||||
AVCodec ff_ac3_fixed_encoder = {
|
AVCodec ff_ac3_fixed_encoder = {
|
||||||
"ac3_fixed",
|
.name = "ac3_fixed",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_AC3,
|
.id = CODEC_ID_AC3,
|
||||||
sizeof(AC3EncodeContext),
|
.priv_data_size = sizeof(AC3EncodeContext),
|
||||||
ac3_fixed_encode_init,
|
.init = ac3_fixed_encode_init,
|
||||||
ff_ac3_encode_frame,
|
.encode = ff_ac3_fixed_encode_frame,
|
||||||
ff_ac3_encode_close,
|
.close = ff_ac3_encode_close,
|
||||||
NULL,
|
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.priv_class = &ac3enc_class,
|
.priv_class = &ac3enc_class,
|
||||||
|
@@ -35,8 +35,8 @@
|
|||||||
#if CONFIG_AC3_ENCODER
|
#if CONFIG_AC3_ENCODER
|
||||||
#define AC3ENC_TYPE AC3ENC_TYPE_AC3
|
#define AC3ENC_TYPE AC3ENC_TYPE_AC3
|
||||||
#include "ac3enc_opts_template.c"
|
#include "ac3enc_opts_template.c"
|
||||||
static AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name,
|
static const AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name,
|
||||||
ac3_options, LIBAVUTIL_VERSION_INT };
|
ac3_options, LIBAVUTIL_VERSION_INT };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ac3enc_template.c"
|
#include "ac3enc_template.c"
|
||||||
@@ -45,10 +45,10 @@ static AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name,
|
|||||||
/**
|
/**
|
||||||
* Finalize MDCT and free allocated memory.
|
* Finalize MDCT and free allocated memory.
|
||||||
*/
|
*/
|
||||||
av_cold void ff_ac3_float_mdct_end(AC3MDCTContext *mdct)
|
av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
ff_mdct_end(&mdct->fft);
|
ff_mdct_end(&s->mdct);
|
||||||
av_freep(&mdct->window);
|
av_freep(&s->mdct_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -56,62 +56,78 @@ av_cold void ff_ac3_float_mdct_end(AC3MDCTContext *mdct)
|
|||||||
* Initialize MDCT tables.
|
* Initialize MDCT tables.
|
||||||
* @param nbits log2(MDCT size)
|
* @param nbits log2(MDCT size)
|
||||||
*/
|
*/
|
||||||
av_cold int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct,
|
av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
|
||||||
int nbits)
|
|
||||||
{
|
{
|
||||||
float *window;
|
float *window;
|
||||||
int i, n, n2;
|
int i, n, n2;
|
||||||
|
|
||||||
n = 1 << nbits;
|
n = 1 << 9;
|
||||||
n2 = n >> 1;
|
n2 = n >> 1;
|
||||||
|
|
||||||
window = av_malloc(n * sizeof(*window));
|
window = av_malloc(n * sizeof(*window));
|
||||||
if (!window) {
|
if (!window) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
ff_kbd_window_init(window, 5.0, n2);
|
ff_kbd_window_init(window, 5.0, n2);
|
||||||
for (i = 0; i < n2; i++)
|
for (i = 0; i < n2; i++)
|
||||||
window[n-1-i] = window[i];
|
window[n-1-i] = window[i];
|
||||||
mdct->window = window;
|
s->mdct_window = window;
|
||||||
|
|
||||||
return ff_mdct_init(&mdct->fft, nbits, 0, -2.0 / n);
|
return ff_mdct_init(&s->mdct, 9, 0, -2.0 / n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply KBD window to input samples prior to MDCT.
|
* Apply KBD window to input samples prior to MDCT.
|
||||||
*/
|
*/
|
||||||
void ff_ac3_float_apply_window(DSPContext *dsp, float *output,
|
static void apply_window(DSPContext *dsp, float *output, const float *input,
|
||||||
const float *input, const float *window,
|
const float *window, unsigned int len)
|
||||||
unsigned int len)
|
|
||||||
{
|
{
|
||||||
dsp->vector_fmul(output, input, window, len);
|
dsp->vector_fmul(output, input, window, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normalize the input samples.
|
||||||
|
* Not needed for the floating-point encoder.
|
||||||
|
*/
|
||||||
|
static int normalize_samples(AC3EncodeContext *s)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scale MDCT coefficients from float to 24-bit fixed-point.
|
* Scale MDCT coefficients from float to 24-bit fixed-point.
|
||||||
*/
|
*/
|
||||||
void ff_ac3_float_scale_coefficients(AC3EncodeContext *s)
|
static void scale_coefficients(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS;
|
int chan_size = AC3_MAX_COEFS * s->num_blocks;
|
||||||
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
|
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
|
||||||
s->mdct_coef_buffer + chan_size,
|
s->mdct_coef_buffer + chan_size,
|
||||||
chan_size * s->channels);
|
chan_size * s->channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clip MDCT coefficients to allowable range.
|
||||||
|
*/
|
||||||
|
static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len)
|
||||||
|
{
|
||||||
|
dsp->vector_clipf(coef, coef, COEF_MIN, COEF_MAX, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_AC3_ENCODER
|
#if CONFIG_AC3_ENCODER
|
||||||
AVCodec ff_ac3_float_encoder = {
|
AVCodec ff_ac3_float_encoder = {
|
||||||
"ac3_float",
|
.name = "ac3 float",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_AC3,
|
.id = CODEC_ID_AC3,
|
||||||
sizeof(AC3EncodeContext),
|
.priv_data_size = sizeof(AC3EncodeContext),
|
||||||
ff_ac3_encode_init,
|
.init = ff_ac3_encode_init,
|
||||||
ff_ac3_encode_frame,
|
.encode = ff_ac3_float_encode_frame,
|
||||||
ff_ac3_encode_close,
|
.close = ff_ac3_encode_close,
|
||||||
NULL,
|
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
|
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.priv_class = &ac3enc_class,
|
.priv_class = &ac3enc_class,
|
||||||
|
@@ -29,12 +29,13 @@ static const AVOption ac3_options[] = {
|
|||||||
#else /* AC3ENC_TYPE_EAC3 */
|
#else /* AC3ENC_TYPE_EAC3 */
|
||||||
static const AVOption eac3_options[] = {
|
static const AVOption eac3_options[] = {
|
||||||
#endif
|
#endif
|
||||||
#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
|
|
||||||
/* Metadata Options */
|
/* Metadata Options */
|
||||||
{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM},
|
{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM},
|
||||||
/* downmix levels */
|
#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
|
||||||
|
/* AC-3 downmix levels */
|
||||||
{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM},
|
{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM},
|
||||||
{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM},
|
{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM},
|
||||||
|
#endif
|
||||||
/* audio production information */
|
/* audio production information */
|
||||||
{"mixing_level", "Mixing Level", OFFSET(mixing_level), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 111, AC3ENC_PARAM},
|
{"mixing_level", "Mixing Level", OFFSET(mixing_level), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 111, AC3ENC_PARAM},
|
||||||
{"room_type", "Room Type", OFFSET(room_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "room_type"},
|
{"room_type", "Room Type", OFFSET(room_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "room_type"},
|
||||||
@@ -42,15 +43,13 @@ static const AVOption eac3_options[] = {
|
|||||||
{"large", "Large Room", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
|
{"large", "Large Room", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
|
||||||
{"small", "Small Room", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
|
{"small", "Small Room", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
|
||||||
/* other metadata options */
|
/* other metadata options */
|
||||||
{"copyright", "Copyright Bit", OFFSET(copyright), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM},
|
{"copyright", "Copyright Bit", OFFSET(copyright), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 1, AC3ENC_PARAM},
|
||||||
#endif
|
|
||||||
{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), FF_OPT_TYPE_INT, {.dbl = -31 }, -31, -1, AC3ENC_PARAM},
|
{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), FF_OPT_TYPE_INT, {.dbl = -31 }, -31, -1, AC3ENC_PARAM},
|
||||||
#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
|
{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dsur_mode"},
|
||||||
{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 2, AC3ENC_PARAM, "dsur_mode"},
|
|
||||||
{"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
{"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
||||||
{"on", "Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
{"on", "Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
||||||
{"off", "Not Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
{"off", "Not Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
|
||||||
{"original", "Original Bit Stream", OFFSET(original), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM},
|
{"original", "Original Bit Stream", OFFSET(original), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 1, AC3ENC_PARAM},
|
||||||
/* extended bitstream information */
|
/* extended bitstream information */
|
||||||
{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dmix_mode"},
|
{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dmix_mode"},
|
||||||
{"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
|
{"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
|
||||||
@@ -71,7 +70,6 @@ static const AVOption eac3_options[] = {
|
|||||||
{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 1, AC3ENC_PARAM, "ad_conv_type"},
|
{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 1, AC3ENC_PARAM, "ad_conv_type"},
|
||||||
{"standard", "Standard (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
|
{"standard", "Standard (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
|
||||||
{"hdcd", "HDCD", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
|
{"hdcd", "HDCD", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
|
||||||
#endif
|
|
||||||
/* Other Encoding Options */
|
/* Other Encoding Options */
|
||||||
{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM},
|
{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM},
|
||||||
#if AC3ENC_TYPE != AC3ENC_TYPE_AC3_FIXED
|
#if AC3ENC_TYPE != AC3ENC_TYPE_AC3_FIXED
|
||||||
|
@@ -31,6 +31,19 @@
|
|||||||
#include "ac3enc.h"
|
#include "ac3enc.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* prototypes for static functions in ac3enc_fixed.c and ac3enc_float.c */
|
||||||
|
|
||||||
|
static void scale_coefficients(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
static void apply_window(DSPContext *dsp, SampleType *output,
|
||||||
|
const SampleType *input, const SampleType *window,
|
||||||
|
unsigned int len);
|
||||||
|
|
||||||
|
static int normalize_samples(AC3EncodeContext *s);
|
||||||
|
|
||||||
|
static void clip_coefficients(DSPContext *dsp, CoefType *coef, unsigned int len);
|
||||||
|
|
||||||
|
|
||||||
int AC3_NAME(allocate_sample_buffers)(AC3EncodeContext *s)
|
int AC3_NAME(allocate_sample_buffers)(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
@@ -55,8 +68,8 @@ alloc_fail:
|
|||||||
* Deinterleave input samples.
|
* Deinterleave input samples.
|
||||||
* Channels are reordered from Libav's default order to AC-3 order.
|
* Channels are reordered from Libav's default order to AC-3 order.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(deinterleave_input_samples)(AC3EncodeContext *s,
|
static void deinterleave_input_samples(AC3EncodeContext *s,
|
||||||
const SampleType *samples)
|
const SampleType *samples)
|
||||||
{
|
{
|
||||||
int ch, i;
|
int ch, i;
|
||||||
|
|
||||||
@@ -66,13 +79,13 @@ void AC3_NAME(deinterleave_input_samples)(AC3EncodeContext *s,
|
|||||||
int sinc;
|
int sinc;
|
||||||
|
|
||||||
/* copy last 256 samples of previous frame to the start of the current frame */
|
/* copy last 256 samples of previous frame to the start of the current frame */
|
||||||
memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][AC3_FRAME_SIZE],
|
memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][AC3_BLOCK_SIZE * s->num_blocks],
|
||||||
AC3_BLOCK_SIZE * sizeof(s->planar_samples[0][0]));
|
AC3_BLOCK_SIZE * sizeof(s->planar_samples[0][0]));
|
||||||
|
|
||||||
/* deinterleave */
|
/* deinterleave */
|
||||||
sinc = s->channels;
|
sinc = s->channels;
|
||||||
sptr = samples + s->channel_map[ch];
|
sptr = samples + s->channel_map[ch];
|
||||||
for (i = AC3_BLOCK_SIZE; i < AC3_FRAME_SIZE+AC3_BLOCK_SIZE; i++) {
|
for (i = AC3_BLOCK_SIZE; i < AC3_BLOCK_SIZE * (s->num_blocks + 1); i++) {
|
||||||
s->planar_samples[ch][i] = *sptr;
|
s->planar_samples[ch][i] = *sptr;
|
||||||
sptr += sinc;
|
sptr += sinc;
|
||||||
}
|
}
|
||||||
@@ -85,23 +98,23 @@ void AC3_NAME(deinterleave_input_samples)(AC3EncodeContext *s,
|
|||||||
* This applies the KBD window and normalizes the input to reduce precision
|
* This applies the KBD window and normalizes the input to reduce precision
|
||||||
* loss due to fixed-point calculations.
|
* loss due to fixed-point calculations.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(apply_mdct)(AC3EncodeContext *s)
|
static void apply_mdct(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int blk, ch;
|
int blk, ch;
|
||||||
|
|
||||||
for (ch = 0; ch < s->channels; ch++) {
|
for (ch = 0; ch < s->channels; ch++) {
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
|
const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
|
||||||
|
|
||||||
s->apply_window(&s->dsp, s->windowed_samples, input_samples,
|
apply_window(&s->dsp, s->windowed_samples, input_samples,
|
||||||
s->mdct->window, AC3_WINDOW_SIZE);
|
s->mdct_window, AC3_WINDOW_SIZE);
|
||||||
|
|
||||||
if (s->fixed_point)
|
if (s->fixed_point)
|
||||||
block->coeff_shift[ch+1] = s->normalize_samples(s);
|
block->coeff_shift[ch+1] = normalize_samples(s);
|
||||||
|
|
||||||
s->mdct->fft.mdct_calcw(&s->mdct->fft, block->mdct_coef[ch+1],
|
s->mdct.mdct_calcw(&s->mdct, block->mdct_coef[ch+1],
|
||||||
s->windowed_samples);
|
s->windowed_samples);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,7 +140,7 @@ static inline float calc_cpl_coord(float energy_ch, float energy_cpl)
|
|||||||
* adaptive coupling strategy were to be implemented it might be useful
|
* adaptive coupling strategy were to be implemented it might be useful
|
||||||
* at that time to use coupling for the fixed-point encoder as well.
|
* at that time to use coupling for the fixed-point encoder as well.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
static void apply_channel_coupling(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
#if CONFIG_AC3ENC_FLOAT
|
#if CONFIG_AC3ENC_FLOAT
|
||||||
LOCAL_ALIGNED_16(float, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
|
LOCAL_ALIGNED_16(float, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
|
||||||
@@ -146,7 +159,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
cpl_start = FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
|
cpl_start = FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
|
||||||
|
|
||||||
/* calculate coupling channel from fbw channels */
|
/* calculate coupling channel from fbw channels */
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
CoefType *cpl_coef = &block->mdct_coef[CPL_CH][cpl_start];
|
CoefType *cpl_coef = &block->mdct_coef[CPL_CH][cpl_start];
|
||||||
if (!block->cpl_in_use)
|
if (!block->cpl_in_use)
|
||||||
@@ -160,8 +173,8 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
cpl_coef[i] += ch_coef[i];
|
cpl_coef[i] += ch_coef[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* coefficients must be clipped to +/- 1.0 in order to be encoded */
|
/* coefficients must be clipped in order to be encoded */
|
||||||
s->dsp.vector_clipf(cpl_coef, cpl_coef, -1.0f, 1.0f, num_cpl_coefs);
|
clip_coefficients(&s->dsp, cpl_coef, num_cpl_coefs);
|
||||||
|
|
||||||
/* scale coupling coefficients from float to 24-bit fixed-point */
|
/* scale coupling coefficients from float to 24-bit fixed-point */
|
||||||
s->ac3dsp.float_to_fixed24(&block->fixed_coef[CPL_CH][cpl_start],
|
s->ac3dsp.float_to_fixed24(&block->fixed_coef[CPL_CH][cpl_start],
|
||||||
@@ -175,7 +188,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
while (i < s->cpl_end_freq) {
|
while (i < s->cpl_end_freq) {
|
||||||
int band_size = s->cpl_band_sizes[bnd];
|
int band_size = s->cpl_band_sizes[bnd];
|
||||||
for (ch = CPL_CH; ch <= s->fbw_channels; ch++) {
|
for (ch = CPL_CH; ch <= s->fbw_channels; ch++) {
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
if (!block->cpl_in_use || (ch > CPL_CH && !block->channel_in_cpl[ch]))
|
if (!block->cpl_in_use || (ch > CPL_CH && !block->channel_in_cpl[ch]))
|
||||||
continue;
|
continue;
|
||||||
@@ -190,7 +203,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* determine which blocks to send new coupling coordinates for */
|
/* determine which blocks to send new coupling coordinates for */
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
AC3Block *block0 = blk ? &s->blocks[blk-1] : NULL;
|
AC3Block *block0 = blk ? &s->blocks[blk-1] : NULL;
|
||||||
int new_coords = 0;
|
int new_coords = 0;
|
||||||
@@ -248,7 +261,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
coordinates in successive blocks */
|
coordinates in successive blocks */
|
||||||
for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {
|
for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {
|
||||||
blk = 0;
|
blk = 0;
|
||||||
while (blk < AC3_MAX_BLOCKS) {
|
while (blk < s->num_blocks) {
|
||||||
int blk1;
|
int blk1;
|
||||||
CoefSumType energy_cpl;
|
CoefSumType energy_cpl;
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
@@ -260,7 +273,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
|
|
||||||
energy_cpl = energy[blk][CPL_CH][bnd];
|
energy_cpl = energy[blk][CPL_CH][bnd];
|
||||||
blk1 = blk+1;
|
blk1 = blk+1;
|
||||||
while (!s->blocks[blk1].new_cpl_coords && blk1 < AC3_MAX_BLOCKS) {
|
while (!s->blocks[blk1].new_cpl_coords && blk1 < s->num_blocks) {
|
||||||
if (s->blocks[blk1].cpl_in_use)
|
if (s->blocks[blk1].cpl_in_use)
|
||||||
energy_cpl += energy[blk1][CPL_CH][bnd];
|
energy_cpl += energy[blk1][CPL_CH][bnd];
|
||||||
blk1++;
|
blk1++;
|
||||||
@@ -272,7 +285,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
continue;
|
continue;
|
||||||
energy_ch = energy[blk][ch][bnd];
|
energy_ch = energy[blk][ch][bnd];
|
||||||
blk1 = blk+1;
|
blk1 = blk+1;
|
||||||
while (!s->blocks[blk1].new_cpl_coords && blk1 < AC3_MAX_BLOCKS) {
|
while (!s->blocks[blk1].new_cpl_coords && blk1 < s->num_blocks) {
|
||||||
if (s->blocks[blk1].cpl_in_use)
|
if (s->blocks[blk1].cpl_in_use)
|
||||||
energy_ch += energy[blk1][ch][bnd];
|
energy_ch += energy[blk1][ch][bnd];
|
||||||
blk1++;
|
blk1++;
|
||||||
@@ -284,11 +297,12 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* calculate exponents/mantissas for coupling coordinates */
|
/* calculate exponents/mantissas for coupling coordinates */
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
AC3Block *block = &s->blocks[blk];
|
AC3Block *block = &s->blocks[blk];
|
||||||
if (!block->cpl_in_use || !block->new_cpl_coords)
|
if (!block->cpl_in_use || !block->new_cpl_coords)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
clip_coefficients(&s->dsp, cpl_coords[blk][1], s->fbw_channels * 16);
|
||||||
s->ac3dsp.float_to_fixed24(fixed_cpl_coords[blk][1],
|
s->ac3dsp.float_to_fixed24(fixed_cpl_coords[blk][1],
|
||||||
cpl_coords[blk][1],
|
cpl_coords[blk][1],
|
||||||
s->fbw_channels * 16);
|
s->fbw_channels * 16);
|
||||||
@@ -339,7 +353,7 @@ void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s)
|
|||||||
/**
|
/**
|
||||||
* Determine rematrixing flags for each block and band.
|
* Determine rematrixing flags for each block and band.
|
||||||
*/
|
*/
|
||||||
void AC3_NAME(compute_rematrixing_strategy)(AC3EncodeContext *s)
|
static void compute_rematrixing_strategy(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int nb_coefs;
|
int nb_coefs;
|
||||||
int blk, bnd, i;
|
int blk, bnd, i;
|
||||||
@@ -348,7 +362,7 @@ void AC3_NAME(compute_rematrixing_strategy)(AC3EncodeContext *s)
|
|||||||
if (s->channel_mode != AC3_CHMODE_STEREO)
|
if (s->channel_mode != AC3_CHMODE_STEREO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
|
for (blk = 0; blk < s->num_blocks; blk++) {
|
||||||
block = &s->blocks[blk];
|
block = &s->blocks[blk];
|
||||||
block->new_rematrixing_strategy = !blk;
|
block->new_rematrixing_strategy = !blk;
|
||||||
|
|
||||||
@@ -397,3 +411,61 @@ void AC3_NAME(compute_rematrixing_strategy)(AC3EncodeContext *s)
|
|||||||
block0 = block;
|
block0 = block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a single AC-3 frame.
|
||||||
|
*/
|
||||||
|
int AC3_NAME(encode_frame)(AVCodecContext *avctx, unsigned char *frame,
|
||||||
|
int buf_size, void *data)
|
||||||
|
{
|
||||||
|
AC3EncodeContext *s = avctx->priv_data;
|
||||||
|
const SampleType *samples = data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (s->options.allow_per_frame_metadata) {
|
||||||
|
ret = ff_ac3_validate_metadata(s);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s->bit_alloc.sr_code == 1 || s->eac3)
|
||||||
|
ff_ac3_adjust_frame_size(s);
|
||||||
|
|
||||||
|
deinterleave_input_samples(s, samples);
|
||||||
|
|
||||||
|
apply_mdct(s);
|
||||||
|
|
||||||
|
if (s->fixed_point)
|
||||||
|
scale_coefficients(s);
|
||||||
|
|
||||||
|
clip_coefficients(&s->dsp, s->blocks[0].mdct_coef[1],
|
||||||
|
AC3_MAX_COEFS * s->num_blocks * s->channels);
|
||||||
|
|
||||||
|
s->cpl_on = s->cpl_enabled;
|
||||||
|
ff_ac3_compute_coupling_strategy(s);
|
||||||
|
|
||||||
|
if (s->cpl_on)
|
||||||
|
apply_channel_coupling(s);
|
||||||
|
|
||||||
|
compute_rematrixing_strategy(s);
|
||||||
|
|
||||||
|
if (!s->fixed_point)
|
||||||
|
scale_coefficients(s);
|
||||||
|
|
||||||
|
ff_ac3_apply_rematrixing(s);
|
||||||
|
|
||||||
|
ff_ac3_process_exponents(s);
|
||||||
|
|
||||||
|
ret = ff_ac3_compute_bit_allocation(s);
|
||||||
|
if (ret) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Bit allocation failed. Try increasing the bitrate.\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ff_ac3_quantize_mantissas(s);
|
||||||
|
|
||||||
|
ff_ac3_output_frame(s, frame);
|
||||||
|
|
||||||
|
return s->frame_size;
|
||||||
|
}
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "acelp_pitch_delay.h"
|
#include "acelp_pitch_delay.h"
|
||||||
@@ -104,20 +105,9 @@ int16_t ff_acelp_decode_gain_code(
|
|||||||
for(i=0; i<ma_pred_order; i++)
|
for(i=0; i<ma_pred_order; i++)
|
||||||
mr_energy += quant_energy[i] * ma_prediction_coeff[i];
|
mr_energy += quant_energy[i] * ma_prediction_coeff[i];
|
||||||
|
|
||||||
#ifdef G729_BITEXACT
|
|
||||||
mr_energy += (((-6165LL * ff_log2(dsp->scalarproduct_int16(fc_v, fc_v, subframe_size, 0))) >> 3) & ~0x3ff);
|
|
||||||
|
|
||||||
mr_energy = (5439 * (mr_energy >> 15)) >> 8; // (0.15) = (0.15) * (7.23)
|
|
||||||
|
|
||||||
return bidir_sal(
|
|
||||||
((ff_exp2(mr_energy & 0x7fff) + 16) >> 5) * (gain_corr_factor >> 1),
|
|
||||||
(mr_energy >> 15) - 25
|
|
||||||
);
|
|
||||||
#else
|
|
||||||
mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) /
|
mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) /
|
||||||
sqrt(dsp->scalarproduct_int16(fc_v, fc_v, subframe_size, 0));
|
sqrt(dsp->scalarproduct_int16(fc_v, fc_v, subframe_size, 0));
|
||||||
return mr_energy >> 12;
|
return mr_energy >> 12;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
|
float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
|
||||||
|
@@ -30,11 +30,11 @@
|
|||||||
#define PITCH_DELAY_MAX 143
|
#define PITCH_DELAY_MAX 143
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode pitch delay of the first subframe encoded by 8 bits with 1/3
|
* @brief Decode pitch delay of the first subframe encoded by 8 bits with 1/3
|
||||||
* resolution.
|
* resolution.
|
||||||
* \param ac_index adaptive codebook index (8 bits)
|
* @param ac_index adaptive codebook index (8 bits)
|
||||||
*
|
*
|
||||||
* \return pitch delay in 1/3 units
|
* @return pitch delay in 1/3 units
|
||||||
*
|
*
|
||||||
* Pitch delay is coded:
|
* Pitch delay is coded:
|
||||||
* with 1/3 resolution, 19 < pitch_delay < 85
|
* with 1/3 resolution, 19 < pitch_delay < 85
|
||||||
@@ -43,18 +43,18 @@
|
|||||||
int ff_acelp_decode_8bit_to_1st_delay3(int ac_index);
|
int ff_acelp_decode_8bit_to_1st_delay3(int ac_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode pitch delay of the second subframe encoded by 5 or 6 bits
|
* @brief Decode pitch delay of the second subframe encoded by 5 or 6 bits
|
||||||
* with 1/3 precision.
|
* with 1/3 precision.
|
||||||
* \param ac_index adaptive codebook index (5 or 6 bits)
|
* @param ac_index adaptive codebook index (5 or 6 bits)
|
||||||
* \param pitch_delay_min lower bound (integer) of pitch delay interval
|
* @param pitch_delay_min lower bound (integer) of pitch delay interval
|
||||||
* for second subframe
|
* for second subframe
|
||||||
*
|
*
|
||||||
* \return pitch delay in 1/3 units
|
* @return pitch delay in 1/3 units
|
||||||
*
|
*
|
||||||
* Pitch delay is coded:
|
* Pitch delay is coded:
|
||||||
* with 1/3 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5
|
* with 1/3 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5
|
||||||
*
|
*
|
||||||
* \remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k,
|
* @remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k,
|
||||||
* AMR @@7.4k for the second subframe.
|
* AMR @@7.4k for the second subframe.
|
||||||
*/
|
*/
|
||||||
int ff_acelp_decode_5_6_bit_to_2nd_delay3(
|
int ff_acelp_decode_5_6_bit_to_2nd_delay3(
|
||||||
@@ -62,19 +62,19 @@ int ff_acelp_decode_5_6_bit_to_2nd_delay3(
|
|||||||
int pitch_delay_min);
|
int pitch_delay_min);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode pitch delay with 1/3 precision.
|
* @brief Decode pitch delay with 1/3 precision.
|
||||||
* \param ac_index adaptive codebook index (4 bits)
|
* @param ac_index adaptive codebook index (4 bits)
|
||||||
* \param pitch_delay_min lower bound (integer) of pitch delay interval for
|
* @param pitch_delay_min lower bound (integer) of pitch delay interval for
|
||||||
* second subframe
|
* second subframe
|
||||||
*
|
*
|
||||||
* \return pitch delay in 1/3 units
|
* @return pitch delay in 1/3 units
|
||||||
*
|
*
|
||||||
* Pitch delay is coded:
|
* Pitch delay is coded:
|
||||||
* integers only, -6 < pitch_delay - int(prev_pitch_delay) <= -2
|
* integers only, -6 < pitch_delay - int(prev_pitch_delay) <= -2
|
||||||
* with 1/3 resolution, -2 < pitch_delay - int(prev_pitch_delay) < 1
|
* with 1/3 resolution, -2 < pitch_delay - int(prev_pitch_delay) < 1
|
||||||
* integers only, 1 <= pitch_delay - int(prev_pitch_delay) < 5
|
* integers only, 1 <= pitch_delay - int(prev_pitch_delay) < 5
|
||||||
*
|
*
|
||||||
* \remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k,
|
* @remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k,
|
||||||
* AMR @@5.15k, AMR @@4.75k for the second subframe.
|
* AMR @@5.15k, AMR @@4.75k for the second subframe.
|
||||||
*/
|
*/
|
||||||
int ff_acelp_decode_4bit_to_2nd_delay3(
|
int ff_acelp_decode_4bit_to_2nd_delay3(
|
||||||
@@ -82,44 +82,44 @@ int ff_acelp_decode_4bit_to_2nd_delay3(
|
|||||||
int pitch_delay_min);
|
int pitch_delay_min);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode pitch delay of the first subframe encoded by 9 bits
|
* @brief Decode pitch delay of the first subframe encoded by 9 bits
|
||||||
* with 1/6 precision.
|
* with 1/6 precision.
|
||||||
* \param ac_index adaptive codebook index (9 bits)
|
* @param ac_index adaptive codebook index (9 bits)
|
||||||
*
|
*
|
||||||
* \return pitch delay in 1/6 units
|
* @return pitch delay in 1/6 units
|
||||||
*
|
*
|
||||||
* Pitch delay is coded:
|
* Pitch delay is coded:
|
||||||
* with 1/6 resolution, 17 < pitch_delay < 95
|
* with 1/6 resolution, 17 < pitch_delay < 95
|
||||||
* integers only, 95 <= pitch_delay <= 143
|
* integers only, 95 <= pitch_delay <= 143
|
||||||
*
|
*
|
||||||
* \remark The routine is used in AMR @@12.2k for the first and third subframes.
|
* @remark The routine is used in AMR @@12.2k for the first and third subframes.
|
||||||
*/
|
*/
|
||||||
int ff_acelp_decode_9bit_to_1st_delay6(int ac_index);
|
int ff_acelp_decode_9bit_to_1st_delay6(int ac_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode pitch delay of the second subframe encoded by 6 bits
|
* @brief Decode pitch delay of the second subframe encoded by 6 bits
|
||||||
* with 1/6 precision.
|
* with 1/6 precision.
|
||||||
* \param ac_index adaptive codebook index (6 bits)
|
* @param ac_index adaptive codebook index (6 bits)
|
||||||
* \param pitch_delay_min lower bound (integer) of pitch delay interval for
|
* @param pitch_delay_min lower bound (integer) of pitch delay interval for
|
||||||
* second subframe
|
* second subframe
|
||||||
*
|
*
|
||||||
* \return pitch delay in 1/6 units
|
* @return pitch delay in 1/6 units
|
||||||
*
|
*
|
||||||
* Pitch delay is coded:
|
* Pitch delay is coded:
|
||||||
* with 1/6 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5
|
* with 1/6 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5
|
||||||
*
|
*
|
||||||
* \remark The routine is used in AMR @@12.2k for the second and fourth subframes.
|
* @remark The routine is used in AMR @@12.2k for the second and fourth subframes.
|
||||||
*/
|
*/
|
||||||
int ff_acelp_decode_6bit_to_2nd_delay6(
|
int ff_acelp_decode_6bit_to_2nd_delay6(
|
||||||
int ac_index,
|
int ac_index,
|
||||||
int pitch_delay_min);
|
int pitch_delay_min);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Update past quantized energies
|
* @brief Update past quantized energies
|
||||||
* \param[in,out] quant_energy past quantized energies (5.10)
|
* @param[in,out] quant_energy past quantized energies (5.10)
|
||||||
* \param gain_corr_factor gain correction factor
|
* @param gain_corr_factor gain correction factor
|
||||||
* \param log2_ma_pred_order log2() of MA prediction order
|
* @param log2_ma_pred_order log2() of MA prediction order
|
||||||
* \param erasure frame erasure flag
|
* @param erasure frame erasure flag
|
||||||
*
|
*
|
||||||
* If frame erasure flag is not equal to zero, memory is updated with
|
* If frame erasure flag is not equal to zero, memory is updated with
|
||||||
* averaged energy, attenuated by 4dB:
|
* averaged energy, attenuated by 4dB:
|
||||||
@@ -128,7 +128,7 @@ int ff_acelp_decode_6bit_to_2nd_delay6(
|
|||||||
* In normal mode memory is updated with
|
* In normal mode memory is updated with
|
||||||
* Er - Ep = 20 * log10(gain_corr_factor)
|
* Er - Ep = 20 * log10(gain_corr_factor)
|
||||||
*
|
*
|
||||||
* \remark The routine is used in G.729 and AMR (all modes).
|
* @remark The routine is used in G.729 and AMR (all modes).
|
||||||
*/
|
*/
|
||||||
void ff_acelp_update_past_gain(
|
void ff_acelp_update_past_gain(
|
||||||
int16_t* quant_energy,
|
int16_t* quant_energy,
|
||||||
@@ -137,16 +137,16 @@ void ff_acelp_update_past_gain(
|
|||||||
int erasure);
|
int erasure);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Decode the adaptive codebook gain and add
|
* @brief Decode the adaptive codebook gain and add
|
||||||
* correction (4.1.5 and 3.9.1 of G.729).
|
* correction (4.1.5 and 3.9.1 of G.729).
|
||||||
* \param dsp initialized dsputil context
|
* @param dsp initialized dsputil context
|
||||||
* \param gain_corr_factor gain correction factor (2.13)
|
* @param gain_corr_factor gain correction factor (2.13)
|
||||||
* \param fc_v fixed-codebook vector (2.13)
|
* @param fc_v fixed-codebook vector (2.13)
|
||||||
* \param mr_energy mean innovation energy and fixed-point correction (7.13)
|
* @param mr_energy mean innovation energy and fixed-point correction (7.13)
|
||||||
* \param[in,out] quant_energy past quantized energies (5.10)
|
* @param[in,out] quant_energy past quantized energies (5.10)
|
||||||
* \param subframe_size length of subframe
|
* @param subframe_size length of subframe
|
||||||
*
|
*
|
||||||
* \return quantized fixed-codebook gain (14.1)
|
* @return quantized fixed-codebook gain (14.1)
|
||||||
*
|
*
|
||||||
* The routine implements equations 69, 66 and 71 of the G.729 specification (3.9.1)
|
* The routine implements equations 69, 66 and 71 of the G.729 specification (3.9.1)
|
||||||
*
|
*
|
||||||
@@ -205,7 +205,7 @@ void ff_acelp_update_past_gain(
|
|||||||
*
|
*
|
||||||
* mr_energy = Em + 10log(N) + 10log(2^26)
|
* mr_energy = Em + 10log(N) + 10log(2^26)
|
||||||
*
|
*
|
||||||
* \remark The routine is used in G.729 and AMR (all modes).
|
* @remark The routine is used in G.729 and AMR (all modes).
|
||||||
*/
|
*/
|
||||||
int16_t ff_acelp_decode_gain_code(
|
int16_t ff_acelp_decode_gain_code(
|
||||||
DSPContext *dsp,
|
DSPContext *dsp,
|
||||||
|
@@ -48,26 +48,6 @@ const uint8_t ff_fc_2pulses_9bits_track1_gray[16] =
|
|||||||
28, 26,
|
28, 26,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ff_fc_2pulses_9bits_track2_gray[32] =
|
|
||||||
{
|
|
||||||
0, 2,
|
|
||||||
5, 4,
|
|
||||||
12, 10,
|
|
||||||
7, 9,
|
|
||||||
25, 24,
|
|
||||||
20, 22,
|
|
||||||
14, 15,
|
|
||||||
19, 17,
|
|
||||||
36, 31,
|
|
||||||
21, 26,
|
|
||||||
1, 6,
|
|
||||||
16, 11,
|
|
||||||
27, 29,
|
|
||||||
32, 30,
|
|
||||||
39, 37,
|
|
||||||
34, 35,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t ff_fc_4pulses_8bits_tracks_13[16] =
|
const uint8_t ff_fc_4pulses_8bits_tracks_13[16] =
|
||||||
{
|
{
|
||||||
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
|
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
|
||||||
|
@@ -81,37 +81,6 @@ extern const uint8_t ff_fc_4pulses_8bits_track_4[32];
|
|||||||
extern const uint8_t ff_fc_2pulses_9bits_track1[16];
|
extern const uint8_t ff_fc_2pulses_9bits_track1[16];
|
||||||
extern const uint8_t ff_fc_2pulses_9bits_track1_gray[16];
|
extern const uint8_t ff_fc_2pulses_9bits_track1_gray[16];
|
||||||
|
|
||||||
/**
|
|
||||||
* Track|Pulse| Positions
|
|
||||||
* -----------------------------------------
|
|
||||||
* 2 | 1 | 0, 7, 14, 20, 27, 34, 1, 21
|
|
||||||
* | | 2, 9, 15, 22, 29, 35, 6, 26
|
|
||||||
* | | 4,10, 17, 24, 30, 37, 11, 31
|
|
||||||
* | | 5,12, 19, 25, 32, 39, 16, 36
|
|
||||||
* -----------------------------------------
|
|
||||||
*
|
|
||||||
* @remark Track in the table should be read top-to-bottom, left-to-right.
|
|
||||||
*
|
|
||||||
* @note (EE.1) This table (from the reference code) does not comply with
|
|
||||||
* the specification.
|
|
||||||
* The specification contains the following table:
|
|
||||||
*
|
|
||||||
* Track|Pulse| Positions
|
|
||||||
* -----------------------------------------
|
|
||||||
* 2 | 1 | 0, 5, 10, 15, 20, 25, 30, 35
|
|
||||||
* | | 1, 6, 11, 16, 21, 26, 31, 36
|
|
||||||
* | | 2, 7, 12, 17, 22, 27, 32, 37
|
|
||||||
* | | 4, 9, 14, 19, 24, 29, 34, 39
|
|
||||||
*
|
|
||||||
* -----------------------------------------
|
|
||||||
*
|
|
||||||
* @note (EE.2) Reference G.729D code also uses gray decoding for each
|
|
||||||
* pulse index before looking up the value in the table.
|
|
||||||
*
|
|
||||||
* Used in G.729 @@6.4k (with gray coding)
|
|
||||||
*/
|
|
||||||
extern const uint8_t ff_fc_2pulses_9bits_track2_gray[32];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* b60 hamming windowed sinc function coefficients
|
* b60 hamming windowed sinc function coefficients
|
||||||
*/
|
*/
|
||||||
|
@@ -198,6 +198,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
|
|||||||
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */
|
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */
|
||||||
/* and we have 4 bytes per channel overhead */
|
/* and we have 4 bytes per channel overhead */
|
||||||
avctx->block_align = BLKSIZE;
|
avctx->block_align = BLKSIZE;
|
||||||
|
avctx->bits_per_coded_sample = 4;
|
||||||
/* seems frame_size isn't taken into account... have to buffer the samples :-( */
|
/* seems frame_size isn't taken into account... have to buffer the samples :-( */
|
||||||
break;
|
break;
|
||||||
case CODEC_ID_ADPCM_IMA_QT:
|
case CODEC_ID_ADPCM_IMA_QT:
|
||||||
@@ -208,6 +209,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
|
|||||||
avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2; /* each 16 bits sample gives one nibble */
|
avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2; /* each 16 bits sample gives one nibble */
|
||||||
/* and we have 7 bytes per channel overhead */
|
/* and we have 7 bytes per channel overhead */
|
||||||
avctx->block_align = BLKSIZE;
|
avctx->block_align = BLKSIZE;
|
||||||
|
avctx->bits_per_coded_sample = 4;
|
||||||
avctx->extradata_size = 32;
|
avctx->extradata_size = 32;
|
||||||
extradata = avctx->extradata = av_malloc(avctx->extradata_size);
|
extradata = avctx->extradata = av_malloc(avctx->extradata_size);
|
||||||
if (!extradata)
|
if (!extradata)
|
||||||
|
@@ -167,14 +167,12 @@ static int adx_decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_adpcm_adx_decoder = {
|
AVCodec ff_adpcm_adx_decoder = {
|
||||||
"adpcm_adx",
|
.name = "adpcm_adx",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_ADPCM_ADX,
|
.id = CODEC_ID_ADPCM_ADX,
|
||||||
sizeof(ADXContext),
|
.priv_data_size = sizeof(ADXContext),
|
||||||
adx_decode_init,
|
.init = adx_decode_init,
|
||||||
NULL,
|
.decode = adx_decode_frame,
|
||||||
NULL,
|
|
||||||
adx_decode_frame,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -184,14 +184,13 @@ static int adx_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_adpcm_adx_encoder = {
|
AVCodec ff_adpcm_adx_encoder = {
|
||||||
"adpcm_adx",
|
.name = "adpcm_adx",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_ADPCM_ADX,
|
.id = CODEC_ID_ADPCM_ADX,
|
||||||
sizeof(ADXContext),
|
.priv_data_size = sizeof(ADXContext),
|
||||||
adx_encode_init,
|
.init = adx_encode_init,
|
||||||
adx_encode_frame,
|
.encode = adx_encode_frame,
|
||||||
adx_encode_close,
|
.close = adx_encode_close,
|
||||||
NULL,
|
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||||
};
|
};
|
||||||
|
@@ -23,9 +23,7 @@
|
|||||||
* @file
|
* @file
|
||||||
* ALAC (Apple Lossless Audio Codec) decoder
|
* ALAC (Apple Lossless Audio Codec) decoder
|
||||||
* @author 2005 David Hammerton
|
* @author 2005 David Hammerton
|
||||||
*
|
* @see http://crazney.net/programs/itunes/alac.html
|
||||||
* For more information on the ALAC format, visit:
|
|
||||||
* http://crazney.net/programs/itunes/alac.html
|
|
||||||
*
|
*
|
||||||
* Note: This decoder expects a 36- (0x24-)byte QuickTime atom to be
|
* Note: This decoder expects a 36- (0x24-)byte QuickTime atom to be
|
||||||
* passed through the extradata[_size] fields. This atom is tacked onto
|
* passed through the extradata[_size] fields. This atom is tacked onto
|
||||||
@@ -286,20 +284,9 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
|
|||||||
buffer_out[i+1] = val;
|
buffer_out[i+1] = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* 4 and 8 are very common cases (the only ones i've seen). these
|
/* 4 and 8 are very common cases (the only ones i've seen). these
|
||||||
* should be unrolled and optimized
|
* should be unrolled and optimized
|
||||||
*/
|
*/
|
||||||
if (predictor_coef_num == 4) {
|
|
||||||
/* FIXME: optimized general case */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (predictor_coef_table == 8) {
|
|
||||||
/* FIXME: optimized general case */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* general case */
|
/* general case */
|
||||||
if (predictor_coef_num > 0) {
|
if (predictor_coef_num > 0) {
|
||||||
@@ -692,13 +679,12 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_alac_decoder = {
|
AVCodec ff_alac_decoder = {
|
||||||
"alac",
|
.name = "alac",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_ALAC,
|
.id = CODEC_ID_ALAC,
|
||||||
sizeof(ALACContext),
|
.priv_data_size = sizeof(ALACContext),
|
||||||
alac_decode_init,
|
.init = alac_decode_init,
|
||||||
NULL,
|
.close = alac_decode_close,
|
||||||
alac_decode_close,
|
.decode = alac_decode_frame,
|
||||||
alac_decode_frame,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||||
};
|
};
|
||||||
|
@@ -529,13 +529,13 @@ static av_cold int alac_encode_close(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_alac_encoder = {
|
AVCodec ff_alac_encoder = {
|
||||||
"alac",
|
.name = "alac",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_ALAC,
|
.id = CODEC_ID_ALAC,
|
||||||
sizeof(AlacEncodeContext),
|
.priv_data_size = sizeof(AlacEncodeContext),
|
||||||
alac_encode_init,
|
.init = alac_encode_init,
|
||||||
alac_encode_frame,
|
.encode = alac_encode_frame,
|
||||||
alac_encode_close,
|
.close = alac_encode_close,
|
||||||
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
|
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE},
|
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||||
|
@@ -109,7 +109,7 @@ void avcodec_register_all(void)
|
|||||||
REGISTER_ENCDEC (FFV1, ffv1);
|
REGISTER_ENCDEC (FFV1, ffv1);
|
||||||
REGISTER_ENCDEC (FFVHUFF, ffvhuff);
|
REGISTER_ENCDEC (FFVHUFF, ffvhuff);
|
||||||
REGISTER_ENCDEC (FLASHSV, flashsv);
|
REGISTER_ENCDEC (FLASHSV, flashsv);
|
||||||
REGISTER_ENCODER (FLASHSV2, flashsv2);
|
REGISTER_ENCDEC (FLASHSV2, flashsv2);
|
||||||
REGISTER_DECODER (FLIC, flic);
|
REGISTER_DECODER (FLIC, flic);
|
||||||
REGISTER_ENCDEC (FLV, flv);
|
REGISTER_ENCDEC (FLV, flv);
|
||||||
REGISTER_DECODER (FOURXM, fourxm);
|
REGISTER_DECODER (FOURXM, fourxm);
|
||||||
|
@@ -270,7 +270,7 @@ static void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels,
|
|||||||
|
|
||||||
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
|
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
|
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
if (!high_bit_depth) {
|
if (!high_bit_depth) {
|
||||||
c->put_pixels_tab[0][0] = put_pixels16_axp_asm;
|
c->put_pixels_tab[0][0] = put_pixels16_axp_asm;
|
||||||
@@ -321,7 +321,8 @@ void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->put_pixels_clamped = put_pixels_clamped_mvi_asm;
|
c->put_pixels_clamped = put_pixels_clamped_mvi_asm;
|
||||||
c->add_pixels_clamped = add_pixels_clamped_mvi_asm;
|
c->add_pixels_clamped = add_pixels_clamped_mvi_asm;
|
||||||
|
|
||||||
c->get_pixels = get_pixels_mvi;
|
if (!high_bit_depth)
|
||||||
|
c->get_pixels = get_pixels_mvi;
|
||||||
c->diff_pixels = diff_pixels_mvi;
|
c->diff_pixels = diff_pixels_mvi;
|
||||||
c->sad[0] = pix_abs16x16_mvi_asm;
|
c->sad[0] = pix_abs16x16_mvi_asm;
|
||||||
c->sad[1] = pix_abs8x8_mvi;
|
c->sad[1] = pix_abs8x8_mvi;
|
||||||
@@ -335,7 +336,7 @@ void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
|
|||||||
put_pixels_clamped_axp_p = c->put_pixels_clamped;
|
put_pixels_clamped_axp_p = c->put_pixels_clamped;
|
||||||
add_pixels_clamped_axp_p = c->add_pixels_clamped;
|
add_pixels_clamped_axp_p = c->add_pixels_clamped;
|
||||||
|
|
||||||
if (!avctx->lowres &&
|
if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
|
||||||
(avctx->idct_algo == FF_IDCT_AUTO ||
|
(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||||
avctx->idct_algo == FF_IDCT_SIMPLEALPHA)) {
|
avctx->idct_algo == FF_IDCT_SIMPLEALPHA)) {
|
||||||
c->idct_put = ff_simple_idct_put_axp;
|
c->idct_put = ff_simple_idct_put_axp;
|
||||||
|
@@ -1739,14 +1739,13 @@ static av_cold void flush(AVCodecContext *avctx)
|
|||||||
|
|
||||||
|
|
||||||
AVCodec ff_als_decoder = {
|
AVCodec ff_als_decoder = {
|
||||||
"als",
|
.name = "als",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_MP4ALS,
|
.id = CODEC_ID_MP4ALS,
|
||||||
sizeof(ALSDecContext),
|
.priv_data_size = sizeof(ALSDecContext),
|
||||||
decode_init,
|
.init = decode_init,
|
||||||
NULL,
|
.close = decode_end,
|
||||||
decode_end,
|
.decode = decode_frame,
|
||||||
decode_frame,
|
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
.capabilities = CODEC_CAP_SUBFRAMES,
|
.capabilities = CODEC_CAP_SUBFRAMES,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
|
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
|
||||||
|
@@ -83,7 +83,7 @@
|
|||||||
/** Maximum sharpening factor
|
/** Maximum sharpening factor
|
||||||
*
|
*
|
||||||
* The specification says 0.8, which should be 13107, but the reference C code
|
* The specification says 0.8, which should be 13107, but the reference C code
|
||||||
* uses 13017 instead. (Amusingly the same applies to SHARP_MAX in g729dec.c.)
|
* uses 13017 instead. (Amusingly the same applies to SHARP_MAX in bitexact G.729.)
|
||||||
*/
|
*/
|
||||||
#define SHARP_MAX 0.79449462890625
|
#define SHARP_MAX 0.79449462890625
|
||||||
|
|
||||||
@@ -936,7 +936,8 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
|
|
||||||
p->cur_frame_mode = unpack_bitstream(p, buf, buf_size);
|
p->cur_frame_mode = unpack_bitstream(p, buf, buf_size);
|
||||||
if (p->cur_frame_mode == MODE_DTX) {
|
if (p->cur_frame_mode == MODE_DTX) {
|
||||||
av_log_missing_feature(avctx, "dtx mode", 1);
|
av_log_missing_feature(avctx, "dtx mode", 0);
|
||||||
|
av_log(avctx, AV_LOG_INFO, "Note: libopencore_amrnb supports dtx\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -186,14 +186,13 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_anm_decoder = {
|
AVCodec ff_anm_decoder = {
|
||||||
"anm",
|
.name = "anm",
|
||||||
AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
CODEC_ID_ANM,
|
.id = CODEC_ID_ANM,
|
||||||
sizeof(AnmContext),
|
.priv_data_size = sizeof(AnmContext),
|
||||||
decode_init,
|
.init = decode_init,
|
||||||
NULL,
|
.close = decode_end,
|
||||||
decode_end,
|
.decode = decode_frame,
|
||||||
decode_frame,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
CODEC_CAP_DR1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
|
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
|
||||||
};
|
};
|
||||||
|
@@ -154,7 +154,7 @@ static void draw_char(AVCodecContext *avctx, int c)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute ANSI escape code
|
* Execute ANSI escape code
|
||||||
* @param <0 error
|
* @return 0 on success, negative on error
|
||||||
*/
|
*/
|
||||||
static int execute_code(AVCodecContext * avctx, int c)
|
static int execute_code(AVCodecContext * avctx, int c)
|
||||||
{
|
{
|
||||||
|
@@ -163,6 +163,18 @@ typedef struct APEContext {
|
|||||||
|
|
||||||
// TODO: dsputilize
|
// TODO: dsputilize
|
||||||
|
|
||||||
|
static av_cold int ape_decode_close(AVCodecContext * avctx)
|
||||||
|
{
|
||||||
|
APEContext *s = avctx->priv_data;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < APE_FILTER_LEVELS; i++)
|
||||||
|
av_freep(&s->filterbuf[i]);
|
||||||
|
|
||||||
|
av_freep(&s->data);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static av_cold int ape_decode_init(AVCodecContext * avctx)
|
static av_cold int ape_decode_init(AVCodecContext * avctx)
|
||||||
{
|
{
|
||||||
APEContext *s = avctx->priv_data;
|
APEContext *s = avctx->priv_data;
|
||||||
@@ -195,25 +207,18 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
|
|||||||
for (i = 0; i < APE_FILTER_LEVELS; i++) {
|
for (i = 0; i < APE_FILTER_LEVELS; i++) {
|
||||||
if (!ape_filter_orders[s->fset][i])
|
if (!ape_filter_orders[s->fset][i])
|
||||||
break;
|
break;
|
||||||
s->filterbuf[i] = av_malloc((ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4);
|
FF_ALLOC_OR_GOTO(avctx, s->filterbuf[i],
|
||||||
|
(ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4,
|
||||||
|
filter_alloc_fail);
|
||||||
}
|
}
|
||||||
|
|
||||||
dsputil_init(&s->dsp, avctx);
|
dsputil_init(&s->dsp, avctx);
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
filter_alloc_fail:
|
||||||
|
ape_decode_close(avctx);
|
||||||
static av_cold int ape_decode_close(AVCodecContext * avctx)
|
return AVERROR(ENOMEM);
|
||||||
{
|
|
||||||
APEContext *s = avctx->priv_data;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < APE_FILTER_LEVELS; i++)
|
|
||||||
av_freep(&s->filterbuf[i]);
|
|
||||||
|
|
||||||
av_freep(&s->data);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -797,7 +802,7 @@ static int ape_decode_frame(AVCodecContext * avctx,
|
|||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
APEContext *s = avctx->priv_data;
|
APEContext *s = avctx->priv_data;
|
||||||
int16_t *samples = data;
|
int16_t *samples = data;
|
||||||
int nblocks;
|
uint32_t nblocks;
|
||||||
int i, n;
|
int i, n;
|
||||||
int blockstodecode;
|
int blockstodecode;
|
||||||
int bytes_used;
|
int bytes_used;
|
||||||
@@ -814,12 +819,15 @@ static int ape_decode_frame(AVCodecContext * avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!s->samples){
|
if(!s->samples){
|
||||||
s->data = av_realloc(s->data, (buf_size + 3) & ~3);
|
void *tmp_data = av_realloc(s->data, (buf_size + 3) & ~3);
|
||||||
|
if (!tmp_data)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
s->data = tmp_data;
|
||||||
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
|
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
|
||||||
s->ptr = s->last_ptr = s->data;
|
s->ptr = s->last_ptr = s->data;
|
||||||
s->data_end = s->data + buf_size;
|
s->data_end = s->data + buf_size;
|
||||||
|
|
||||||
nblocks = s->samples = bytestream_get_be32(&s->ptr);
|
nblocks = bytestream_get_be32(&s->ptr);
|
||||||
n = bytestream_get_be32(&s->ptr);
|
n = bytestream_get_be32(&s->ptr);
|
||||||
if(n < 0 || n > 3){
|
if(n < 0 || n > 3){
|
||||||
av_log(avctx, AV_LOG_ERROR, "Incorrect offset passed\n");
|
av_log(avctx, AV_LOG_ERROR, "Incorrect offset passed\n");
|
||||||
@@ -828,12 +836,13 @@ static int ape_decode_frame(AVCodecContext * avctx,
|
|||||||
}
|
}
|
||||||
s->ptr += n;
|
s->ptr += n;
|
||||||
|
|
||||||
s->currentframeblocks = nblocks;
|
|
||||||
buf += 4;
|
buf += 4;
|
||||||
if (s->samples <= 0) {
|
if (!nblocks || nblocks > INT_MAX) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %u.\n", nblocks);
|
||||||
*data_size = 0;
|
*data_size = 0;
|
||||||
return buf_size;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
s->currentframeblocks = s->samples = nblocks;
|
||||||
|
|
||||||
memset(s->decoded0, 0, sizeof(s->decoded0));
|
memset(s->decoded0, 0, sizeof(s->decoded0));
|
||||||
memset(s->decoded1, 0, sizeof(s->decoded1));
|
memset(s->decoded1, 0, sizeof(s->decoded1));
|
||||||
@@ -885,14 +894,13 @@ static void ape_flush(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_ape_decoder = {
|
AVCodec ff_ape_decoder = {
|
||||||
"ape",
|
.name = "ape",
|
||||||
AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
CODEC_ID_APE,
|
.id = CODEC_ID_APE,
|
||||||
sizeof(APEContext),
|
.priv_data_size = sizeof(APEContext),
|
||||||
ape_decode_init,
|
.init = ape_decode_init,
|
||||||
NULL,
|
.close = ape_decode_close,
|
||||||
ape_decode_close,
|
.decode = ape_decode_frame,
|
||||||
ape_decode_frame,
|
|
||||||
.capabilities = CODEC_CAP_SUBFRAMES,
|
.capabilities = CODEC_CAP_SUBFRAMES,
|
||||||
.flush = ape_flush,
|
.flush = ape_flush,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
|
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
|
||||||
|
@@ -114,12 +114,15 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx,
|
|||||||
"vmov d1, %2, %3 \n\t"
|
"vmov d1, %2, %3 \n\t"
|
||||||
"lsls %6, %6, #1 \n\t"
|
"lsls %6, %6, #1 \n\t"
|
||||||
"and %0, %5, #1<<31 \n\t"
|
"and %0, %5, #1<<31 \n\t"
|
||||||
|
"it cs \n\t"
|
||||||
"lslcs %5, %5, #1 \n\t"
|
"lslcs %5, %5, #1 \n\t"
|
||||||
"lsls %6, %6, #1 \n\t"
|
"lsls %6, %6, #1 \n\t"
|
||||||
"and %1, %5, #1<<31 \n\t"
|
"and %1, %5, #1<<31 \n\t"
|
||||||
|
"it cs \n\t"
|
||||||
"lslcs %5, %5, #1 \n\t"
|
"lslcs %5, %5, #1 \n\t"
|
||||||
"lsls %6, %6, #1 \n\t"
|
"lsls %6, %6, #1 \n\t"
|
||||||
"and %2, %5, #1<<31 \n\t"
|
"and %2, %5, #1<<31 \n\t"
|
||||||
|
"it cs \n\t"
|
||||||
"lslcs %5, %5, #1 \n\t"
|
"lslcs %5, %5, #1 \n\t"
|
||||||
"vmov d4, %0, %1 \n\t"
|
"vmov d4, %0, %1 \n\t"
|
||||||
"and %3, %5, #1<<31 \n\t"
|
"and %3, %5, #1<<31 \n\t"
|
||||||
|
@@ -27,6 +27,7 @@ function ff_ac3_update_bap_counts_arm, export=1
|
|||||||
lsl r3, lr, #1
|
lsl r3, lr, #1
|
||||||
ldrh r12, [r0, r3]
|
ldrh r12, [r0, r3]
|
||||||
subs r2, r2, #1
|
subs r2, r2, #1
|
||||||
|
it gt
|
||||||
ldrbgt lr, [r1], #1
|
ldrbgt lr, [r1], #1
|
||||||
add r12, r12, #1
|
add r12, r12, #1
|
||||||
strh r12, [r0, r3]
|
strh r12, [r0, r3]
|
||||||
|
@@ -37,14 +37,16 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1
|
|||||||
ldrb r10, [r4], #1
|
ldrb r10, [r4], #1
|
||||||
1:
|
1:
|
||||||
ldrsh r9, [r0], #2 @ mask[band]
|
ldrsh r9, [r0], #2 @ mask[band]
|
||||||
ldr r8, =0x1fe0
|
mov r8, #0xff0
|
||||||
sub r9, r9, r12 @ - snr_offset
|
sub r9, r9, r12 @ - snr_offset
|
||||||
mov r11, r10
|
mov r11, r10
|
||||||
ldrb r10, [r4], #1 @ band_start_tab[band++]
|
ldrb r10, [r4], #1 @ band_start_tab[band++]
|
||||||
subs r9, r9, r5 @ - floor
|
subs r9, r9, r5 @ - floor
|
||||||
|
it lt
|
||||||
movlt r9, #0
|
movlt r9, #0
|
||||||
cmp r10, r3 @ - end
|
cmp r10, r3 @ - end
|
||||||
and r9, r9, r8 @ & 0x1fe0
|
and r9, r9, r8, lsl #1 @ & 0x1fe0
|
||||||
|
ite gt
|
||||||
subgt r8, r3, r11
|
subgt r8, r3, r11
|
||||||
suble r8, r10, r11
|
suble r8, r10, r11
|
||||||
add r9, r9, r5 @ + floor => m
|
add r9, r9, r5 @ + floor => m
|
||||||
|
@@ -41,6 +41,7 @@ endfunc
|
|||||||
|
|
||||||
function ff_ac3_exponent_min_neon, export=1
|
function ff_ac3_exponent_min_neon, export=1
|
||||||
cmp r1, #0
|
cmp r1, #0
|
||||||
|
it eq
|
||||||
bxeq lr
|
bxeq lr
|
||||||
push {lr}
|
push {lr}
|
||||||
mov r12, #256
|
mov r12, #256
|
||||||
@@ -94,19 +95,14 @@ function ff_float_to_fixed24_neon, export=1
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function ff_ac3_extract_exponents_neon, export=1
|
function ff_ac3_extract_exponents_neon, export=1
|
||||||
vmov.i32 q14, #24
|
|
||||||
vmov.i32 q15, #8
|
vmov.i32 q15, #8
|
||||||
1:
|
1:
|
||||||
vld1.32 {q0}, [r1,:128]
|
vld1.32 {q0}, [r1,:128]!
|
||||||
vabs.s32 q1, q0
|
vabs.s32 q1, q0
|
||||||
vclz.i32 q3, q1
|
vclz.i32 q3, q1
|
||||||
vsub.i32 q3, q3, q15
|
vsub.i32 q3, q3, q15
|
||||||
vcge.s32 q2, q3, q14
|
|
||||||
vbit q3, q14, q2
|
|
||||||
vbic q0, q0, q2
|
|
||||||
vmovn.i32 d6, q3
|
vmovn.i32 d6, q3
|
||||||
vmovn.i16 d6, q3
|
vmovn.i16 d6, q3
|
||||||
vst1.32 {q0}, [r1,:128]!
|
|
||||||
vst1.32 {d6[0]}, [r0,:32]!
|
vst1.32 {d6[0]}, [r0,:32]!
|
||||||
subs r2, r2, #4
|
subs r2, r2, #4
|
||||||
bgt 1b
|
bgt 1b
|
||||||
|
@@ -29,11 +29,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MpegEncContext */
|
/* MpegEncContext */
|
||||||
#define Y_DC_SCALE 0xb4
|
#define Y_DC_SCALE 0xa8
|
||||||
#define C_DC_SCALE 0xb8
|
#define C_DC_SCALE 0xac
|
||||||
#define AC_PRED 0xbc
|
#define AC_PRED 0xb0
|
||||||
#define BLOCK_LAST_INDEX 0xc0
|
#define BLOCK_LAST_INDEX 0xb4
|
||||||
#define H263_AIC 0xf0
|
#define H263_AIC 0xe4
|
||||||
#define INTER_SCANTAB_RASTER_END 0x138
|
#define INTER_SCANTAB_RASTER_END 0x12c
|
||||||
|
|
||||||
#endif /* AVCODEC_ARM_ASM_OFFSETS_H */
|
#endif /* AVCODEC_ARM_ASM_OFFSETS_H */
|
||||||
|
@@ -24,9 +24,18 @@
|
|||||||
# define ELF
|
# define ELF
|
||||||
#else
|
#else
|
||||||
# define ELF @
|
# define ELF @
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_THUMB
|
||||||
|
# define A @
|
||||||
|
# define T
|
||||||
|
#else
|
||||||
|
# define A
|
||||||
|
# define T @
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
|
T .thumb
|
||||||
|
|
||||||
.macro require8 val=1
|
.macro require8 val=1
|
||||||
ELF .eabi_attribute 24, \val
|
ELF .eabi_attribute 24, \val
|
||||||
@@ -82,6 +91,90 @@ ELF .size \name, . - \name
|
|||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro ldr_pre rt, rn, rm:vararg
|
||||||
|
A ldr \rt, [\rn, \rm]!
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
T ldr \rt, [\rn]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldr_post rt, rn, rm:vararg
|
||||||
|
A ldr \rt, [\rn], \rm
|
||||||
|
T ldr \rt, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldrd_reg rt, rt2, rn, rm
|
||||||
|
A ldrd \rt, \rt2, [\rn, \rm]
|
||||||
|
T add \rt, \rn, \rm
|
||||||
|
T ldrd \rt, \rt2, [\rt]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldrd_post rt, rt2, rn, rm
|
||||||
|
A ldrd \rt, \rt2, [\rn], \rm
|
||||||
|
T ldrd \rt, \rt2, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldrh_pre rt, rn, rm
|
||||||
|
A ldrh \rt, [\rn, \rm]!
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
T ldrh \rt, [\rn]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldrh_dpre rt, rn, rm
|
||||||
|
A ldrh \rt, [\rn, -\rm]!
|
||||||
|
T sub \rn, \rn, \rm
|
||||||
|
T ldrh \rt, [\rn]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro ldrh_post rt, rn, rm
|
||||||
|
A ldrh \rt, [\rn], \rm
|
||||||
|
T ldrh \rt, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro str_post rt, rn, rm:vararg
|
||||||
|
A str \rt, [\rn], \rm
|
||||||
|
T str \rt, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strb_post rt, rn, rm:vararg
|
||||||
|
A strb \rt, [\rn], \rm
|
||||||
|
T strb \rt, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strd_post rt, rt2, rn, rm
|
||||||
|
A strd \rt, \rt2, [\rn], \rm
|
||||||
|
T strd \rt, \rt2, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strh_pre rt, rn, rm
|
||||||
|
A strh \rt, [\rn, \rm]!
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
T strh \rt, [\rn]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strh_dpre rt, rn, rm
|
||||||
|
A strh \rt, [\rn, -\rm]!
|
||||||
|
T sub \rn, \rn, \rm
|
||||||
|
T strh \rt, [\rn]
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strh_post rt, rn, rm
|
||||||
|
A strh \rt, [\rn], \rm
|
||||||
|
T strh \rt, [\rn]
|
||||||
|
T add \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro strh_dpost rt, rn, rm
|
||||||
|
A strh \rt, [\rn], -\rm
|
||||||
|
T strh \rt, [\rn]
|
||||||
|
T sub \rn, \rn, \rm
|
||||||
|
.endm
|
||||||
|
|
||||||
#if HAVE_VFP_ARGS
|
#if HAVE_VFP_ARGS
|
||||||
.eabi_attribute 28, 1
|
.eabi_attribute 28, 1
|
||||||
# define VFP
|
# define VFP
|
||||||
|
@@ -27,6 +27,7 @@ function ff_dca_lfe_fir_neon, export=1
|
|||||||
add r5, r2, #256*4-16 @ cf1
|
add r5, r2, #256*4-16 @ cf1
|
||||||
sub r1, r1, #12
|
sub r1, r1, #12
|
||||||
cmp r3, #32
|
cmp r3, #32
|
||||||
|
ite eq
|
||||||
moveq r6, #256/32
|
moveq r6, #256/32
|
||||||
movne r6, #256/64
|
movne r6, #256/64
|
||||||
NOVFP vldr s0, [sp, #16] @ scale
|
NOVFP vldr s0, [sp, #16] @ scale
|
||||||
|
@@ -24,11 +24,6 @@
|
|||||||
|
|
||||||
preserve8
|
preserve8
|
||||||
|
|
||||||
#if !HAVE_PLD
|
|
||||||
.macro pld reg
|
|
||||||
.endm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_ARMV5TE
|
#if HAVE_ARMV5TE
|
||||||
function ff_prefetch_arm, export=1
|
function ff_prefetch_arm, export=1
|
||||||
subs r2, r2, #1
|
subs r2, r2, #1
|
||||||
@@ -37,6 +32,8 @@ function ff_prefetch_arm, export=1
|
|||||||
bne ff_prefetch_arm
|
bne ff_prefetch_arm
|
||||||
bx lr
|
bx lr
|
||||||
endfunc
|
endfunc
|
||||||
|
#else
|
||||||
|
#define pld @
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.macro ALIGN_QWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
|
.macro ALIGN_QWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
|
||||||
@@ -554,10 +551,12 @@ endfunc
|
|||||||
and r9, r5, r14
|
and r9, r5, r14
|
||||||
and r10, r6, r14
|
and r10, r6, r14
|
||||||
and r11, r7, r14
|
and r11, r7, r14
|
||||||
|
it eq
|
||||||
andeq r14, r14, r14, \rnd #1
|
andeq r14, r14, r14, \rnd #1
|
||||||
add r8, r8, r10
|
add r8, r8, r10
|
||||||
add r9, r9, r11
|
add r9, r9, r11
|
||||||
ldr r12, =0xfcfcfcfc >> 2
|
ldr r12, =0xfcfcfcfc >> 2
|
||||||
|
itt eq
|
||||||
addeq r8, r8, r14
|
addeq r8, r8, r14
|
||||||
addeq r9, r9, r14
|
addeq r9, r9, r14
|
||||||
and r4, r12, r4, lsr #2
|
and r4, r12, r4, lsr #2
|
||||||
@@ -638,8 +637,10 @@ function ff_add_pixels_clamped_arm, export=1
|
|||||||
mvn r5, r5
|
mvn r5, r5
|
||||||
mvn r7, r7
|
mvn r7, r7
|
||||||
tst r6, #0x100
|
tst r6, #0x100
|
||||||
|
it ne
|
||||||
movne r6, r5, lsr #24
|
movne r6, r5, lsr #24
|
||||||
tst r8, #0x100
|
tst r8, #0x100
|
||||||
|
it ne
|
||||||
movne r8, r7, lsr #24
|
movne r8, r7, lsr #24
|
||||||
mov r9, r6
|
mov r9, r6
|
||||||
ldrsh r5, [r0, #4] /* moved form [A] */
|
ldrsh r5, [r0, #4] /* moved form [A] */
|
||||||
@@ -654,8 +655,10 @@ function ff_add_pixels_clamped_arm, export=1
|
|||||||
mvn r5, r5
|
mvn r5, r5
|
||||||
mvn r7, r7
|
mvn r7, r7
|
||||||
tst r6, #0x100
|
tst r6, #0x100
|
||||||
|
it ne
|
||||||
movne r6, r5, lsr #24
|
movne r6, r5, lsr #24
|
||||||
tst r8, #0x100
|
tst r8, #0x100
|
||||||
|
it ne
|
||||||
movne r8, r7, lsr #24
|
movne r8, r7, lsr #24
|
||||||
orr r9, r9, r6, lsl #16
|
orr r9, r9, r6, lsl #16
|
||||||
ldr r4, [r1, #4] /* moved form [B] */
|
ldr r4, [r1, #4] /* moved form [B] */
|
||||||
@@ -676,8 +679,10 @@ function ff_add_pixels_clamped_arm, export=1
|
|||||||
mvn r5, r5
|
mvn r5, r5
|
||||||
mvn r7, r7
|
mvn r7, r7
|
||||||
tst r6, #0x100
|
tst r6, #0x100
|
||||||
|
it ne
|
||||||
movne r6, r5, lsr #24
|
movne r6, r5, lsr #24
|
||||||
tst r8, #0x100
|
tst r8, #0x100
|
||||||
|
it ne
|
||||||
movne r8, r7, lsr #24
|
movne r8, r7, lsr #24
|
||||||
mov r9, r6
|
mov r9, r6
|
||||||
ldrsh r5, [r0, #12] /* moved from [D] */
|
ldrsh r5, [r0, #12] /* moved from [D] */
|
||||||
@@ -692,8 +697,10 @@ function ff_add_pixels_clamped_arm, export=1
|
|||||||
mvn r5, r5
|
mvn r5, r5
|
||||||
mvn r7, r7
|
mvn r7, r7
|
||||||
tst r6, #0x100
|
tst r6, #0x100
|
||||||
|
it ne
|
||||||
movne r6, r5, lsr #24
|
movne r6, r5, lsr #24
|
||||||
tst r8, #0x100
|
tst r8, #0x100
|
||||||
|
it ne
|
||||||
movne r8, r7, lsr #24
|
movne r8, r7, lsr #24
|
||||||
orr r9, r9, r6, lsl #16
|
orr r9, r9, r6, lsl #16
|
||||||
add r0, r0, #16 /* moved from [E] */
|
add r0, r0, #16 /* moved from [E] */
|
||||||
|
@@ -47,16 +47,16 @@ function ff_put_pixels16_armv6, export=1
|
|||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r6, [r1, #8]
|
ldr r6, [r1, #8]
|
||||||
ldr r7, [r1, #12]
|
ldr r7, [r1, #12]
|
||||||
ldr r4, [r1], r2
|
ldr_post r4, r1, r2
|
||||||
strd r6, r7, [r0, #8]
|
strd r6, r7, [r0, #8]
|
||||||
ldr r9, [r1, #4]
|
ldr r9, [r1, #4]
|
||||||
strd r4, r5, [r0], r2
|
strd_post r4, r5, r0, r2
|
||||||
ldr r10, [r1, #8]
|
ldr r10, [r1, #8]
|
||||||
ldr r11, [r1, #12]
|
ldr r11, [r1, #12]
|
||||||
ldr r8, [r1], r2
|
ldr_post r8, r1, r2
|
||||||
strd r10, r11, [r0, #8]
|
strd r10, r11, [r0, #8]
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
strd r8, r9, [r0], r2
|
strd_post r8, r9, r0, r2
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
pop {r4-r11}
|
pop {r4-r11}
|
||||||
@@ -67,12 +67,12 @@ function ff_put_pixels8_armv6, export=1
|
|||||||
push {r4-r7}
|
push {r4-r7}
|
||||||
1:
|
1:
|
||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r4, [r1], r2
|
ldr_post r4, r1, r2
|
||||||
ldr r7, [r1, #4]
|
ldr r7, [r1, #4]
|
||||||
strd r4, r5, [r0], r2
|
strd_post r4, r5, r0, r2
|
||||||
ldr r6, [r1], r2
|
ldr_post r6, r1, r2
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
strd r6, r7, [r0], r2
|
strd_post r6, r7, r0, r2
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
pop {r4-r7}
|
pop {r4-r7}
|
||||||
@@ -90,7 +90,7 @@ function ff_put_pixels8_x2_armv6, export=1
|
|||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r7, [r1, #5]
|
ldr r7, [r1, #5]
|
||||||
lsr r6, r4, #8
|
lsr r6, r4, #8
|
||||||
ldr r8, [r1, r2]!
|
ldr_pre r8, r1, r2
|
||||||
orr r6, r6, r5, lsl #24
|
orr r6, r6, r5, lsl #24
|
||||||
ldr r9, [r1, #4]
|
ldr r9, [r1, #4]
|
||||||
ldr r11, [r1, #5]
|
ldr r11, [r1, #5]
|
||||||
@@ -112,9 +112,9 @@ function ff_put_pixels8_x2_armv6, export=1
|
|||||||
uhadd8 r9, r9, r11
|
uhadd8 r9, r9, r11
|
||||||
and r6, r6, r12
|
and r6, r6, r12
|
||||||
uadd8 r8, r8, r14
|
uadd8 r8, r8, r14
|
||||||
strd r4, r5, [r0], r2
|
strd_post r4, r5, r0, r2
|
||||||
uadd8 r9, r9, r6
|
uadd8 r9, r9, r6
|
||||||
strd r8, r9, [r0], r2
|
strd_post r8, r9, r0, r2
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
pop {r4-r11, pc}
|
pop {r4-r11, pc}
|
||||||
@@ -127,7 +127,7 @@ function ff_put_pixels8_y2_armv6, export=1
|
|||||||
orr r12, r12, r12, lsl #16
|
orr r12, r12, r12, lsl #16
|
||||||
ldr r4, [r1]
|
ldr r4, [r1]
|
||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r6, [r1, r2]!
|
ldr_pre r6, r1, r2
|
||||||
ldr r7, [r1, #4]
|
ldr r7, [r1, #4]
|
||||||
1:
|
1:
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
@@ -136,7 +136,7 @@ function ff_put_pixels8_y2_armv6, export=1
|
|||||||
uhadd8 r9, r5, r7
|
uhadd8 r9, r5, r7
|
||||||
eor r11, r5, r7
|
eor r11, r5, r7
|
||||||
and r10, r10, r12
|
and r10, r10, r12
|
||||||
ldr r4, [r1, r2]!
|
ldr_pre r4, r1, r2
|
||||||
uadd8 r8, r8, r10
|
uadd8 r8, r8, r10
|
||||||
and r11, r11, r12
|
and r11, r11, r12
|
||||||
uadd8 r9, r9, r11
|
uadd8 r9, r9, r11
|
||||||
@@ -148,11 +148,11 @@ function ff_put_pixels8_y2_armv6, export=1
|
|||||||
eor r7, r5, r7
|
eor r7, r5, r7
|
||||||
uadd8 r10, r10, r6
|
uadd8 r10, r10, r6
|
||||||
and r7, r7, r12
|
and r7, r7, r12
|
||||||
ldr r6, [r1, r2]!
|
ldr_pre r6, r1, r2
|
||||||
uadd8 r11, r11, r7
|
uadd8 r11, r11, r7
|
||||||
strd r8, r9, [r0], r2
|
strd_post r8, r9, r0, r2
|
||||||
ldr r7, [r1, #4]
|
ldr r7, [r1, #4]
|
||||||
strd r10, r11, [r0], r2
|
strd_post r10, r11, r0, r2
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
pop {r4-r11}
|
pop {r4-r11}
|
||||||
@@ -166,7 +166,7 @@ function ff_put_pixels8_x2_no_rnd_armv6, export=1
|
|||||||
ldr r4, [r1]
|
ldr r4, [r1]
|
||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r7, [r1, #5]
|
ldr r7, [r1, #5]
|
||||||
ldr r8, [r1, r2]!
|
ldr_pre r8, r1, r2
|
||||||
ldr r9, [r1, #4]
|
ldr r9, [r1, #4]
|
||||||
ldr r14, [r1, #5]
|
ldr r14, [r1, #5]
|
||||||
add r1, r1, r2
|
add r1, r1, r2
|
||||||
@@ -191,16 +191,16 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1
|
|||||||
push {r4-r9, lr}
|
push {r4-r9, lr}
|
||||||
ldr r4, [r1]
|
ldr r4, [r1]
|
||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
ldr r6, [r1, r2]!
|
ldr_pre r6, r1, r2
|
||||||
ldr r7, [r1, #4]
|
ldr r7, [r1, #4]
|
||||||
1:
|
1:
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
uhadd8 r8, r4, r6
|
uhadd8 r8, r4, r6
|
||||||
ldr r4, [r1, r2]!
|
ldr_pre r4, r1, r2
|
||||||
uhadd8 r9, r5, r7
|
uhadd8 r9, r5, r7
|
||||||
ldr r5, [r1, #4]
|
ldr r5, [r1, #4]
|
||||||
uhadd8 r12, r4, r6
|
uhadd8 r12, r4, r6
|
||||||
ldr r6, [r1, r2]!
|
ldr_pre r6, r1, r2
|
||||||
uhadd8 r14, r5, r7
|
uhadd8 r14, r5, r7
|
||||||
ldr r7, [r1, #4]
|
ldr r7, [r1, #4]
|
||||||
stm r0, {r8,r9}
|
stm r0, {r8,r9}
|
||||||
@@ -220,44 +220,44 @@ function ff_avg_pixels8_armv6, export=1
|
|||||||
orr lr, lr, lr, lsl #16
|
orr lr, lr, lr, lsl #16
|
||||||
ldrd r4, r5, [r0]
|
ldrd r4, r5, [r0]
|
||||||
ldr r10, [r1, #4]
|
ldr r10, [r1, #4]
|
||||||
ldr r9, [r1], r2
|
ldr_post r9, r1, r2
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
1:
|
1:
|
||||||
pld [r1, r2]
|
pld [r1, r2]
|
||||||
eor r8, r4, r9
|
eor r8, r4, r9
|
||||||
uhadd8 r4, r4, r9
|
uhadd8 r4, r4, r9
|
||||||
eor r12, r5, r10
|
eor r12, r5, r10
|
||||||
ldrd r6, r7, [r0, r2]
|
ldrd_reg r6, r7, r0, r2
|
||||||
uhadd8 r5, r5, r10
|
uhadd8 r5, r5, r10
|
||||||
and r8, r8, lr
|
and r8, r8, lr
|
||||||
ldr r10, [r1, #4]
|
ldr r10, [r1, #4]
|
||||||
and r12, r12, lr
|
and r12, r12, lr
|
||||||
uadd8 r4, r4, r8
|
uadd8 r4, r4, r8
|
||||||
ldr r9, [r1], r2
|
ldr_post r9, r1, r2
|
||||||
eor r8, r6, r9
|
eor r8, r6, r9
|
||||||
uadd8 r5, r5, r12
|
uadd8 r5, r5, r12
|
||||||
pld [r1, r2, lsl #1]
|
pld [r1, r2, lsl #1]
|
||||||
eor r12, r7, r10
|
eor r12, r7, r10
|
||||||
uhadd8 r6, r6, r9
|
uhadd8 r6, r6, r9
|
||||||
strd r4, r5, [r0], r2
|
strd_post r4, r5, r0, r2
|
||||||
uhadd8 r7, r7, r10
|
uhadd8 r7, r7, r10
|
||||||
beq 2f
|
beq 2f
|
||||||
and r8, r8, lr
|
and r8, r8, lr
|
||||||
ldrd r4, r5, [r0, r2]
|
ldrd_reg r4, r5, r0, r2
|
||||||
uadd8 r6, r6, r8
|
uadd8 r6, r6, r8
|
||||||
ldr r10, [r1, #4]
|
ldr r10, [r1, #4]
|
||||||
and r12, r12, lr
|
and r12, r12, lr
|
||||||
subs r3, r3, #2
|
subs r3, r3, #2
|
||||||
uadd8 r7, r7, r12
|
uadd8 r7, r7, r12
|
||||||
ldr r9, [r1], r2
|
ldr_post r9, r1, r2
|
||||||
strd r6, r7, [r0], r2
|
strd_post r6, r7, r0, r2
|
||||||
b 1b
|
b 1b
|
||||||
2:
|
2:
|
||||||
and r8, r8, lr
|
and r8, r8, lr
|
||||||
and r12, r12, lr
|
and r12, r12, lr
|
||||||
uadd8 r6, r6, r8
|
uadd8 r6, r6, r8
|
||||||
uadd8 r7, r7, r12
|
uadd8 r7, r7, r12
|
||||||
strd r6, r7, [r0], r2
|
strd_post r6, r7, r0, r2
|
||||||
|
|
||||||
pop {r4-r10, pc}
|
pop {r4-r10, pc}
|
||||||
endfunc
|
endfunc
|
||||||
@@ -284,7 +284,7 @@ function ff_add_pixels_clamped_armv6, export=1
|
|||||||
orr r6, r8, r5, lsl #8
|
orr r6, r8, r5, lsl #8
|
||||||
orr r7, r4, lr, lsl #8
|
orr r7, r4, lr, lsl #8
|
||||||
subs r3, r3, #1
|
subs r3, r3, #1
|
||||||
strd r6, r7, [r1], r2
|
strd_post r6, r7, r1, r2
|
||||||
bgt 1b
|
bgt 1b
|
||||||
pop {r4-r8,pc}
|
pop {r4-r8,pc}
|
||||||
endfunc
|
endfunc
|
||||||
@@ -294,7 +294,7 @@ function ff_get_pixels_armv6, export=1
|
|||||||
push {r4-r8, lr}
|
push {r4-r8, lr}
|
||||||
mov lr, #8
|
mov lr, #8
|
||||||
1:
|
1:
|
||||||
ldrd r4, r5, [r1], r2
|
ldrd_post r4, r5, r1, r2
|
||||||
subs lr, lr, #1
|
subs lr, lr, #1
|
||||||
uxtb16 r6, r4
|
uxtb16 r6, r4
|
||||||
uxtb16 r4, r4, ror #8
|
uxtb16 r4, r4, ror #8
|
||||||
@@ -317,8 +317,8 @@ function ff_diff_pixels_armv6, export=1
|
|||||||
push {r4-r9, lr}
|
push {r4-r9, lr}
|
||||||
mov lr, #8
|
mov lr, #8
|
||||||
1:
|
1:
|
||||||
ldrd r4, r5, [r1], r3
|
ldrd_post r4, r5, r1, r3
|
||||||
ldrd r6, r7, [r2], r3
|
ldrd_post r6, r7, r2, r3
|
||||||
uxtb16 r8, r4
|
uxtb16 r8, r4
|
||||||
uxtb16 r4, r4, ror #8
|
uxtb16 r4, r4, ror #8
|
||||||
uxtb16 r9, r6
|
uxtb16 r9, r6
|
||||||
@@ -492,19 +492,19 @@ function ff_pix_abs8_armv6, export=1
|
|||||||
push {r4-r9, lr}
|
push {r4-r9, lr}
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
mov lr, #0
|
mov lr, #0
|
||||||
ldrd r4, r5, [r1], r3
|
ldrd_post r4, r5, r1, r3
|
||||||
1:
|
1:
|
||||||
subs r12, r12, #2
|
subs r12, r12, #2
|
||||||
ldr r7, [r2, #4]
|
ldr r7, [r2, #4]
|
||||||
ldr r6, [r2], r3
|
ldr_post r6, r2, r3
|
||||||
ldrd r8, r9, [r1], r3
|
ldrd_post r8, r9, r1, r3
|
||||||
usada8 r0, r4, r6, r0
|
usada8 r0, r4, r6, r0
|
||||||
pld [r2, r3]
|
pld [r2, r3]
|
||||||
usada8 lr, r5, r7, lr
|
usada8 lr, r5, r7, lr
|
||||||
ldr r7, [r2, #4]
|
ldr r7, [r2, #4]
|
||||||
ldr r6, [r2], r3
|
ldr_post r6, r2, r3
|
||||||
beq 2f
|
beq 2f
|
||||||
ldrd r4, r5, [r1], r3
|
ldrd_post r4, r5, r1, r3
|
||||||
usada8 r0, r8, r6, r0
|
usada8 r0, r8, r6, r0
|
||||||
pld [r2, r3]
|
pld [r2, r3]
|
||||||
usada8 lr, r9, r7, lr
|
usada8 lr, r9, r7, lr
|
||||||
@@ -613,7 +613,7 @@ function ff_pix_sum_armv6, export=1
|
|||||||
ldr r7, [r0, #12]
|
ldr r7, [r0, #12]
|
||||||
usada8 r2, r6, lr, r2
|
usada8 r2, r6, lr, r2
|
||||||
beq 2f
|
beq 2f
|
||||||
ldr r4, [r0, r1]!
|
ldr_pre r4, r0, r1
|
||||||
usada8 r3, r7, lr, r3
|
usada8 r3, r7, lr, r3
|
||||||
bgt 1b
|
bgt 1b
|
||||||
2:
|
2:
|
||||||
|
@@ -75,12 +75,12 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block)
|
|||||||
|
|
||||||
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
|
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
|
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
ff_put_pixels_clamped = c->put_pixels_clamped;
|
ff_put_pixels_clamped = c->put_pixels_clamped;
|
||||||
ff_add_pixels_clamped = c->add_pixels_clamped;
|
ff_add_pixels_clamped = c->add_pixels_clamped;
|
||||||
|
|
||||||
if (!avctx->lowres) {
|
if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) {
|
||||||
if(avctx->idct_algo == FF_IDCT_AUTO ||
|
if(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||||
avctx->idct_algo == FF_IDCT_ARM){
|
avctx->idct_algo == FF_IDCT_ARM){
|
||||||
c->idct_put = j_rev_dct_arm_put;
|
c->idct_put = j_rev_dct_arm_put;
|
||||||
|
@@ -29,8 +29,9 @@ void ff_prefetch_arm(void *mem, int stride, int h);
|
|||||||
|
|
||||||
void av_cold ff_dsputil_init_armv5te(DSPContext* c, AVCodecContext *avctx)
|
void av_cold ff_dsputil_init_armv5te(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
if (!avctx->lowres && (avctx->idct_algo == FF_IDCT_AUTO ||
|
if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
|
||||||
avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
|
(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||||
|
avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
|
||||||
c->idct_put = ff_simple_idct_put_armv5te;
|
c->idct_put = ff_simple_idct_put_armv5te;
|
||||||
c->idct_add = ff_simple_idct_add_armv5te;
|
c->idct_add = ff_simple_idct_add_armv5te;
|
||||||
c->idct = ff_simple_idct_armv5te;
|
c->idct = ff_simple_idct_armv5te;
|
||||||
|
@@ -72,10 +72,11 @@ int ff_pix_sum_armv6(uint8_t *pix, int line_size);
|
|||||||
|
|
||||||
void av_cold ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx)
|
void av_cold ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
|
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
if (!avctx->lowres && (avctx->idct_algo == FF_IDCT_AUTO ||
|
if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
|
||||||
avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) {
|
(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||||
|
avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) {
|
||||||
c->idct_put = ff_simple_idct_put_armv6;
|
c->idct_put = ff_simple_idct_put_armv6;
|
||||||
c->idct_add = ff_simple_idct_add_armv6;
|
c->idct_add = ff_simple_idct_add_armv6;
|
||||||
c->idct = ff_simple_idct_armv6;
|
c->idct = ff_simple_idct_armv6;
|
||||||
@@ -105,8 +106,9 @@ void av_cold ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->avg_pixels_tab[1][0] = ff_avg_pixels8_armv6;
|
c->avg_pixels_tab[1][0] = ff_avg_pixels8_armv6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!high_bit_depth)
|
||||||
|
c->get_pixels = ff_get_pixels_armv6;
|
||||||
c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
|
c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
|
||||||
c->get_pixels = ff_get_pixels_armv6;
|
|
||||||
c->diff_pixels = ff_diff_pixels_armv6;
|
c->diff_pixels = ff_diff_pixels_armv6;
|
||||||
|
|
||||||
c->pix_abs[0][0] = ff_pix_abs16_armv6;
|
c->pix_abs[0][0] = ff_pix_abs16_armv6;
|
||||||
|
@@ -143,14 +143,6 @@ void ff_vector_fmul_window_neon(float *dst, const float *src0,
|
|||||||
const float *src1, const float *win, int len);
|
const float *src1, const float *win, int len);
|
||||||
void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul,
|
void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul,
|
||||||
int len);
|
int len);
|
||||||
void ff_vector_fmul_sv_scalar_2_neon(float *dst, const float *src,
|
|
||||||
const float **vp, float mul, int len);
|
|
||||||
void ff_vector_fmul_sv_scalar_4_neon(float *dst, const float *src,
|
|
||||||
const float **vp, float mul, int len);
|
|
||||||
void ff_sv_fmul_scalar_2_neon(float *dst, const float **vp, float mul,
|
|
||||||
int len);
|
|
||||||
void ff_sv_fmul_scalar_4_neon(float *dst, const float **vp, float mul,
|
|
||||||
int len);
|
|
||||||
void ff_butterflies_float_neon(float *v1, float *v2, int len);
|
void ff_butterflies_float_neon(float *v1, float *v2, int len);
|
||||||
float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len);
|
float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len);
|
||||||
void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
|
void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
|
||||||
@@ -160,6 +152,8 @@ void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1,
|
|||||||
|
|
||||||
void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
|
void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
|
||||||
int len);
|
int len);
|
||||||
|
void ff_vector_clip_int32_neon(int32_t *dst, const int32_t *src, int32_t min,
|
||||||
|
int32_t max, unsigned int len);
|
||||||
|
|
||||||
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
|
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
|
||||||
|
|
||||||
@@ -173,9 +167,9 @@ void ff_apply_window_int16_neon(int16_t *dst, const int16_t *src,
|
|||||||
|
|
||||||
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
|
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
|
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
if (!avctx->lowres) {
|
if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) {
|
||||||
if (avctx->idct_algo == FF_IDCT_AUTO ||
|
if (avctx->idct_algo == FF_IDCT_AUTO ||
|
||||||
avctx->idct_algo == FF_IDCT_SIMPLENEON) {
|
avctx->idct_algo == FF_IDCT_SIMPLENEON) {
|
||||||
c->idct_put = ff_simple_idct_put_neon;
|
c->idct_put = ff_simple_idct_put_neon;
|
||||||
@@ -316,12 +310,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
|
|||||||
c->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
|
c->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
|
||||||
c->vector_fmul_add = ff_vector_fmul_add_neon;
|
c->vector_fmul_add = ff_vector_fmul_add_neon;
|
||||||
c->vector_clipf = ff_vector_clipf_neon;
|
c->vector_clipf = ff_vector_clipf_neon;
|
||||||
|
c->vector_clip_int32 = ff_vector_clip_int32_neon;
|
||||||
c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon;
|
|
||||||
c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon;
|
|
||||||
|
|
||||||
c->sv_fmul_scalar[0] = ff_sv_fmul_scalar_2_neon;
|
|
||||||
c->sv_fmul_scalar[1] = ff_sv_fmul_scalar_4_neon;
|
|
||||||
|
|
||||||
if (CONFIG_VORBIS_DECODER)
|
if (CONFIG_VORBIS_DECODER)
|
||||||
c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon;
|
c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon;
|
||||||
|
@@ -155,7 +155,7 @@ static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h)
|
|||||||
void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx)
|
void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
int mm_flags = AV_CPU_FLAG_IWMMXT; /* multimedia extension flags */
|
int mm_flags = AV_CPU_FLAG_IWMMXT; /* multimedia extension flags */
|
||||||
const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
|
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
if (avctx->dsp_mask) {
|
if (avctx->dsp_mask) {
|
||||||
if (avctx->dsp_mask & AV_CPU_FLAG_FORCE)
|
if (avctx->dsp_mask & AV_CPU_FLAG_FORCE)
|
||||||
|
@@ -531,6 +531,7 @@ function ff_vorbis_inverse_coupling_neon, export=1
|
|||||||
|
|
||||||
2: vst1.32 {d2-d3}, [r3, :128]!
|
2: vst1.32 {d2-d3}, [r3, :128]!
|
||||||
vst1.32 {d0-d1}, [r12,:128]!
|
vst1.32 {d0-d1}, [r12,:128]!
|
||||||
|
it lt
|
||||||
bxlt lr
|
bxlt lr
|
||||||
|
|
||||||
3: vld1.32 {d2-d3}, [r1,:128]
|
3: vld1.32 {d2-d3}, [r1,:128]
|
||||||
@@ -575,6 +576,7 @@ NOVFP vdup.32 q8, r2
|
|||||||
2: vst1.32 {q2},[r0,:128]!
|
2: vst1.32 {q2},[r0,:128]!
|
||||||
vst1.32 {q3},[r0,:128]!
|
vst1.32 {q3},[r0,:128]!
|
||||||
ands len, len, #15
|
ands len, len, #15
|
||||||
|
it eq
|
||||||
bxeq lr
|
bxeq lr
|
||||||
3: vld1.32 {q0},[r1,:128]!
|
3: vld1.32 {q0},[r1,:128]!
|
||||||
vmul.f32 q0, q0, q8
|
vmul.f32 q0, q0, q8
|
||||||
@@ -585,109 +587,6 @@ NOVFP vdup.32 q8, r2
|
|||||||
.unreq len
|
.unreq len
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function ff_vector_fmul_sv_scalar_2_neon, export=1
|
|
||||||
VFP vdup.32 d16, d0[0]
|
|
||||||
NOVFP vdup.32 d16, r3
|
|
||||||
NOVFP ldr r3, [sp]
|
|
||||||
vld1.32 {d0},[r1,:64]!
|
|
||||||
vld1.32 {d1},[r1,:64]!
|
|
||||||
1: subs r3, r3, #4
|
|
||||||
vmul.f32 d4, d0, d16
|
|
||||||
vmul.f32 d5, d1, d16
|
|
||||||
ldr r12, [r2], #4
|
|
||||||
vld1.32 {d2},[r12,:64]
|
|
||||||
ldr r12, [r2], #4
|
|
||||||
vld1.32 {d3},[r12,:64]
|
|
||||||
vmul.f32 d4, d4, d2
|
|
||||||
vmul.f32 d5, d5, d3
|
|
||||||
beq 2f
|
|
||||||
vld1.32 {d0},[r1,:64]!
|
|
||||||
vld1.32 {d1},[r1,:64]!
|
|
||||||
vst1.32 {d4},[r0,:64]!
|
|
||||||
vst1.32 {d5},[r0,:64]!
|
|
||||||
b 1b
|
|
||||||
2: vst1.32 {d4},[r0,:64]!
|
|
||||||
vst1.32 {d5},[r0,:64]!
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
function ff_vector_fmul_sv_scalar_4_neon, export=1
|
|
||||||
VFP vdup.32 q10, d0[0]
|
|
||||||
NOVFP vdup.32 q10, r3
|
|
||||||
NOVFP ldr r3, [sp]
|
|
||||||
push {lr}
|
|
||||||
bics lr, r3, #7
|
|
||||||
beq 3f
|
|
||||||
vld1.32 {q0},[r1,:128]!
|
|
||||||
vld1.32 {q2},[r1,:128]!
|
|
||||||
1: ldr r12, [r2], #4
|
|
||||||
vld1.32 {q1},[r12,:128]
|
|
||||||
ldr r12, [r2], #4
|
|
||||||
vld1.32 {q3},[r12,:128]
|
|
||||||
vmul.f32 q8, q0, q10
|
|
||||||
vmul.f32 q8, q8, q1
|
|
||||||
vmul.f32 q9, q2, q10
|
|
||||||
vmul.f32 q9, q9, q3
|
|
||||||
subs lr, lr, #8
|
|
||||||
beq 2f
|
|
||||||
vld1.32 {q0},[r1,:128]!
|
|
||||||
vld1.32 {q2},[r1,:128]!
|
|
||||||
vst1.32 {q8},[r0,:128]!
|
|
||||||
vst1.32 {q9},[r0,:128]!
|
|
||||||
b 1b
|
|
||||||
2: vst1.32 {q8},[r0,:128]!
|
|
||||||
vst1.32 {q9},[r0,:128]!
|
|
||||||
ands r3, r3, #7
|
|
||||||
popeq {pc}
|
|
||||||
3: vld1.32 {q0},[r1,:128]!
|
|
||||||
ldr r12, [r2], #4
|
|
||||||
vld1.32 {q1},[r12,:128]
|
|
||||||
vmul.f32 q0, q0, q10
|
|
||||||
vmul.f32 q0, q0, q1
|
|
||||||
vst1.32 {q0},[r0,:128]!
|
|
||||||
subs r3, r3, #4
|
|
||||||
bgt 3b
|
|
||||||
pop {pc}
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
function ff_sv_fmul_scalar_2_neon, export=1
|
|
||||||
VFP len .req r2
|
|
||||||
NOVFP len .req r3
|
|
||||||
VFP vdup.32 q8, d0[0]
|
|
||||||
NOVFP vdup.32 q8, r2
|
|
||||||
ldr r12, [r1], #4
|
|
||||||
vld1.32 {d0},[r12,:64]
|
|
||||||
ldr r12, [r1], #4
|
|
||||||
vld1.32 {d1},[r12,:64]
|
|
||||||
1: vmul.f32 q1, q0, q8
|
|
||||||
subs len, len, #4
|
|
||||||
beq 2f
|
|
||||||
ldr r12, [r1], #4
|
|
||||||
vld1.32 {d0},[r12,:64]
|
|
||||||
ldr r12, [r1], #4
|
|
||||||
vld1.32 {d1},[r12,:64]
|
|
||||||
vst1.32 {q1},[r0,:128]!
|
|
||||||
b 1b
|
|
||||||
2: vst1.32 {q1},[r0,:128]!
|
|
||||||
bx lr
|
|
||||||
.unreq len
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
function ff_sv_fmul_scalar_4_neon, export=1
|
|
||||||
VFP len .req r2
|
|
||||||
NOVFP len .req r3
|
|
||||||
VFP vdup.32 q8, d0[0]
|
|
||||||
NOVFP vdup.32 q8, r2
|
|
||||||
1: ldr r12, [r1], #4
|
|
||||||
vld1.32 {q0},[r12,:128]
|
|
||||||
vmul.f32 q0, q0, q8
|
|
||||||
vst1.32 {q0},[r0,:128]!
|
|
||||||
subs len, len, #4
|
|
||||||
bgt 1b
|
|
||||||
bx lr
|
|
||||||
.unreq len
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
function ff_butterflies_float_neon, export=1
|
function ff_butterflies_float_neon, export=1
|
||||||
1: vld1.32 {q0},[r0,:128]
|
1: vld1.32 {q0},[r0,:128]
|
||||||
vld1.32 {q1},[r1,:128]
|
vld1.32 {q1},[r1,:128]
|
||||||
@@ -812,3 +711,19 @@ function ff_apply_window_int16_neon, export=1
|
|||||||
|
|
||||||
pop {r4,pc}
|
pop {r4,pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
function ff_vector_clip_int32_neon, export=1
|
||||||
|
vdup.32 q0, r2
|
||||||
|
vdup.32 q1, r3
|
||||||
|
ldr r2, [sp]
|
||||||
|
1:
|
||||||
|
vld1.32 {q2-q3}, [r1,:128]!
|
||||||
|
vmin.s32 q2, q2, q1
|
||||||
|
vmin.s32 q3, q3, q1
|
||||||
|
vmax.s32 q2, q2, q0
|
||||||
|
vmax.s32 q3, q3, q0
|
||||||
|
vst1.32 {q2-q3}, [r0,:128]!
|
||||||
|
subs r2, r2, #8
|
||||||
|
bgt 1b
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
@@ -55,18 +55,23 @@ function ff_vector_fmul_vfp, export=1
|
|||||||
1:
|
1:
|
||||||
subs r3, r3, #16
|
subs r3, r3, #16
|
||||||
vmul.f32 s12, s4, s12
|
vmul.f32 s12, s4, s12
|
||||||
|
itttt ge
|
||||||
vldmiage r1!, {s16-s19}
|
vldmiage r1!, {s16-s19}
|
||||||
vldmiage r2!, {s24-s27}
|
vldmiage r2!, {s24-s27}
|
||||||
vldmiage r1!, {s20-s23}
|
vldmiage r1!, {s20-s23}
|
||||||
vldmiage r2!, {s28-s31}
|
vldmiage r2!, {s28-s31}
|
||||||
|
it ge
|
||||||
vmulge.f32 s24, s16, s24
|
vmulge.f32 s24, s16, s24
|
||||||
vstmia r0!, {s8-s11}
|
vstmia r0!, {s8-s11}
|
||||||
vstmia r0!, {s12-s15}
|
vstmia r0!, {s12-s15}
|
||||||
|
it ge
|
||||||
vmulge.f32 s28, s20, s28
|
vmulge.f32 s28, s20, s28
|
||||||
|
itttt gt
|
||||||
vldmiagt r1!, {s0-s3}
|
vldmiagt r1!, {s0-s3}
|
||||||
vldmiagt r2!, {s8-s11}
|
vldmiagt r2!, {s8-s11}
|
||||||
vldmiagt r1!, {s4-s7}
|
vldmiagt r1!, {s4-s7}
|
||||||
vldmiagt r2!, {s12-s15}
|
vldmiagt r2!, {s12-s15}
|
||||||
|
ittt ge
|
||||||
vmulge.f32 s8, s0, s8
|
vmulge.f32 s8, s0, s8
|
||||||
vstmiage r0!, {s24-s27}
|
vstmiage r0!, {s24-s27}
|
||||||
vstmiage r0!, {s28-s31}
|
vstmiage r0!, {s28-s31}
|
||||||
@@ -97,33 +102,49 @@ function ff_vector_fmul_reverse_vfp, export=1
|
|||||||
vmul.f32 s11, s0, s11
|
vmul.f32 s11, s0, s11
|
||||||
1:
|
1:
|
||||||
subs r3, r3, #16
|
subs r3, r3, #16
|
||||||
|
it ge
|
||||||
vldmdbge r2!, {s16-s19}
|
vldmdbge r2!, {s16-s19}
|
||||||
vmul.f32 s12, s7, s12
|
vmul.f32 s12, s7, s12
|
||||||
|
it ge
|
||||||
vldmiage r1!, {s24-s27}
|
vldmiage r1!, {s24-s27}
|
||||||
vmul.f32 s13, s6, s13
|
vmul.f32 s13, s6, s13
|
||||||
|
it ge
|
||||||
vldmdbge r2!, {s20-s23}
|
vldmdbge r2!, {s20-s23}
|
||||||
vmul.f32 s14, s5, s14
|
vmul.f32 s14, s5, s14
|
||||||
|
it ge
|
||||||
vldmiage r1!, {s28-s31}
|
vldmiage r1!, {s28-s31}
|
||||||
vmul.f32 s15, s4, s15
|
vmul.f32 s15, s4, s15
|
||||||
|
it ge
|
||||||
vmulge.f32 s24, s19, s24
|
vmulge.f32 s24, s19, s24
|
||||||
|
it gt
|
||||||
vldmdbgt r2!, {s0-s3}
|
vldmdbgt r2!, {s0-s3}
|
||||||
|
it ge
|
||||||
vmulge.f32 s25, s18, s25
|
vmulge.f32 s25, s18, s25
|
||||||
vstmia r0!, {s8-s13}
|
vstmia r0!, {s8-s13}
|
||||||
|
it ge
|
||||||
vmulge.f32 s26, s17, s26
|
vmulge.f32 s26, s17, s26
|
||||||
|
it gt
|
||||||
vldmiagt r1!, {s8-s11}
|
vldmiagt r1!, {s8-s11}
|
||||||
|
itt ge
|
||||||
vmulge.f32 s27, s16, s27
|
vmulge.f32 s27, s16, s27
|
||||||
vmulge.f32 s28, s23, s28
|
vmulge.f32 s28, s23, s28
|
||||||
|
it gt
|
||||||
vldmdbgt r2!, {s4-s7}
|
vldmdbgt r2!, {s4-s7}
|
||||||
|
it ge
|
||||||
vmulge.f32 s29, s22, s29
|
vmulge.f32 s29, s22, s29
|
||||||
vstmia r0!, {s14-s15}
|
vstmia r0!, {s14-s15}
|
||||||
|
ittt ge
|
||||||
vmulge.f32 s30, s21, s30
|
vmulge.f32 s30, s21, s30
|
||||||
vmulge.f32 s31, s20, s31
|
vmulge.f32 s31, s20, s31
|
||||||
vmulge.f32 s8, s3, s8
|
vmulge.f32 s8, s3, s8
|
||||||
|
it gt
|
||||||
vldmiagt r1!, {s12-s15}
|
vldmiagt r1!, {s12-s15}
|
||||||
|
itttt ge
|
||||||
vmulge.f32 s9, s2, s9
|
vmulge.f32 s9, s2, s9
|
||||||
vmulge.f32 s10, s1, s10
|
vmulge.f32 s10, s1, s10
|
||||||
vstmiage r0!, {s24-s27}
|
vstmiage r0!, {s24-s27}
|
||||||
vmulge.f32 s11, s0, s11
|
vmulge.f32 s11, s0, s11
|
||||||
|
it ge
|
||||||
vstmiage r0!, {s28-s31}
|
vstmiage r0!, {s28-s31}
|
||||||
bgt 1b
|
bgt 1b
|
||||||
|
|
||||||
|
@@ -75,9 +75,9 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
function fft4_neon
|
function fft4_neon
|
||||||
vld1.16 {d0-d1}, [r0,:128]
|
vld1.16 {d0-d1}, [r0]
|
||||||
fft4 d0, d1, d2, d3
|
fft4 d0, d1, d2, d3
|
||||||
vst1.16 {d0-d1}, [r0,:128]
|
vst1.16 {d0-d1}, [r0]
|
||||||
bx lr
|
bx lr
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -349,9 +349,7 @@ function ff_fft_permute_neon, export=1
|
|||||||
pop {r4,pc}
|
pop {r4,pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
.section .rodata
|
const fft_tab_neon
|
||||||
.align 4
|
|
||||||
fft_tab_neon:
|
|
||||||
.word fft4_neon
|
.word fft4_neon
|
||||||
.word fft8_neon
|
.word fft8_neon
|
||||||
.word fft16_neon
|
.word fft16_neon
|
||||||
@@ -367,8 +365,12 @@ fft_tab_neon:
|
|||||||
.word fft16384_neon
|
.word fft16384_neon
|
||||||
.word fft32768_neon
|
.word fft32768_neon
|
||||||
.word fft65536_neon
|
.word fft65536_neon
|
||||||
ELF .size fft_tab_neon, . - fft_tab_neon
|
endconst
|
||||||
|
|
||||||
.align 4
|
const pmmp, align=4
|
||||||
pmmp: .float +1.0, -1.0, -1.0, +1.0
|
.float +1.0, -1.0, -1.0, +1.0
|
||||||
mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
|
endconst
|
||||||
|
|
||||||
|
const mppm, align=4
|
||||||
|
.float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
|
||||||
|
endconst
|
||||||
|
@@ -71,6 +71,7 @@ endfunc
|
|||||||
|
|
||||||
function ff_float_to_int16_interleave_neon, export=1
|
function ff_float_to_int16_interleave_neon, export=1
|
||||||
cmp r3, #2
|
cmp r3, #2
|
||||||
|
itt lt
|
||||||
ldrlt r1, [r1]
|
ldrlt r1, [r1]
|
||||||
blt ff_float_to_int16_neon
|
blt ff_float_to_int16_neon
|
||||||
bne 4f
|
bne 4f
|
||||||
@@ -196,6 +197,7 @@ function ff_float_to_int16_interleave_neon, export=1
|
|||||||
vst1.64 {d3}, [r8], ip
|
vst1.64 {d3}, [r8], ip
|
||||||
vst1.64 {d7}, [r8], ip
|
vst1.64 {d7}, [r8], ip
|
||||||
subs r3, r3, #4
|
subs r3, r3, #4
|
||||||
|
it eq
|
||||||
popeq {r4-r8,pc}
|
popeq {r4-r8,pc}
|
||||||
cmp r3, #4
|
cmp r3, #4
|
||||||
add r0, r0, #8
|
add r0, r0, #8
|
||||||
@@ -305,6 +307,7 @@ function ff_float_to_int16_interleave_neon, export=1
|
|||||||
vst1.32 {d23[1]}, [r8], ip
|
vst1.32 {d23[1]}, [r8], ip
|
||||||
8: subs r3, r3, #2
|
8: subs r3, r3, #2
|
||||||
add r0, r0, #4
|
add r0, r0, #4
|
||||||
|
it eq
|
||||||
popeq {r4-r8,pc}
|
popeq {r4-r8,pc}
|
||||||
|
|
||||||
@ 1 channel
|
@ 1 channel
|
||||||
@@ -354,6 +357,7 @@ function ff_float_to_int16_interleave_neon, export=1
|
|||||||
vst1.16 {d2[3]}, [r5,:16], ip
|
vst1.16 {d2[3]}, [r5,:16], ip
|
||||||
vst1.16 {d3[1]}, [r5,:16], ip
|
vst1.16 {d3[1]}, [r5,:16], ip
|
||||||
vst1.16 {d3[3]}, [r5,:16], ip
|
vst1.16 {d3[3]}, [r5,:16], ip
|
||||||
|
it eq
|
||||||
popeq {r4-r8,pc}
|
popeq {r4-r8,pc}
|
||||||
vld1.64 {d0-d1}, [r4,:128]!
|
vld1.64 {d0-d1}, [r4,:128]!
|
||||||
vcvt.s32.f32 q0, q0, #16
|
vcvt.s32.f32 q0, q0, #16
|
||||||
|
@@ -46,6 +46,7 @@ function ff_float_to_int16_vfp, export=1
|
|||||||
vmov r5, r6, s2, s3
|
vmov r5, r6, s2, s3
|
||||||
vmov r7, r8, s4, s5
|
vmov r7, r8, s4, s5
|
||||||
vmov ip, lr, s6, s7
|
vmov ip, lr, s6, s7
|
||||||
|
it gt
|
||||||
vldmiagt r1!, {s16-s23}
|
vldmiagt r1!, {s16-s23}
|
||||||
ssat r4, #16, r4
|
ssat r4, #16, r4
|
||||||
ssat r3, #16, r3
|
ssat r3, #16, r3
|
||||||
@@ -53,10 +54,12 @@ function ff_float_to_int16_vfp, export=1
|
|||||||
ssat r5, #16, r5
|
ssat r5, #16, r5
|
||||||
pkhbt r3, r3, r4, lsl #16
|
pkhbt r3, r3, r4, lsl #16
|
||||||
pkhbt r4, r5, r6, lsl #16
|
pkhbt r4, r5, r6, lsl #16
|
||||||
|
itttt gt
|
||||||
vcvtgt.s32.f32 s0, s16
|
vcvtgt.s32.f32 s0, s16
|
||||||
vcvtgt.s32.f32 s1, s17
|
vcvtgt.s32.f32 s1, s17
|
||||||
vcvtgt.s32.f32 s2, s18
|
vcvtgt.s32.f32 s2, s18
|
||||||
vcvtgt.s32.f32 s3, s19
|
vcvtgt.s32.f32 s3, s19
|
||||||
|
itttt gt
|
||||||
vcvtgt.s32.f32 s4, s20
|
vcvtgt.s32.f32 s4, s20
|
||||||
vcvtgt.s32.f32 s5, s21
|
vcvtgt.s32.f32 s5, s21
|
||||||
vcvtgt.s32.f32 s6, s22
|
vcvtgt.s32.f32 s6, s22
|
||||||
|
@@ -71,7 +71,9 @@ function ff_\type\()_h264_chroma_mc8_neon, export=1
|
|||||||
pld [r1]
|
pld [r1]
|
||||||
pld [r1, r2]
|
pld [r1, r2]
|
||||||
|
|
||||||
muls r7, r4, r5
|
A muls r7, r4, r5
|
||||||
|
T mul r7, r4, r5
|
||||||
|
T cmp r7, #0
|
||||||
rsb r6, r7, r5, lsl #3
|
rsb r6, r7, r5, lsl #3
|
||||||
rsb ip, r7, r4, lsl #3
|
rsb ip, r7, r4, lsl #3
|
||||||
sub r4, r7, r4, lsl #3
|
sub r4, r7, r4, lsl #3
|
||||||
@@ -197,7 +199,9 @@ function ff_\type\()_h264_chroma_mc4_neon, export=1
|
|||||||
pld [r1]
|
pld [r1]
|
||||||
pld [r1, r2]
|
pld [r1, r2]
|
||||||
|
|
||||||
muls r7, r4, r5
|
A muls r7, r4, r5
|
||||||
|
T mul r7, r4, r5
|
||||||
|
T cmp r7, #0
|
||||||
rsb r6, r7, r5, lsl #3
|
rsb r6, r7, r5, lsl #3
|
||||||
rsb ip, r7, r4, lsl #3
|
rsb ip, r7, r4, lsl #3
|
||||||
sub r4, r7, r4, lsl #3
|
sub r4, r7, r4, lsl #3
|
||||||
@@ -368,10 +372,10 @@ function ff_\type\()_h264_chroma_mc2_neon, export=1
|
|||||||
pop {r4-r6, pc}
|
pop {r4-r6, pc}
|
||||||
2:
|
2:
|
||||||
.ifc \type,put
|
.ifc \type,put
|
||||||
ldrh r5, [r1], r2
|
ldrh_post r5, r1, r2
|
||||||
strh r5, [r0], r2
|
strh_post r5, r0, r2
|
||||||
ldrh r6, [r1], r2
|
ldrh_post r6, r1, r2
|
||||||
strh r6, [r0], r2
|
strh_post r6, r0, r2
|
||||||
.else
|
.else
|
||||||
vld1.16 {d16[0]}, [r1], r2
|
vld1.16 {d16[0]}, [r1], r2
|
||||||
vld1.16 {d16[1]}, [r1], r2
|
vld1.16 {d16[1]}, [r1], r2
|
||||||
@@ -404,28 +408,17 @@ endfunc
|
|||||||
ldr ip, [sp]
|
ldr ip, [sp]
|
||||||
tst r2, r2
|
tst r2, r2
|
||||||
ldr ip, [ip]
|
ldr ip, [ip]
|
||||||
|
it ne
|
||||||
tstne r3, r3
|
tstne r3, r3
|
||||||
vmov.32 d24[0], ip
|
vmov.32 d24[0], ip
|
||||||
and ip, ip, ip, lsl #16
|
and ip, ip, ip, lsl #16
|
||||||
|
it eq
|
||||||
bxeq lr
|
bxeq lr
|
||||||
ands ip, ip, ip, lsl #8
|
ands ip, ip, ip, lsl #8
|
||||||
|
it lt
|
||||||
bxlt lr
|
bxlt lr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro align_push_regs
|
|
||||||
and ip, sp, #15
|
|
||||||
add ip, ip, #32
|
|
||||||
sub sp, sp, ip
|
|
||||||
vst1.64 {d12-d15}, [sp,:128]
|
|
||||||
sub sp, sp, #32
|
|
||||||
vst1.64 {d8-d11}, [sp,:128]
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro align_pop_regs
|
|
||||||
vld1.64 {d8-d11}, [sp,:128]!
|
|
||||||
vld1.64 {d12-d15}, [sp,:128], ip
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro h264_loop_filter_luma
|
.macro h264_loop_filter_luma
|
||||||
vdup.8 q11, r2 @ alpha
|
vdup.8 q11, r2 @ alpha
|
||||||
vmovl.u8 q12, d24
|
vmovl.u8 q12, d24
|
||||||
@@ -506,7 +499,7 @@ function ff_h264_v_loop_filter_luma_neon, export=1
|
|||||||
vld1.64 {d18,d19}, [r0,:128], r1
|
vld1.64 {d18,d19}, [r0,:128], r1
|
||||||
vld1.64 {d16,d17}, [r0,:128], r1
|
vld1.64 {d16,d17}, [r0,:128], r1
|
||||||
|
|
||||||
align_push_regs
|
vpush {d8-d15}
|
||||||
|
|
||||||
h264_loop_filter_luma
|
h264_loop_filter_luma
|
||||||
|
|
||||||
@@ -516,7 +509,7 @@ function ff_h264_v_loop_filter_luma_neon, export=1
|
|||||||
vst1.64 {d0, d1}, [r0,:128], r1
|
vst1.64 {d0, d1}, [r0,:128], r1
|
||||||
vst1.64 {d10,d11}, [r0,:128]
|
vst1.64 {d10,d11}, [r0,:128]
|
||||||
|
|
||||||
align_pop_regs
|
vpop {d8-d15}
|
||||||
bx lr
|
bx lr
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -543,7 +536,7 @@ function ff_h264_h_loop_filter_luma_neon, export=1
|
|||||||
|
|
||||||
transpose_8x8 q3, q10, q9, q8, q0, q1, q2, q13
|
transpose_8x8 q3, q10, q9, q8, q0, q1, q2, q13
|
||||||
|
|
||||||
align_push_regs
|
vpush {d8-d15}
|
||||||
|
|
||||||
h264_loop_filter_luma
|
h264_loop_filter_luma
|
||||||
|
|
||||||
@@ -568,7 +561,7 @@ function ff_h264_h_loop_filter_luma_neon, export=1
|
|||||||
vst1.32 {d1[1]}, [r0], r1
|
vst1.32 {d1[1]}, [r0], r1
|
||||||
vst1.32 {d11[1]}, [r0], r1
|
vst1.32 {d11[1]}, [r0], r1
|
||||||
|
|
||||||
align_pop_regs
|
vpop {d8-d15}
|
||||||
bx lr
|
bx lr
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1116,6 +1109,7 @@ function \type\()_h264_qpel8_hv_lowpass_neon
|
|||||||
vrhadd.u8 d11, d11, d7
|
vrhadd.u8 d11, d11, d7
|
||||||
sub r0, r0, r2, lsl #3
|
sub r0, r0, r2, lsl #3
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
vst1.64 {d12}, [r0,:64], r2
|
vst1.64 {d12}, [r0,:64], r2
|
||||||
vst1.64 {d13}, [r0,:64], r2
|
vst1.64 {d13}, [r0,:64], r2
|
||||||
vst1.64 {d14}, [r0,:64], r2
|
vst1.64 {d14}, [r0,:64], r2
|
||||||
@@ -1263,7 +1257,9 @@ function ff_\type\()_h264_qpel8_mc11_neon, export=1
|
|||||||
\type\()_h264_qpel8_mc11:
|
\type\()_h264_qpel8_mc11:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #64
|
sub sp, sp, #64
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
@@ -1271,14 +1267,14 @@ function ff_\type\()_h264_qpel8_mc11_neon, export=1
|
|||||||
mov ip, #8
|
mov ip, #8
|
||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel8_h_lowpass_neon
|
bl put_h264_qpel8_h_lowpass_neon
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
add ip, sp, #64
|
add ip, sp, #64
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
mov r2, #8
|
mov r2, #8
|
||||||
bl \type\()_h264_qpel8_v_lowpass_l2_neon
|
bl \type\()_h264_qpel8_v_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r11, pc}
|
pop {r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1287,7 +1283,9 @@ function ff_\type\()_h264_qpel8_mc21_neon, export=1
|
|||||||
\type\()_h264_qpel8_mc21:
|
\type\()_h264_qpel8_mc21:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #(8*8+16*12)
|
sub sp, sp, #(8*8+16*12)
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, #8
|
mov r3, #8
|
||||||
@@ -1296,14 +1294,14 @@ function ff_\type\()_h264_qpel8_mc21_neon, export=1
|
|||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel8_h_lowpass_neon
|
bl put_h264_qpel8_h_lowpass_neon
|
||||||
mov r4, r0
|
mov r4, r0
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
sub r2, r4, #64
|
sub r2, r4, #64
|
||||||
bl \type\()_h264_qpel8_hv_lowpass_l2_neon
|
bl \type\()_h264_qpel8_hv_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r4, r10, r11, pc}
|
pop {r4, r10, r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1330,7 +1328,9 @@ function ff_\type\()_h264_qpel8_mc12_neon, export=1
|
|||||||
\type\()_h264_qpel8_mc12:
|
\type\()_h264_qpel8_mc12:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #(8*8+16*12)
|
sub sp, sp, #(8*8+16*12)
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
@@ -1339,20 +1339,22 @@ function ff_\type\()_h264_qpel8_mc12_neon, export=1
|
|||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel8_v_lowpass_neon
|
bl put_h264_qpel8_v_lowpass_neon
|
||||||
mov r4, r0
|
mov r4, r0
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
sub r1, r1, r3, lsl #1
|
sub r1, r1, r3, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
sub r2, r4, #64
|
sub r2, r4, #64
|
||||||
bl \type\()_h264_qpel8_hv_lowpass_l2_neon
|
bl \type\()_h264_qpel8_hv_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r4, r10, r11, pc}
|
pop {r4, r10, r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function ff_\type\()_h264_qpel8_mc22_neon, export=1
|
function ff_\type\()_h264_qpel8_mc22_neon, export=1
|
||||||
push {r4, r10, r11, lr}
|
push {r4, r10, r11, lr}
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r4, r11, #15
|
||||||
|
T mov sp, r4
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
@@ -1441,21 +1443,23 @@ function ff_\type\()_h264_qpel16_mc11_neon, export=1
|
|||||||
\type\()_h264_qpel16_mc11:
|
\type\()_h264_qpel16_mc11:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #256
|
sub sp, sp, #256
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, #16
|
mov r3, #16
|
||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel16_h_lowpass_neon
|
bl put_h264_qpel16_h_lowpass_neon
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
add ip, sp, #64
|
add ip, sp, #64
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
mov r2, #16
|
mov r2, #16
|
||||||
bl \type\()_h264_qpel16_v_lowpass_l2_neon
|
bl \type\()_h264_qpel16_v_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r4, r11, pc}
|
pop {r4, r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1464,20 +1468,22 @@ function ff_\type\()_h264_qpel16_mc21_neon, export=1
|
|||||||
\type\()_h264_qpel16_mc21:
|
\type\()_h264_qpel16_mc21:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #(16*16+16*12)
|
sub sp, sp, #(16*16+16*12)
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel16_h_lowpass_neon_packed
|
bl put_h264_qpel16_h_lowpass_neon_packed
|
||||||
mov r4, r0
|
mov r4, r0
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
bl \type\()_h264_qpel16_hv_lowpass_l2_neon
|
bl \type\()_h264_qpel16_hv_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r4-r5, r9-r11, pc}
|
pop {r4-r5, r9-r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1504,7 +1510,9 @@ function ff_\type\()_h264_qpel16_mc12_neon, export=1
|
|||||||
\type\()_h264_qpel16_mc12:
|
\type\()_h264_qpel16_mc12:
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r0, r11, #15
|
||||||
|
T mov sp, r0
|
||||||
sub sp, sp, #(16*16+16*12)
|
sub sp, sp, #(16*16+16*12)
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
@@ -1512,13 +1520,13 @@ function ff_\type\()_h264_qpel16_mc12_neon, export=1
|
|||||||
vpush {d8-d15}
|
vpush {d8-d15}
|
||||||
bl put_h264_qpel16_v_lowpass_neon_packed
|
bl put_h264_qpel16_v_lowpass_neon_packed
|
||||||
mov r4, r0
|
mov r4, r0
|
||||||
ldrd r0, [r11]
|
ldrd r0, [r11], #8
|
||||||
sub r1, r1, r3, lsl #1
|
sub r1, r1, r3, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r2, r3
|
mov r2, r3
|
||||||
bl \type\()_h264_qpel16_hv_lowpass_l2_neon
|
bl \type\()_h264_qpel16_hv_lowpass_l2_neon
|
||||||
vpop {d8-d15}
|
vpop {d8-d15}
|
||||||
add sp, r11, #8
|
mov sp, r11
|
||||||
pop {r4-r5, r9-r11, pc}
|
pop {r4-r5, r9-r11, pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1526,7 +1534,9 @@ function ff_\type\()_h264_qpel16_mc22_neon, export=1
|
|||||||
push {r4, r9-r11, lr}
|
push {r4, r9-r11, lr}
|
||||||
lowpass_const r3
|
lowpass_const r3
|
||||||
mov r11, sp
|
mov r11, sp
|
||||||
bic sp, sp, #15
|
A bic sp, sp, #15
|
||||||
|
T bic r4, r11, #15
|
||||||
|
T mov sp, r4
|
||||||
sub r1, r1, r2, lsl #1
|
sub r1, r1, r2, lsl #1
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
mov r3, r2
|
mov r3, r2
|
||||||
|
@@ -106,10 +106,12 @@ function ff_h264_idct_add16_neon, export=1
|
|||||||
blt 2f
|
blt 2f
|
||||||
ldrsh lr, [r1]
|
ldrsh lr, [r1]
|
||||||
add r0, r0, r4
|
add r0, r0, r4
|
||||||
|
it ne
|
||||||
movne lr, #0
|
movne lr, #0
|
||||||
cmp lr, #0
|
cmp lr, #0
|
||||||
adrne lr, ff_h264_idct_dc_add_neon
|
ite ne
|
||||||
adreq lr, ff_h264_idct_add_neon
|
adrne lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
||||||
|
adreq lr, ff_h264_idct_add_neon + CONFIG_THUMB
|
||||||
blx lr
|
blx lr
|
||||||
2: subs ip, ip, #1
|
2: subs ip, ip, #1
|
||||||
add r1, r1, #32
|
add r1, r1, #32
|
||||||
@@ -132,8 +134,9 @@ function ff_h264_idct_add16intra_neon, export=1
|
|||||||
add r0, r0, r4
|
add r0, r0, r4
|
||||||
cmp r8, #0
|
cmp r8, #0
|
||||||
ldrsh r8, [r1]
|
ldrsh r8, [r1]
|
||||||
adrne lr, ff_h264_idct_add_neon
|
iteet ne
|
||||||
adreq lr, ff_h264_idct_dc_add_neon
|
adrne lr, ff_h264_idct_add_neon + CONFIG_THUMB
|
||||||
|
adreq lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
||||||
cmpeq r8, #0
|
cmpeq r8, #0
|
||||||
blxne lr
|
blxne lr
|
||||||
subs ip, ip, #1
|
subs ip, ip, #1
|
||||||
@@ -159,12 +162,14 @@ function ff_h264_idct_add8_neon, export=1
|
|||||||
add r1, r3, r12, lsl #5
|
add r1, r3, r12, lsl #5
|
||||||
cmp r8, #0
|
cmp r8, #0
|
||||||
ldrsh r8, [r1]
|
ldrsh r8, [r1]
|
||||||
adrne lr, ff_h264_idct_add_neon
|
iteet ne
|
||||||
adreq lr, ff_h264_idct_dc_add_neon
|
adrne lr, ff_h264_idct_add_neon + CONFIG_THUMB
|
||||||
|
adreq lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
||||||
cmpeq r8, #0
|
cmpeq r8, #0
|
||||||
blxne lr
|
blxne lr
|
||||||
add r12, r12, #1
|
add r12, r12, #1
|
||||||
cmp r12, #4
|
cmp r12, #4
|
||||||
|
itt eq
|
||||||
moveq r12, #16
|
moveq r12, #16
|
||||||
moveq r4, r9
|
moveq r4, r9
|
||||||
cmp r12, #20
|
cmp r12, #20
|
||||||
@@ -365,10 +370,12 @@ function ff_h264_idct8_add4_neon, export=1
|
|||||||
blt 2f
|
blt 2f
|
||||||
ldrsh lr, [r1]
|
ldrsh lr, [r1]
|
||||||
add r0, r0, r4
|
add r0, r0, r4
|
||||||
|
it ne
|
||||||
movne lr, #0
|
movne lr, #0
|
||||||
cmp lr, #0
|
cmp lr, #0
|
||||||
adrne lr, ff_h264_idct8_dc_add_neon
|
ite ne
|
||||||
adreq lr, ff_h264_idct8_add_neon
|
adrne lr, ff_h264_idct8_dc_add_neon + CONFIG_THUMB
|
||||||
|
adreq lr, ff_h264_idct8_add_neon + CONFIG_THUMB
|
||||||
blx lr
|
blx lr
|
||||||
2: subs r12, r12, #4
|
2: subs r12, r12, #4
|
||||||
add r1, r1, #128
|
add r1, r1, #128
|
||||||
@@ -376,8 +383,8 @@ function ff_h264_idct8_add4_neon, export=1
|
|||||||
pop {r4-r8,pc}
|
pop {r4-r8,pc}
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
.section .rodata
|
const scan8
|
||||||
scan8: .byte 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8
|
.byte 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8
|
||||||
.byte 6+ 1*8, 7+ 1*8, 6+ 2*8, 7+ 2*8
|
.byte 6+ 1*8, 7+ 1*8, 6+ 2*8, 7+ 2*8
|
||||||
.byte 4+ 3*8, 5+ 3*8, 4+ 4*8, 5+ 4*8
|
.byte 4+ 3*8, 5+ 3*8, 4+ 4*8, 5+ 4*8
|
||||||
.byte 6+ 3*8, 7+ 3*8, 6+ 4*8, 7+ 4*8
|
.byte 6+ 3*8, 7+ 3*8, 6+ 4*8, 7+ 4*8
|
||||||
@@ -389,3 +396,4 @@ scan8: .byte 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8
|
|||||||
.byte 6+11*8, 7+11*8, 6+12*8, 7+12*8
|
.byte 6+11*8, 7+11*8, 6+12*8, 7+12*8
|
||||||
.byte 4+13*8, 5+13*8, 4+14*8, 5+14*8
|
.byte 4+13*8, 5+13*8, 4+14*8, 5+14*8
|
||||||
.byte 6+13*8, 7+13*8, 6+14*8, 7+14*8
|
.byte 6+13*8, 7+13*8, 6+14*8, 7+14*8
|
||||||
|
endconst
|
||||||
|
@@ -166,12 +166,9 @@ function ff_pred16x16_plane_neon, export=1
|
|||||||
bx lr
|
bx lr
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
.section .rodata
|
const p16weight, align=4
|
||||||
.align 4
|
|
||||||
p16weight:
|
|
||||||
.short 1,2,3,4,5,6,7,8
|
.short 1,2,3,4,5,6,7,8
|
||||||
|
endconst
|
||||||
.text
|
|
||||||
|
|
||||||
function ff_pred8x8_hor_neon, export=1
|
function ff_pred8x8_hor_neon, export=1
|
||||||
sub r2, r0, #1
|
sub r2, r0, #1
|
||||||
|
@@ -64,11 +64,14 @@ static inline av_const int mid_pred(int a, int b, int c)
|
|||||||
__asm__ (
|
__asm__ (
|
||||||
"mov %0, %2 \n\t"
|
"mov %0, %2 \n\t"
|
||||||
"cmp %1, %2 \n\t"
|
"cmp %1, %2 \n\t"
|
||||||
|
"itt gt \n\t"
|
||||||
"movgt %0, %1 \n\t"
|
"movgt %0, %1 \n\t"
|
||||||
"movgt %1, %2 \n\t"
|
"movgt %1, %2 \n\t"
|
||||||
"cmp %1, %3 \n\t"
|
"cmp %1, %3 \n\t"
|
||||||
|
"it le \n\t"
|
||||||
"movle %1, %3 \n\t"
|
"movle %1, %3 \n\t"
|
||||||
"cmp %0, %1 \n\t"
|
"cmp %0, %1 \n\t"
|
||||||
|
"it gt \n\t"
|
||||||
"movgt %0, %1 \n\t"
|
"movgt %0, %1 \n\t"
|
||||||
: "=&r"(m), "+r"(a)
|
: "=&r"(m), "+r"(a)
|
||||||
: "r"(b), "r"(c)
|
: "r"(b), "r"(c)
|
||||||
|
@@ -191,7 +191,9 @@ function ff_mdct_calc_neon, export=1
|
|||||||
vadd.f32 d17, d17, d3 @ in2u+in1d -I
|
vadd.f32 d17, d17, d3 @ in2u+in1d -I
|
||||||
1:
|
1:
|
||||||
vmul.f32 d7, d0, d21 @ I*s
|
vmul.f32 d7, d0, d21 @ I*s
|
||||||
ldr r10, [r3, lr, lsr #1]
|
A ldr r10, [r3, lr, lsr #1]
|
||||||
|
T lsr r10, lr, #1
|
||||||
|
T ldr r10, [r3, r10]
|
||||||
vmul.f32 d6, d1, d20 @ -R*c
|
vmul.f32 d6, d1, d20 @ -R*c
|
||||||
ldr r6, [r3, #4]!
|
ldr r6, [r3, #4]!
|
||||||
vmul.f32 d4, d1, d21 @ -R*s
|
vmul.f32 d4, d1, d21 @ -R*s
|
||||||
|
@@ -75,7 +75,7 @@ function ff_mpadsp_apply_window_fixed_armv6, export=1
|
|||||||
sum8 r8, r9, r1, r0, r10, r11, r12, lr
|
sum8 r8, r9, r1, r0, r10, r11, r12, lr
|
||||||
sum8 r8, r9, r1, r2, r10, r11, r12, lr, rsb, 32
|
sum8 r8, r9, r1, r2, r10, r11, r12, lr, rsb, 32
|
||||||
round r10, r8, r9
|
round r10, r8, r9
|
||||||
strh r10, [r3], r4
|
strh_post r10, r3, r4
|
||||||
|
|
||||||
mov lr, #15
|
mov lr, #15
|
||||||
1:
|
1:
|
||||||
@@ -127,10 +127,10 @@ function ff_mpadsp_apply_window_fixed_armv6, export=1
|
|||||||
round r10, r8, r9
|
round r10, r8, r9
|
||||||
adds r8, r8, r4
|
adds r8, r8, r4
|
||||||
adc r9, r9, r7
|
adc r9, r9, r7
|
||||||
strh r10, [r3], r12
|
strh_post r10, r3, r12
|
||||||
round r11, r8, r9
|
round r11, r8, r9
|
||||||
subs lr, lr, #1
|
subs lr, lr, #1
|
||||||
strh r11, [r5], -r12
|
strh_dpost r11, r5, r12
|
||||||
bgt 1b
|
bgt 1b
|
||||||
|
|
||||||
sum8 r8, r9, r1, r0, r10, r11, r12, lr, rsb, 33
|
sum8 r8, r9, r1, r0, r10, r11, r12, lr, rsb, 33
|
||||||
|
@@ -38,15 +38,21 @@
|
|||||||
|
|
||||||
.macro dequant_t dst, src, mul, add, tmp
|
.macro dequant_t dst, src, mul, add, tmp
|
||||||
rsbs \tmp, ip, \src, asr #16
|
rsbs \tmp, ip, \src, asr #16
|
||||||
|
it gt
|
||||||
addgt \tmp, \add, #0
|
addgt \tmp, \add, #0
|
||||||
|
it lt
|
||||||
rsblt \tmp, \add, #0
|
rsblt \tmp, \add, #0
|
||||||
|
it ne
|
||||||
smlatbne \dst, \src, \mul, \tmp
|
smlatbne \dst, \src, \mul, \tmp
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro dequant_b dst, src, mul, add, tmp
|
.macro dequant_b dst, src, mul, add, tmp
|
||||||
rsbs \tmp, ip, \src, lsl #16
|
rsbs \tmp, ip, \src, lsl #16
|
||||||
|
it gt
|
||||||
addgt \tmp, \add, #0
|
addgt \tmp, \add, #0
|
||||||
|
it lt
|
||||||
rsblt \tmp, \add, #0
|
rsblt \tmp, \add, #0
|
||||||
|
it ne
|
||||||
smlabbne \dst, \src, \mul, \tmp
|
smlabbne \dst, \src, \mul, \tmp
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -80,21 +86,27 @@ function ff_dct_unquantize_h263_armv5te, export=1
|
|||||||
strh lr, [r0], #2
|
strh lr, [r0], #2
|
||||||
|
|
||||||
subs r3, r3, #8
|
subs r3, r3, #8
|
||||||
|
it gt
|
||||||
ldrdgt r4, [r0, #0] /* load data early to avoid load/use pipeline stall */
|
ldrdgt r4, [r0, #0] /* load data early to avoid load/use pipeline stall */
|
||||||
bgt 1b
|
bgt 1b
|
||||||
|
|
||||||
adds r3, r3, #2
|
adds r3, r3, #2
|
||||||
|
it le
|
||||||
pople {r4-r9,pc}
|
pople {r4-r9,pc}
|
||||||
2:
|
2:
|
||||||
ldrsh r9, [r0, #0]
|
ldrsh r9, [r0, #0]
|
||||||
ldrsh lr, [r0, #2]
|
ldrsh lr, [r0, #2]
|
||||||
mov r8, r2
|
mov r8, r2
|
||||||
cmp r9, #0
|
cmp r9, #0
|
||||||
|
it lt
|
||||||
rsblt r8, r2, #0
|
rsblt r8, r2, #0
|
||||||
|
it ne
|
||||||
smlabbne r9, r9, r1, r8
|
smlabbne r9, r9, r1, r8
|
||||||
mov r8, r2
|
mov r8, r2
|
||||||
cmp lr, #0
|
cmp lr, #0
|
||||||
|
it lt
|
||||||
rsblt r8, r2, #0
|
rsblt r8, r2, #0
|
||||||
|
it ne
|
||||||
smlabbne lr, lr, r1, r8
|
smlabbne lr, lr, r1, r8
|
||||||
strh r9, [r0], #2
|
strh r9, [r0], #2
|
||||||
strh lr, [r0], #2
|
strh lr, [r0], #2
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user