Compare commits
681 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ccdc68eb35 | ||
![]() |
ef0c89e969 | ||
![]() |
8413f12e1b | ||
![]() |
df825c956a | ||
![]() |
d61b38b9db | ||
![]() |
d912a30c7d | ||
![]() |
8dba5608dc | ||
![]() |
7ce728050b | ||
![]() |
851098c9e0 | ||
![]() |
bba709214a | ||
![]() |
0eca0da06e | ||
![]() |
0125c10217 | ||
![]() |
d38580a7bb | ||
![]() |
8acf9905a1 | ||
![]() |
ba5bb0562b | ||
![]() |
1550c0885d | ||
![]() |
38a511e84c | ||
![]() |
ba4b08b789 | ||
![]() |
67a7ed623b | ||
![]() |
c76505e0de | ||
![]() |
30c08e2261 | ||
![]() |
7367cbec1b | ||
![]() |
28acce2861 | ||
![]() |
7347205351 | ||
![]() |
0d93d5c461 | ||
![]() |
a31ccacb1a | ||
![]() |
494cfacdb9 | ||
![]() |
4f58d8ebc1 | ||
![]() |
47b5fabd6a | ||
![]() |
e66860a66b | ||
![]() |
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 | ||
![]() |
3970d4e728 | ||
![]() |
80a173a33b | ||
![]() |
d58c5586ec | ||
![]() |
0411b19289 | ||
![]() |
fd30240e98 | ||
![]() |
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 | ||
![]() |
7d52ed686b | ||
![]() |
7275dc28f6 | ||
![]() |
f74d1c6de7 | ||
![]() |
e49abd1d92 | ||
![]() |
414409e6c5 | ||
![]() |
09a288476f | ||
![]() |
b981c5d4e0 | ||
![]() |
638e183d11 | ||
![]() |
60171d8fa6 | ||
![]() |
a39b603bf6 | ||
![]() |
57f51e843e | ||
![]() |
09d8f515b9 | ||
![]() |
b38b6b2798 | ||
![]() |
7fc85451fd | ||
![]() |
b89a0c9d7f | ||
![]() |
efedf09378 | ||
![]() |
46edabac3c | ||
![]() |
bfd7238adb | ||
![]() |
cf0052931d | ||
![]() |
6b998720b2 | ||
![]() |
55a070870f | ||
![]() |
54a1e7b0f2 | ||
![]() |
2c282e9679 | ||
![]() |
55a96a984e | ||
![]() |
64a9004d07 | ||
![]() |
f421b53400 | ||
![]() |
d2a276a3fd | ||
![]() |
535112b365 | ||
![]() |
2e342df4a2 | ||
![]() |
86491c5dbc | ||
![]() |
3e0dbb8a7e | ||
![]() |
2cd7580ab5 | ||
![]() |
b0804f3705 | ||
![]() |
77a7092d1c | ||
![]() |
80331265ca | ||
![]() |
00f6cbb53d | ||
![]() |
f144a70d60 | ||
![]() |
b08df314dc | ||
![]() |
e0fb22cea9 | ||
![]() |
802045777a | ||
![]() |
e8fd4a43ba | ||
![]() |
d950461f59 | ||
![]() |
df39708269 | ||
![]() |
1f2a93cf4b | ||
![]() |
67b704982f | ||
![]() |
3b840fab90 | ||
![]() |
fa79af6845 | ||
![]() |
c23d5261f7 | ||
![]() |
932b5f3cbb | ||
![]() |
b8ab1adfcd | ||
![]() |
107ea3057e | ||
![]() |
375bd0cfb3 | ||
![]() |
9b1bf08525 | ||
![]() |
376b099474 | ||
![]() |
6e774cf67e | ||
![]() |
18cfe0238d | ||
![]() |
603cb031f1 | ||
![]() |
2451228b0c | ||
![]() |
f9efe1d76e | ||
![]() |
626f11b3bc | ||
![]() |
8d61c68442 | ||
![]() |
d155fdefb8 | ||
![]() |
d414c77ded | ||
![]() |
dc9b708f4d | ||
![]() |
f8eabfc16e | ||
![]() |
14617fa7b8 | ||
![]() |
485b4317bb | ||
![]() |
17b6abab50 | ||
![]() |
cfff8db729 | ||
![]() |
431937883f | ||
![]() |
7bc9c32573 | ||
![]() |
1537f86a93 | ||
![]() |
2a934e87b1 | ||
![]() |
acfe2c9154 | ||
![]() |
bbb191c721 | ||
![]() |
a75b5a89d1 | ||
![]() |
651e21f584 | ||
![]() |
fa816e01f4 | ||
![]() |
03a4b489f1 | ||
![]() |
df0d418ce0 | ||
![]() |
6b0565e5b8 | ||
![]() |
23197f5467 | ||
![]() |
0a5e269f03 | ||
![]() |
70727e16ca | ||
![]() |
08decaeb95 | ||
![]() |
1860053820 | ||
![]() |
184a156f7a | ||
![]() |
9851184d30 | ||
![]() |
9770127cd8 | ||
![]() |
857c7e122b | ||
![]() |
915b905a1b | ||
![]() |
4db466db97 | ||
![]() |
20047f77b9 | ||
![]() |
7e362df304 | ||
![]() |
be1ae17ec0 | ||
![]() |
cdb72c827c | ||
![]() |
521dbccc11 | ||
![]() |
7aa24b157d | ||
![]() |
02affe2f0e | ||
![]() |
6109974cd9 | ||
![]() |
5681d74aaf | ||
![]() |
1b26a734b2 | ||
![]() |
02bdeff1ef | ||
![]() |
55efeba2b5 | ||
![]() |
08657a2a8a | ||
![]() |
f40b04e917 | ||
![]() |
d92bfc98f9 | ||
![]() |
1ed90c84f6 | ||
![]() |
21c9d92646 | ||
![]() |
be22dc60f5 | ||
![]() |
35f8ad420a | ||
![]() |
f71c761a9e | ||
![]() |
101e38e08a | ||
![]() |
1cf6348cf7 | ||
![]() |
8c0a0f10df | ||
![]() |
92566cf6ee | ||
![]() |
03e7314dd8 | ||
![]() |
e394f7984c | ||
![]() |
3aad92f3e6 | ||
![]() |
0d68a6f72d | ||
![]() |
a0acc9eff6 | ||
![]() |
4d36f7cf88 | ||
![]() |
e62ca1ab74 | ||
![]() |
58decdb639 | ||
![]() |
35feff418a | ||
![]() |
e257eebd17 | ||
![]() |
9bb7a128a3 | ||
![]() |
783f45de4f | ||
![]() |
ceede3a802 | ||
![]() |
be9183de2e | ||
![]() |
a2443e89d7 | ||
![]() |
9f9b731a3a | ||
![]() |
ad47a5ec85 | ||
![]() |
9960710b87 | ||
![]() |
42c8fdb943 | ||
![]() |
fed7f5b04f | ||
![]() |
dde0fb4aea | ||
![]() |
ecda54a640 | ||
![]() |
2bbb142a14 | ||
![]() |
b4a1bf0bbf | ||
![]() |
f0bcba238a | ||
![]() |
28d948ac44 | ||
![]() |
9973ca992e | ||
![]() |
a3d471e500 | ||
![]() |
54a178f28f | ||
![]() |
78cd2e18a4 | ||
![]() |
0d93b03e68 | ||
![]() |
5b1f79b092 | ||
![]() |
9f391c4971 | ||
![]() |
4e7905fa9e | ||
![]() |
4ee014309c | ||
![]() |
61ddc8271d | ||
![]() |
e6694dce1c | ||
![]() |
0b9b3570a3 | ||
![]() |
9b30b7b9bf | ||
![]() |
384ed15c2a | ||
![]() |
6550e2b5c5 | ||
![]() |
af32fa929a | ||
![]() |
07b3c4cde5 | ||
![]() |
5d4c065476 | ||
![]() |
4b84e995ad | ||
![]() |
685940da4c | ||
![]() |
aee461277a | ||
![]() |
a4f2973b2d | ||
![]() |
54f12d2889 | ||
![]() |
1cf3ba8971 | ||
![]() |
2b74db8d27 | ||
![]() |
db5e27f94e | ||
![]() |
97ce2a29b6 | ||
![]() |
ce8f40a7b9 | ||
![]() |
45b3f7c71e | ||
![]() |
8ad6555f82 | ||
![]() |
b4099a6dc5 | ||
![]() |
dec458b900 | ||
![]() |
fe3e7297fe | ||
![]() |
28321b777f | ||
![]() |
59a22afa0b | ||
![]() |
042934e786 | ||
![]() |
67163d751b | ||
![]() |
96a453eb85 | ||
![]() |
c613a89143 | ||
![]() |
b3b97559bb | ||
![]() |
44c718cf71 | ||
![]() |
99ec59adbd | ||
![]() |
3ed12b97be | ||
![]() |
f7831bb104 | ||
![]() |
9c2a024660 | ||
![]() |
f8521560fa | ||
![]() |
b772a757dd | ||
![]() |
0c039db4d8 | ||
![]() |
6ed533f561 | ||
![]() |
c75ba07f6e | ||
![]() |
9417761474 | ||
![]() |
6107543d4e | ||
![]() |
e9520db07e | ||
![]() |
15355f9af2 | ||
![]() |
776603b650 | ||
![]() |
0631896885 | ||
![]() |
8ad1f0852b | ||
![]() |
47be9f5bd5 | ||
![]() |
1450d6e637 | ||
![]() |
b00fc80d40 | ||
![]() |
a99a35c8ea | ||
![]() |
056e9efc8e | ||
![]() |
cf43508eb3 | ||
![]() |
c9c6e5f4e8 | ||
![]() |
a5a02ea3f2 | ||
![]() |
69b6248327 | ||
![]() |
533dbaa55b | ||
![]() |
ec7f0b527c | ||
![]() |
a582b028a4 | ||
![]() |
f36cea2673 | ||
![]() |
5d833dd299 | ||
![]() |
bf7dc6b29d | ||
![]() |
596762f058 | ||
![]() |
d2c5904cab | ||
![]() |
3899b3be0c | ||
![]() |
5163de0873 | ||
![]() |
738c17b3a6 | ||
![]() |
27128d82fa | ||
![]() |
ed288c0edd | ||
![]() |
9442f50c33 | ||
![]() |
89bd2307f5 | ||
![]() |
60a1384013 | ||
![]() |
b59919afe2 | ||
![]() |
764ffdd0ec | ||
![]() |
ed9e561490 | ||
![]() |
24e0a9e451 | ||
![]() |
4d8330d095 | ||
![]() |
30d7dce94f | ||
![]() |
6e21f03547 | ||
![]() |
fa3f7391be | ||
![]() |
b7000d0517 | ||
![]() |
169e634457 | ||
![]() |
053bc4ce8b | ||
![]() |
56634b2328 | ||
![]() |
1072498081 | ||
![]() |
e952ff6981 | ||
![]() |
9cee26dfde | ||
![]() |
605f89ffc9 | ||
![]() |
21587509ec | ||
![]() |
ad6177e52c | ||
![]() |
b1ceca016a | ||
![]() |
85b1e265c9 | ||
![]() |
8449cebc90 | ||
![]() |
4a721b18ed | ||
![]() |
f0869d3721 | ||
![]() |
be82df9e12 | ||
![]() |
b70a37f854 | ||
![]() |
812a4a5813 | ||
![]() |
c9316b7c6d | ||
![]() |
8511c141e0 | ||
![]() |
2bf9a09a2c | ||
![]() |
4601765ee8 | ||
![]() |
54544100a3 | ||
![]() |
97437dada6 | ||
![]() |
c8736de331 | ||
![]() |
92f1b5df32 | ||
![]() |
82e4fd193f | ||
![]() |
3a0649ddeb | ||
![]() |
9f05400ea8 | ||
![]() |
09cfd6f597 | ||
![]() |
b2af83a9ed | ||
![]() |
f38b2a6be8 | ||
![]() |
db93a5a0c8 | ||
![]() |
b5fe6bee01 | ||
![]() |
57571f348e | ||
![]() |
ab2ea6415b | ||
![]() |
7181adab80 | ||
![]() |
bac822025e | ||
![]() |
8a8aafd2b9 | ||
![]() |
a13ef61051 | ||
![]() |
4fbc35cd53 | ||
![]() |
1ec29b2da5 | ||
![]() |
5cc5152e80 | ||
![]() |
558cf502ac | ||
![]() |
b0da6a744a | ||
![]() |
d99613bad6 | ||
![]() |
64556c200e | ||
![]() |
c026f336b9 | ||
![]() |
5c2d684986 | ||
![]() |
77dafced71 | ||
![]() |
9c96b1efb1 | ||
![]() |
30442fa217 | ||
![]() |
e7d10f5a90 | ||
![]() |
ca5dfd1550 | ||
![]() |
1979a9b4f2 | ||
![]() |
d805b8f454 | ||
![]() |
a01387bb35 | ||
![]() |
11b72c073c | ||
![]() |
bb6702f206 | ||
![]() |
dd606be909 | ||
![]() |
8c987d8291 | ||
![]() |
6ddb12b688 | ||
![]() |
c34968c6d4 | ||
![]() |
a5107aab98 | ||
![]() |
bc2dd37e4f | ||
![]() |
4482ee9d9c | ||
![]() |
2ac3aa129e | ||
![]() |
1486e99b90 | ||
![]() |
dc6ee18363 | ||
![]() |
bb0c352ec5 | ||
![]() |
1125f26f83 | ||
![]() |
c11d360ebc | ||
![]() |
dd6334a1e4 | ||
![]() |
6b1af6a328 | ||
![]() |
1656dd7a4e | ||
![]() |
144c80042b | ||
![]() |
a460d9e1f7 | ||
![]() |
94af9cf46b | ||
![]() |
46d9dd6980 | ||
![]() |
a652bb2857 | ||
![]() |
7850a9b384 | ||
![]() |
de33e8675c | ||
![]() |
fe9dae6df8 | ||
![]() |
a7d35b2f99 | ||
![]() |
526f24e3fd | ||
![]() |
a8edc1cbc7 | ||
![]() |
f45cfb4751 | ||
![]() |
566d26923e | ||
![]() |
767efcb46e | ||
![]() |
cb9ccc89c5 | ||
![]() |
5925e25218 | ||
![]() |
303e48e6a2 | ||
![]() |
e30e0a16af | ||
![]() |
210d8f4ca2 | ||
![]() |
cc4718196a | ||
![]() |
f629fcd308 | ||
![]() |
b8fa424ce2 | ||
![]() |
01f1201267 | ||
![]() |
3af3a871af | ||
![]() |
82d7ad3344 | ||
![]() |
c5388d680e | ||
![]() |
8abaa83d2c | ||
![]() |
8e0a53bd34 | ||
![]() |
ba19cb6885 | ||
![]() |
3b80fb50d8 | ||
![]() |
fe7deb7cc4 | ||
![]() |
44b3f05309 | ||
![]() |
dc3ab8ca43 | ||
![]() |
e308a91c9c | ||
![]() |
207db36a4f | ||
![]() |
9bf76932e5 | ||
![]() |
91f9c7917c | ||
![]() |
fa75093381 | ||
![]() |
baec70e16f | ||
![]() |
2649439bbd | ||
![]() |
266ec41f77 | ||
![]() |
694279bfd2 | ||
![]() |
0ab69793fc | ||
![]() |
fa38ed8ac0 | ||
![]() |
acf2d3293c | ||
![]() |
48ba48fb13 | ||
![]() |
e1baba3ddb | ||
![]() |
399f7e0e75 | ||
![]() |
90edd5df3d | ||
![]() |
e6df35b3be | ||
![]() |
b2c9e9be87 | ||
![]() |
f4e34d1614 | ||
![]() |
076a8dfd41 | ||
![]() |
61f55565fb | ||
![]() |
a9a8e5ca99 | ||
![]() |
b6b46db9e4 | ||
![]() |
21d99be9dc | ||
![]() |
c2a2ad133e | ||
![]() |
b6187e48db | ||
![]() |
8af11e51f2 | ||
![]() |
f597825052 | ||
![]() |
7d704f5127 | ||
![]() |
7b6b9be861 | ||
![]() |
374409eb1a | ||
![]() |
a352fedb24 | ||
![]() |
c92068430d | ||
![]() |
274a5b7cdb | ||
![]() |
eb975b1c8b | ||
![]() |
84648d33ba | ||
![]() |
4b8a0b058d | ||
![]() |
1de90fd375 | ||
![]() |
20ca827019 | ||
![]() |
c8b37fd03d | ||
![]() |
b37131f798 | ||
![]() |
95345e942c | ||
![]() |
878a7d1573 | ||
![]() |
bd968d260a | ||
![]() |
00c5cf4beb | ||
![]() |
87757508ab | ||
![]() |
6a57021cf9 | ||
![]() |
f66418afba | ||
![]() |
f20f79307b | ||
![]() |
7371b0ca6f | ||
![]() |
c5cbda5079 | ||
![]() |
d1bc77d86c | ||
![]() |
91d5da9321 | ||
![]() |
08ddfb77a1 | ||
![]() |
a0352d01e9 | ||
![]() |
8893f7d815 | ||
![]() |
7c772ccd27 | ||
![]() |
cf82c5cd5b | ||
![]() |
2ff36ef521 | ||
![]() |
cb8577a4da | ||
![]() |
7e33a66c0e | ||
![]() |
b55b34f862 | ||
![]() |
893cf1b1ae | ||
![]() |
609d299ed0 | ||
![]() |
01a0612c70 | ||
![]() |
dcf1830a15 | ||
![]() |
a8d89df367 | ||
![]() |
095946afa7 | ||
![]() |
6d75dbebc0 | ||
![]() |
f54b8f8482 | ||
![]() |
a05219d801 | ||
![]() |
c02b02d725 | ||
![]() |
5fab0ccd81 | ||
![]() |
20829cf8a2 | ||
![]() |
0b4840af0c | ||
![]() |
896f80f82c | ||
![]() |
b57c6d1a4c | ||
![]() |
3749066dd8 | ||
![]() |
c29c609e0f | ||
![]() |
9459390f29 | ||
![]() |
2bbd81fba3 | ||
![]() |
5e3578893a | ||
![]() |
dc1b670a2c | ||
![]() |
0156f4f9da | ||
![]() |
a52c615a42 | ||
![]() |
5c2d7c4dc8 | ||
![]() |
004194f465 | ||
![]() |
cd63c32ff6 | ||
![]() |
5a33a29a91 | ||
![]() |
683df9bf54 | ||
![]() |
64e2656f7c | ||
![]() |
8e3d264fb2 | ||
![]() |
46a2dc9175 | ||
![]() |
b9e126fbe2 | ||
![]() |
07dc4a79c7 | ||
![]() |
43de5c034f | ||
![]() |
2f0a10174e | ||
![]() |
0a48a67e57 | ||
![]() |
e8baa8eb7f | ||
![]() |
d32b2d4de1 | ||
![]() |
924b2ee8f2 | ||
![]() |
f95e5225fe | ||
![]() |
8f536408d1 | ||
![]() |
093f0f13e6 | ||
![]() |
c172eb7925 | ||
![]() |
154ea553f6 | ||
![]() |
d734d4ce6a | ||
![]() |
c445e9dc62 | ||
![]() |
c5c2654351 | ||
![]() |
2fe47b21c8 | ||
![]() |
b91ebb60d8 | ||
![]() |
f1d1ef810a | ||
![]() |
b263e94f77 | ||
![]() |
9da3063e1c | ||
![]() |
b6fe44b9db | ||
![]() |
72ac64544f | ||
![]() |
8f7f3f0453 | ||
![]() |
376dfd07ab | ||
![]() |
b62c0c0bce | ||
![]() |
00498a7e59 | ||
![]() |
cb66b55270 | ||
![]() |
9482dd0d17 | ||
![]() |
87eedf6943 | ||
![]() |
f239b91596 | ||
![]() |
06107e9605 | ||
![]() |
d052370c1e | ||
![]() |
ce993ce791 | ||
![]() |
e54fd33848 | ||
![]() |
9b69efc02b | ||
![]() |
1bf80a9a14 | ||
![]() |
c0b90d4088 | ||
![]() |
9c709f0534 | ||
![]() |
4ad56612f9 | ||
![]() |
acb62e998f | ||
![]() |
180faac637 | ||
![]() |
13c943ffb1 | ||
![]() |
18052f1df9 | ||
![]() |
4c8b14c37f | ||
![]() |
e4071fa04c | ||
![]() |
bf5ed476ba | ||
![]() |
fcd26ebc8f | ||
![]() |
6a34f5d447 | ||
![]() |
26f48752fb | ||
![]() |
1aef8de6d7 | ||
![]() |
9ac3e32b29 | ||
![]() |
5254285636 | ||
![]() |
137838945f | ||
![]() |
6cef3ddbdc | ||
![]() |
403eee165c | ||
![]() |
523b57b331 | ||
![]() |
a3589cce81 | ||
![]() |
0820593e64 | ||
![]() |
4db2b966be | ||
![]() |
b7b61ff6a3 | ||
![]() |
7a6e47b99d | ||
![]() |
f84c349b3b | ||
![]() |
26f732e21d | ||
![]() |
82b2dd5ee4 | ||
![]() |
e82ddde05a | ||
![]() |
07f5da6128 | ||
![]() |
e845455225 | ||
![]() |
3fedb3e65c | ||
![]() |
0b5c261212 | ||
![]() |
680e473643 | ||
![]() |
44e83d0c97 | ||
![]() |
1986380df2 | ||
![]() |
df3850db49 | ||
![]() |
082b4f8348 | ||
![]() |
788c313b50 | ||
![]() |
779d7610c7 | ||
![]() |
56629aa012 | ||
![]() |
33651e3edf | ||
![]() |
d46aada5c2 | ||
![]() |
66b1f210c0 | ||
![]() |
d4b98d475f | ||
![]() |
8d8962ca3e | ||
![]() |
329559ae50 | ||
![]() |
0b3a88fe15 | ||
![]() |
563fe360c3 | ||
![]() |
73a502dd43 | ||
![]() |
ea189b77eb | ||
![]() |
2ebd47841f | ||
![]() |
9d7244c4c6 | ||
![]() |
7aee089978 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -15,17 +15,14 @@ config.*
|
||||
doc/*.1
|
||||
doc/*.html
|
||||
doc/*.pod
|
||||
doc/fate.txt
|
||||
doxy
|
||||
ffmpeg
|
||||
ffplay
|
||||
ffprobe
|
||||
ffserver
|
||||
avconv
|
||||
libavcodec/*_tablegen
|
||||
libavcodec/*_tables.c
|
||||
libavcodec/*_tables.h
|
||||
libavcodec/codec_names.h
|
||||
libavcodec/libavcodec*
|
||||
libavcore/libavcore*
|
||||
libavdevice/libavdevice*
|
||||
@@ -34,23 +31,22 @@ libavformat/libavformat*
|
||||
libavutil/avconfig.h
|
||||
libavutil/libavutil*
|
||||
libpostproc/libpostproc*
|
||||
libswresample/libswresample*
|
||||
libswscale/libswscale*
|
||||
tests/audiogen
|
||||
tests/base64
|
||||
tests/data
|
||||
tests/rotozoom
|
||||
tests/seek_test
|
||||
tests/tiny_psnr
|
||||
tests/videogen
|
||||
tests/vsynth1
|
||||
tests/vsynth2
|
||||
tools/aviocat
|
||||
tools/cws2fws
|
||||
tools/graph2dot
|
||||
tools/ismindex
|
||||
tools/lavfi-showfiltfmts
|
||||
tools/pktdumper
|
||||
tools/probetest
|
||||
tools/qt-faststart
|
||||
tools/trasher
|
||||
tools/trasher*.d
|
||||
version.h
|
||||
|
23
Doxyfile
23
Doxyfile
@@ -31,13 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.10.8
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will
|
||||
# copy the logo to the output directory.
|
||||
PROJECT_LOGO =
|
||||
PROJECT_NUMBER = 0.7.9
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
@@ -766,7 +760,7 @@ ALPHABETICAL_INDEX = YES
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 2
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
@@ -800,13 +794,13 @@ HTML_FILE_EXTENSION = .html
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
HTML_HEADER = doc/doxy/header.html
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER = doc/doxy/footer.html
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
@@ -815,7 +809,7 @@ HTML_FOOTER = doc/doxy/footer.html
|
||||
# the style sheet file to the HTML output directory, so don't put your own
|
||||
# stylesheet in the HTML output directory as well, or it will be erased!
|
||||
|
||||
HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
|
||||
# Doxygen will adjust the colors in the stylesheet and background images
|
||||
@@ -825,7 +819,7 @@ HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css
|
||||
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
|
||||
# The allowed range is 0 to 359.
|
||||
|
||||
HTML_COLORSTYLE_HUE = 120
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
|
||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
|
||||
# the colors in the HTML output. For a value of 0 the output will use
|
||||
@@ -864,7 +858,7 @@ HTML_DYNAMIC_SECTIONS = NO
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for Apple's Xcode 3
|
||||
# integrated development environment, introduced with OS X 10.5 (Leopard).
|
||||
# integrated development environment, introduced with OSX 10.5 (Leopard).
|
||||
# To create a documentation set, doxygen will generate a Makefile in the
|
||||
# HTML output directory. Running make will produce the docset in that
|
||||
# directory and running "make install" will install the docset in
|
||||
@@ -1388,8 +1382,7 @@ PREDEFINED = "__attribute__(x)=" \
|
||||
# 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.
|
||||
|
||||
EXPAND_AS_DEFINED = declare_idct \
|
||||
READ_PAR_DATA \
|
||||
EXPAND_AS_DEFINED = declare_idct
|
||||
|
||||
# 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
|
||||
|
53
MAINTAINERS
53
MAINTAINERS
@@ -4,12 +4,6 @@ FFmpeg maintainers
|
||||
Below is a list of the people maintaining different parts of the
|
||||
FFmpeg code.
|
||||
|
||||
Please try to keep entries where you are the maintainer upto date!
|
||||
|
||||
Names in () mean that the maintainer currently has no time to maintain the code.
|
||||
A CC after the name means that the maintainer prefers to be CC-ed on patches
|
||||
and related discussions.
|
||||
|
||||
|
||||
Project Leader
|
||||
==============
|
||||
@@ -44,13 +38,13 @@ Miscellaneous Areas
|
||||
===================
|
||||
|
||||
documentation Mike Melanson
|
||||
website Robert Swain, Lou Logan
|
||||
website Robert Swain
|
||||
build system (configure,Makefiles) Diego Biurrun, Mans Rullgard
|
||||
project server Árpád Gereöffy, Michael Niedermayer, Reimar Döffinger
|
||||
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
||||
project server Diego Biurrun, Mans Rullgard
|
||||
mailinglists Michael Niedermayer, Baptiste Coudurier
|
||||
presets Robert Swain
|
||||
metadata subsystem Aurelien Jacobs
|
||||
release management Michael Niedermayer
|
||||
release management Diego Biurrun, Reinhard Tartler
|
||||
|
||||
|
||||
libavutil
|
||||
@@ -87,8 +81,6 @@ Generic Parts:
|
||||
bitstream.c, bitstream.h Michael Niedermayer
|
||||
CABAC:
|
||||
cabac.h, cabac.c Michael Niedermayer
|
||||
codec names:
|
||||
codec_names.sh Nicolas George
|
||||
DSP utilities:
|
||||
dsputils.c, dsputils.h Michael Niedermayer
|
||||
entropy coding:
|
||||
@@ -142,7 +134,6 @@ Codecs:
|
||||
dv.c Roman Shaposhnik
|
||||
eacmv*, eaidct*, eat* Peter Ross
|
||||
ffv1.c Michael Niedermayer
|
||||
ffwavesynth.c Nicolas George
|
||||
flac* Justin Ruggles
|
||||
flashsv* Benjamin Larsson
|
||||
flicvideo.c Mike Melanson
|
||||
@@ -163,11 +154,9 @@ Codecs:
|
||||
jvdec.c Peter Ross
|
||||
kmvc.c Kostya Shishkov
|
||||
lcl*.c Roberto Togni, Reimar Doeffinger
|
||||
libcelt_dec.c Nicolas George
|
||||
libgsm.c Michel Bardiaux
|
||||
libdirac* David Conrad
|
||||
libopenjpeg.c Jaikrishnan Menon
|
||||
libopenjpegenc.c Michael Bradshaw
|
||||
libschroedinger* David Conrad
|
||||
libspeexdec.c Justin Ruggles
|
||||
libtheoraenc.c David Conrad
|
||||
@@ -222,9 +211,7 @@ Codecs:
|
||||
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
||||
txd.c Ivo van Poorten
|
||||
ulti* Kostya Shishkov
|
||||
v410*.c Derek Buitenhuis
|
||||
vb.c Kostya Shishkov
|
||||
vble.c Derek Buitenhuis
|
||||
vc1* Kostya Shishkov
|
||||
vcr1.c Michael Niedermayer
|
||||
vmnc.c Kostya Shishkov
|
||||
@@ -248,9 +235,7 @@ Codecs:
|
||||
Hardware acceleration:
|
||||
crystalhd.c Philip Langdale
|
||||
dxva2* Laurent Aimar
|
||||
libstagefright.cpp Mohamed Naufal
|
||||
vaapi* Gwenole Beauchesne
|
||||
vda* Sebastien Zwickert
|
||||
vdpau* Carl Eugen Hoyos
|
||||
|
||||
|
||||
@@ -265,18 +250,6 @@ libavdevice
|
||||
vfwcap.c Ramiro Polla
|
||||
|
||||
|
||||
libavfilter
|
||||
===========
|
||||
|
||||
Video filters:
|
||||
graphdump.c Nicolas George
|
||||
af_amerge.c Nicolas George
|
||||
af_astreamsync.c Nicolas George
|
||||
af_pan.c Nicolas George
|
||||
vsrc_mandelbrot.c Michael Niedermayer
|
||||
vf_yadif.c Michael Niedermayer
|
||||
|
||||
|
||||
libavformat
|
||||
===========
|
||||
|
||||
@@ -314,7 +287,6 @@ Muxers/Demuxers:
|
||||
img2.c Michael Niedermayer
|
||||
iss.c Stefan Gehrer
|
||||
jvdec.c Peter Ross
|
||||
libmodplug.c Clément Bœsch
|
||||
libnut.c Oded Shimon
|
||||
lmlm4.c Ivo van Poorten
|
||||
lxfdec.c Tomas Härdin
|
||||
@@ -333,7 +305,6 @@ Muxers/Demuxers:
|
||||
msnwc_tcp.c Ramiro Polla
|
||||
mtv.c Reynaldo H. Verdejo Pinochet
|
||||
mxf* Baptiste Coudurier
|
||||
mxfdec.c Tomas Härdin
|
||||
nsvdec.c Francois Revol
|
||||
nut.c Michael Niedermayer
|
||||
nuv.c Reimar Doeffinger
|
||||
@@ -353,7 +324,6 @@ Muxers/Demuxers:
|
||||
rtpdec_asf.* Ronald S. Bultje
|
||||
rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo
|
||||
rtsp.c Luca Barbato
|
||||
sbgdec.c Nicolas George
|
||||
sdp.c Martin Storsjo
|
||||
segafilm.c Mike Melanson
|
||||
siff.c Kostya Shishkov
|
||||
@@ -392,15 +362,8 @@ Sparc Roman Shaposhnik
|
||||
x86 Michael Niedermayer
|
||||
|
||||
|
||||
Releases
|
||||
========
|
||||
|
||||
0.9 Michael Niedermayer
|
||||
|
||||
|
||||
|
||||
GnuPG Fingerprints of maintainers and contributors
|
||||
==================================================
|
||||
GnuPG Fingerprints of maintainers and others who have svn write access
|
||||
======================================================================
|
||||
|
||||
Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB
|
||||
Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB
|
||||
@@ -414,11 +377,9 @@ Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4
|
||||
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
||||
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
||||
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
||||
Lou Logan 7D68 DC73 CBEF EABB 671A B6CF 621C 2E28 82F8 DC3A
|
||||
Luca Barbato 6677 4209 213C 8843 5B67 29E7 E84C 78C2 84E9 0E34
|
||||
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
|
||||
Nicolas George 24CE 01CE 9ACC 5CEB 74D8 8D9D B063 D997 36E5 4C93
|
||||
Panagiotis Issaris 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029
|
||||
Panagiotis Issaris 515C E262 10A8 FDCE 5481 7B9C 3AD7 D9A5 071D B3A9
|
||||
Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B
|
||||
Reimar Döffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7
|
||||
Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4
|
||||
|
255
Makefile
255
Makefile
@@ -1,14 +1,13 @@
|
||||
MAIN_MAKEFILE=1
|
||||
include config.mak
|
||||
|
||||
vpath %.c $(SRC_PATH)
|
||||
vpath %.cpp $(SRC_PATH)
|
||||
vpath %.h $(SRC_PATH)
|
||||
vpath %.S $(SRC_PATH)
|
||||
vpath %.asm $(SRC_PATH)
|
||||
vpath %.v $(SRC_PATH)
|
||||
vpath %.texi $(SRC_PATH)
|
||||
vpath %/fate_config.sh.template $(SRC_PATH)
|
||||
SRC_DIR = $(SRC_PATH_BARE)
|
||||
|
||||
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_FFPLAY) += ffplay
|
||||
@@ -16,57 +15,58 @@ PROGS-$(CONFIG_FFPROBE) += ffprobe
|
||||
PROGS-$(CONFIG_FFSERVER) += ffserver
|
||||
|
||||
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
||||
INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
|
||||
PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
|
||||
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
|
||||
HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
||||
TOOLS = qt-faststart trasher
|
||||
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
||||
|
||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||
ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF))
|
||||
ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
|
||||
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
||||
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
||||
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||
|
||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||
|
||||
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
||||
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
||||
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
||||
FFLIBS-$(CONFIG_AVCODEC) += avcodec
|
||||
FFLIBS-$(CONFIG_POSTPROC) += postproc
|
||||
FFLIBS-$(CONFIG_SWRESAMPLE)+= swresample
|
||||
FFLIBS-$(CONFIG_SWSCALE) += swscale
|
||||
|
||||
FFLIBS := avutil
|
||||
|
||||
DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
|
||||
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset)
|
||||
|
||||
SKIPHEADERS = cmdutils_common_opts.h
|
||||
|
||||
include $(SRC_PATH)/common.mak
|
||||
include common.mak
|
||||
|
||||
FF_LDFLAGS := $(FFLDFLAGS)
|
||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||
FF_DEP_LIBS := $(DEP_LIBS)
|
||||
|
||||
all: $(PROGS)
|
||||
all-$(CONFIG_DOC): documentation
|
||||
|
||||
$(PROGS): %$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
||||
$(CP) $< $@$(PROGSSUF)
|
||||
$(STRIP) $@$(PROGSSUF)
|
||||
all: $(FF_DEP_LIBS) $(PROGS)
|
||||
|
||||
$(TOOLS): %$(EXESUF): %.o
|
||||
$(LD) $(LDFLAGS) -o $@ $< $(ELIBS)
|
||||
|
||||
tools/cws2fws$(EXESUF): ELIBS = -lz
|
||||
$(PROGS): %$(EXESUF): %_g$(EXESUF)
|
||||
$(CP) $< $@
|
||||
$(STRIP) $@
|
||||
|
||||
config.h: .config
|
||||
.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
|
||||
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
|
||||
@-tput bold 2>/dev/null
|
||||
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
||||
@-tput sgr0 2>/dev/null
|
||||
|
||||
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
|
||||
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
|
||||
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS TOOLS
|
||||
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS
|
||||
|
||||
define RESET
|
||||
$(1) :=
|
||||
@@ -76,26 +76,31 @@ endef
|
||||
define DOSUBDIR
|
||||
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
|
||||
SUBDIR := $(1)/
|
||||
include $(SRC_PATH)/$(1)/Makefile
|
||||
-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
|
||||
include $(SRC_PATH)/library.mak
|
||||
include $(1)/Makefile
|
||||
endef
|
||||
|
||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||
|
||||
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
||||
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
||||
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
|
||||
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
|
||||
|
||||
%$(PROGSSUF)_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||
$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||
|
||||
OBJDIRS += tools
|
||||
alltools: $(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 tests/*.d)
|
||||
|
||||
VERSION_SH = $(SRC_PATH)/version.sh
|
||||
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
||||
VERSION_SH = $(SRC_PATH_BARE)/version.sh
|
||||
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
|
||||
|
||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
||||
.version: M=@
|
||||
@@ -107,6 +112,28 @@ version.h .version:
|
||||
# force version.sh to run whenever version might have changed
|
||||
-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
|
||||
install: install-progs install-data
|
||||
endif
|
||||
@@ -116,17 +143,22 @@ install: install-libs install-headers
|
||||
install-libs: install-libs-yes
|
||||
|
||||
install-progs-yes:
|
||||
install-progs-$(CONFIG_DOC): install-man
|
||||
install-progs-$(CONFIG_SHARED): install-libs
|
||||
|
||||
install-progs: install-progs-yes $(PROGS)
|
||||
$(Q)mkdir -p "$(BINDIR)"
|
||||
$(INSTALL) -c -m 755 $(INSTPROGS) "$(BINDIR)"
|
||||
$(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)"
|
||||
|
||||
install-data: $(DATA_FILES)
|
||||
$(Q)mkdir -p "$(DATADIR)"
|
||||
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
||||
|
||||
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
|
||||
install-man: $(MANPAGES)
|
||||
$(Q)mkdir -p "$(MANDIR)/man1"
|
||||
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||
|
||||
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data uninstall-man
|
||||
|
||||
uninstall-progs:
|
||||
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
||||
@@ -134,12 +166,21 @@ uninstall-progs:
|
||||
uninstall-data:
|
||||
$(RM) -r "$(DATADIR)"
|
||||
|
||||
clean::
|
||||
uninstall-man:
|
||||
$(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) $(CLEANSUFFIXES)
|
||||
$(RM) doc/*.html doc/*.pod doc/*.1 doc/*.d doc/*~
|
||||
$(RM) $(TOOLS)
|
||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||
$(RM) coverage.info
|
||||
$(RM) -r coverage-html
|
||||
|
||||
distclean::
|
||||
$(RM) $(DISTCLEANSUFFIXES)
|
||||
@@ -148,30 +189,122 @@ distclean::
|
||||
config:
|
||||
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
||||
|
||||
# Without the sed genthml thinks "libavutil" and "./libavutil" are two different things
|
||||
coverage.info: $(wildcard *.gcda *.gcno */*.gcda */*.gcno */*/*.gcda */*/*.gcno)
|
||||
$(Q)lcov -c -d . -b . | sed -e 's#/./#/#g' > $@
|
||||
# regression tests
|
||||
|
||||
coverage-html: coverage.info
|
||||
$(Q)mkdir -p $@
|
||||
$(Q)genhtml -o $@ $<
|
||||
$(Q)touch $@
|
||||
check: test
|
||||
|
||||
check: all alltools checkheaders examples testprogs fate
|
||||
fulltest test: codectest lavftest lavfitest seektest
|
||||
|
||||
include $(SRC_PATH)/doc/Makefile
|
||||
include $(SRC_PATH)/tests/Makefile
|
||||
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
||||
|
||||
$(sort $(OBJDIRS)):
|
||||
$(Q)mkdir -p $@
|
||||
codectest: fate-codec
|
||||
lavftest: fate-lavf
|
||||
lavfitest: fate-lavfi
|
||||
seektest: fate-seek
|
||||
|
||||
# Dummy rule to stop make trying to rebuild removed or renamed headers
|
||||
%.h:
|
||||
@:
|
||||
AREF = fate-acodec-aref
|
||||
VREF = fate-vsynth1-vref fate-vsynth2-vref
|
||||
REFS = $(AREF) $(VREF)
|
||||
|
||||
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
||||
# so this saves some time on slow systems.
|
||||
.SUFFIXES:
|
||||
$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
||||
$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
|
||||
|
||||
.PHONY: all all-yes alltools check *clean config examples install*
|
||||
.PHONY: testprogs uninstall*
|
||||
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*
|
||||
|
1064
cmdutils.c
1064
cmdutils.c
File diff suppressed because it is too large
Load Diff
143
cmdutils.h
143
cmdutils.h
@@ -43,15 +43,11 @@ extern const char program_name[];
|
||||
*/
|
||||
extern const int program_birth_year;
|
||||
|
||||
/**
|
||||
* this year, defined by the program for show_banner()
|
||||
*/
|
||||
extern const int this_year;
|
||||
|
||||
extern const char **opt_names;
|
||||
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||
extern AVFormatContext *avformat_opts;
|
||||
extern struct SwsContext *sws_opts;
|
||||
extern AVDictionary *format_opts, *codec_opts;
|
||||
extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
||||
|
||||
/**
|
||||
* Initialize the cmdutils option system, in particular
|
||||
@@ -81,12 +77,6 @@ int opt_default(const char *opt, const char *arg);
|
||||
*/
|
||||
int opt_loglevel(const char *opt, const char *arg);
|
||||
|
||||
int opt_report(const char *opt);
|
||||
|
||||
int opt_max_alloc(const char *opt, const char *arg);
|
||||
|
||||
int opt_codec_debug(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Limit the execution time.
|
||||
*/
|
||||
@@ -98,15 +88,14 @@ int opt_timelimit(const char *opt, const char *arg);
|
||||
* parsed or the corresponding value is invalid.
|
||||
*
|
||||
* @param context the context of the value to be set (e.g. the
|
||||
* corresponding command line option name)
|
||||
* corresponding commandline option name)
|
||||
* @param numstr the string to be parsed
|
||||
* @param type the type (OPT_INT64 or OPT_FLOAT) as which the
|
||||
* string should be parsed
|
||||
* @param min the minimum valid accepted value
|
||||
* @param max the maximum valid accepted value
|
||||
*/
|
||||
double parse_number_or_die(const char *context, const char *numstr, int type,
|
||||
double min, double max);
|
||||
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
|
||||
|
||||
/**
|
||||
* Parse a string specifying a time and return its corresponding
|
||||
@@ -114,7 +103,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
|
||||
* the string cannot be correctly parsed.
|
||||
*
|
||||
* @param context the context of the value to be set (e.g. the
|
||||
* corresponding command line option name)
|
||||
* corresponding commandline option name)
|
||||
* @param timestr the string to be parsed
|
||||
* @param is_duration a flag which tells how to interpret timestr, if
|
||||
* not zero timestr is interpreted as a duration, otherwise as a
|
||||
@@ -122,19 +111,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
|
||||
*
|
||||
* @see parse_date()
|
||||
*/
|
||||
int64_t parse_time_or_die(const char *context, const char *timestr,
|
||||
int is_duration);
|
||||
|
||||
typedef struct SpecifierOpt {
|
||||
char *specifier; /**< stream/chapter/program/... specifier */
|
||||
union {
|
||||
uint8_t *str;
|
||||
int i;
|
||||
int64_t i64;
|
||||
float f;
|
||||
double dbl;
|
||||
} u;
|
||||
} SpecifierOpt;
|
||||
int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration);
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
@@ -152,95 +129,31 @@ typedef struct {
|
||||
#define OPT_INT64 0x0400
|
||||
#define OPT_EXIT 0x0800
|
||||
#define OPT_DATA 0x1000
|
||||
#define OPT_FUNC2 0x2000
|
||||
#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */
|
||||
#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt.
|
||||
Implies OPT_OFFSET. Next element after the offset is
|
||||
an int containing element count in the array. */
|
||||
#define OPT_TIME 0x10000
|
||||
#define OPT_DOUBLE 0x20000
|
||||
union {
|
||||
void *dst_ptr;
|
||||
int *int_arg;
|
||||
char **str_arg;
|
||||
float *float_arg;
|
||||
int (*func_arg)(const char *, const char *);
|
||||
int (*func2_arg)(void *, const char *, const char *);
|
||||
size_t off;
|
||||
int64_t *int64_arg;
|
||||
} u;
|
||||
const char *help;
|
||||
const char *argname;
|
||||
} OptionDef;
|
||||
|
||||
void show_help_options(const OptionDef *options, const char *msg, int mask,
|
||||
int value);
|
||||
|
||||
/**
|
||||
* Show help for all options with given flags in class and all its
|
||||
* children.
|
||||
*/
|
||||
void show_help_children(const AVClass *class, int flags);
|
||||
void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
|
||||
|
||||
/**
|
||||
* Parse the command line arguments.
|
||||
*
|
||||
* @param optctx an opaque options context
|
||||
* @param options Array with the definitions required to interpret every
|
||||
* option of the form: -option_name [argument]
|
||||
* @param parse_arg_function Name of the function called to process every
|
||||
* argument without a leading option name flag. NULL if such arguments do
|
||||
* not have to be processed.
|
||||
*/
|
||||
void parse_options(void *optctx, int argc, char **argv, const OptionDef *options,
|
||||
void (* parse_arg_function)(void *optctx, const char*));
|
||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||
int (* parse_arg_function)(const char *opt, const char *arg));
|
||||
|
||||
/**
|
||||
* Parse one given option.
|
||||
*
|
||||
* @return on success 1 if arg was consumed, 0 otherwise; negative number on error
|
||||
*/
|
||||
int parse_option(void *optctx, const char *opt, const char *arg,
|
||||
const OptionDef *options);
|
||||
|
||||
/**
|
||||
* Find the '-loglevel' option in the command line args and apply it.
|
||||
*/
|
||||
void parse_loglevel(int argc, char **argv, const OptionDef *options);
|
||||
|
||||
/**
|
||||
* Check if the given stream matches a stream specifier.
|
||||
*
|
||||
* @param s Corresponding format context.
|
||||
* @param st Stream from s to be checked.
|
||||
* @param spec A stream specifier of the [v|a|s|d]:[\<stream index\>] form.
|
||||
*
|
||||
* @return 1 if the stream matches, 0 if it doesn't, <0 on error
|
||||
*/
|
||||
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
|
||||
|
||||
/**
|
||||
* 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 s Corresponding format context.
|
||||
* @param st A stream from s for which the options should be filtered.
|
||||
* @return a pointer to the created dictionary
|
||||
*/
|
||||
AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec,
|
||||
AVFormatContext *s, AVStream *st);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);
|
||||
|
||||
/**
|
||||
* Print an error message to stderr, indicating filename and a human
|
||||
@@ -258,7 +171,7 @@ void print_error(const char *filename, int err);
|
||||
* current version of the repository and of the libav* libraries used by
|
||||
* the program.
|
||||
*/
|
||||
void show_banner(int argc, char **argv, const OptionDef *options);
|
||||
void show_banner(void);
|
||||
|
||||
/**
|
||||
* Print the version of the program to stdout. The version message
|
||||
@@ -317,12 +230,6 @@ int opt_protocols(const char *opt, const char *arg);
|
||||
*/
|
||||
int opt_pix_fmts(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the sample formats supported by the
|
||||
* program.
|
||||
*/
|
||||
int show_sample_fmts(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Return a positive value if a line read from standard input
|
||||
* starts with [yY], otherwise return 0.
|
||||
@@ -338,7 +245,7 @@ int read_yesno(void);
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR error code in case of failure.
|
||||
*/
|
||||
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
||||
int read_file(const char *filename, char **bufptr, size_t *size);
|
||||
|
||||
/**
|
||||
* Get a file corresponding to a preset file.
|
||||
@@ -361,20 +268,4 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
||||
FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
const char *preset_name, int is_path, const char *codec_name);
|
||||
|
||||
/**
|
||||
* Do all the necessary cleanup and abort.
|
||||
* This function is implemented in the avtools, not cmdutils.
|
||||
*/
|
||||
void exit_program(int ret);
|
||||
|
||||
/**
|
||||
* Realloc array to hold new_size elements of elem_size.
|
||||
* Calls exit_program() on failure.
|
||||
*
|
||||
* @param elem_size size in bytes of each element
|
||||
* @param size new element count will be written here
|
||||
* @return reallocated array
|
||||
*/
|
||||
void *grow_array(void *array, int elem_size, int *size, int new_size);
|
||||
|
||||
#endif /* CMDUTILS_H */
|
||||
#endif /* FFMPEG_CMDUTILS_H */
|
||||
|
@@ -10,9 +10,4 @@
|
||||
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
|
||||
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
|
||||
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
|
||||
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
|
||||
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||
{ "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||
{ "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },
|
||||
{ "report", 0, {(void*)opt_report}, "generate a report" },
|
||||
{ "max_alloc", HAS_ARG, {(void*)opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
|
||||
|
78
common.mak
78
common.mak
@@ -10,7 +10,7 @@ ifndef SUBDIR
|
||||
ifndef V
|
||||
Q = @
|
||||
ECHO = printf "$(1)\t%s\n" $(2)
|
||||
BRIEF = CC CXX AS YASM AR LD HOSTCC STRIP CP
|
||||
BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
|
||||
SILENT = DEPCC YASMDEP RM RANLIB
|
||||
MSG = $@
|
||||
M = @$(call ECHO,$(TAG),$@);
|
||||
@@ -20,38 +20,20 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
|
||||
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
||||
endif
|
||||
|
||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
|
||||
IFLAGS := -I. -I$(SRC_PATH)
|
||||
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)
|
||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
||||
YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
|
||||
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_CXX = $(call COMPILE,CXX)
|
||||
COMPILE_S = $(call COMPILE,AS)
|
||||
|
||||
%.o: %.c
|
||||
$(COMPILE_C)
|
||||
|
||||
%.o: %.cpp
|
||||
$(COMPILE_CXX)
|
||||
|
||||
%.s: %.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $<
|
||||
$(CCDEP)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
|
||||
|
||||
%.o: %.S
|
||||
$(COMPILE_S)
|
||||
$(ASDEP)
|
||||
$(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
|
||||
|
||||
%.ho: %.h
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
||||
@@ -79,51 +61,31 @@ OBJS += $(OBJS-yes)
|
||||
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
||||
TESTPROGS += $(TESTPROGS-yes)
|
||||
|
||||
FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
|
||||
FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
|
||||
FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS)
|
||||
|
||||
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
|
||||
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
|
||||
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
|
||||
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
|
||||
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
|
||||
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
|
||||
TOOLS += $(TOOLS-yes)
|
||||
TOOLOBJS := $(TOOLS:%=tools/%.o)
|
||||
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
||||
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
|
||||
OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
|
||||
TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
|
||||
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
|
||||
HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
|
||||
HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
|
||||
|
||||
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))
|
||||
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
||||
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
||||
SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
|
||||
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
|
||||
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
||||
|
||||
alltools: $(TOOLS)
|
||||
|
||||
$(HOSTOBJS): %.o: %.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
||||
|
||||
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
||||
$(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 *.gcno *.gcda
|
||||
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
||||
DISTCLEANSUFFIXES = *.pc
|
||||
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
||||
|
||||
define RULES
|
||||
clean::
|
||||
$(RM) $(OBJS) $(OBJS:.o=.d)
|
||||
$(RM) $(HOSTPROGS)
|
||||
$(RM) $(TOOLS)
|
||||
endef
|
||||
|
||||
$(eval $(RULES))
|
||||
|
||||
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
|
||||
|
375
doc/APIchanges
375
doc/APIchanges
@@ -13,237 +13,8 @@ libavutil: 2011-04-18
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2012-01-24 - xxxxxxx - lavfi 2.60.100
|
||||
Add avfilter_graph_dump.
|
||||
|
||||
2012-01-25 - lavf 53.31.100 / 53.22.0
|
||||
3c5fe5b / f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
|
||||
buffered data within a muxer. Added AVFMT_ALLOW_FLUSH for
|
||||
muxers supporting it (av_write_frame makes sure it is called
|
||||
only for muxers with this flag).
|
||||
|
||||
2012-03-04 - 7f3f855 - lavu 51.22.1 - error.h
|
||||
Add AVERROR_UNKNOWN
|
||||
|
||||
2012-02-29 - 2ad77c6 - lavf 53.21.1
|
||||
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
|
||||
|
||||
2012-02-29 - a1556d3 - lavu 51.22.0 - intfloat.h
|
||||
Add a new installed header libavutil/intfloat.h with int/float punning
|
||||
functions.
|
||||
|
||||
2012-02-17 - 350d06d - lavc 53.35.0
|
||||
Add avcodec_is_open() function.
|
||||
|
||||
2012-01-15 - lavc 53.56.105 / 53.34.0
|
||||
New audio encoding API:
|
||||
67f5650 / b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
|
||||
encoders.
|
||||
67f5650 / 5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
|
||||
67f5650 / b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
|
||||
Add AVCodec.encode2().
|
||||
|
||||
2012-01-12 - b18e17e / 3167dc9 - lavfi 2.59.100 / 2.15.0
|
||||
Add a new installed header -- libavfilter/version.h -- with version macros.
|
||||
|
||||
2011-12-08 - a502939 - lavfi 2.52.0
|
||||
Add av_buffersink_poll_frame() to buffersink.h.
|
||||
|
||||
2011-12-08 - xxxxxxx - lavu 51.31.0
|
||||
Add av_log_format_line.
|
||||
|
||||
2011-12-03 - xxxxxxx - lavu 51.30.0
|
||||
Add AVERROR_BUG.
|
||||
|
||||
2011-xx-xx - xxxxxxx - lavu 51.28.1
|
||||
Add av_get_alt_sample_fmt() to samplefmt.h.
|
||||
|
||||
2011-11-03 - 96949da - lavu 51.23.0
|
||||
Add av_strcasecmp() and av_strncasecmp() to avstring.h.
|
||||
|
||||
2011-10-20 - b35e9e1 - lavu 51.22.0
|
||||
Add av_strtok() to avstring.h.
|
||||
|
||||
2012-01-03 - ad1c8dd / b73ec05 - lavu 51.34.100 / 51.21.0
|
||||
Add av_popcount64
|
||||
|
||||
2011-12-18 - 7c29313 / 8400b12 - lavc 53.46.1 / 53.28.1
|
||||
Deprecate AVFrame.age. The field is unused.
|
||||
|
||||
2011-12-12 - 8bc7fe4 / 5266045 - lavf 53.25.0 / 53.17.0
|
||||
Add avformat_close_input().
|
||||
Deprecate av_close_input_file() and av_close_input_stream().
|
||||
|
||||
2011-12-02 - e4de716 / 0eea212 - lavc 53.40.0 / 53.25.0
|
||||
Add nb_samples and extended_data fields to AVFrame.
|
||||
Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE.
|
||||
Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4().
|
||||
avcodec_decode_audio4() writes output samples to an AVFrame, which allows
|
||||
audio decoders to use get_buffer().
|
||||
|
||||
2011-12-04 - e4de716 / 560f773 - lavc 53.40.0 / 53.24.0
|
||||
Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump.
|
||||
Change AVPicture.data[4]/linesize[4] to [8] at next major bump.
|
||||
Change AVCodecContext.error[4] to [8] at next major bump.
|
||||
Add AV_NUM_DATA_POINTERS to simplify the bump transition.
|
||||
|
||||
2011-11-23 - 8e576d5 / bbb46f3 - lavu 51.27.0 / 51.18.0
|
||||
Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and
|
||||
av_samples_alloc(), to samplefmt.h.
|
||||
|
||||
2011-11-23 - 8e576d5 / 8889cc4 - lavu 51.27.0 / 51.17.0
|
||||
Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h.
|
||||
|
||||
2011-11-19 - dbb38bc / f3a29b7 - lavc 53.36.0 / 53.21.0
|
||||
Move some AVCodecContext fields to a new private struct, AVCodecInternal,
|
||||
which is accessed from a new field, AVCodecContext.internal.
|
||||
- fields moved:
|
||||
AVCodecContext.internal_buffer --> AVCodecInternal.buffer
|
||||
AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count
|
||||
AVCodecContext.is_copy --> AVCodecInternal.is_copy
|
||||
|
||||
2011-11-16 - 8709ba9 / 6270671 - lavu 51.26.0 / 51.16.0
|
||||
Add av_timegm()
|
||||
|
||||
2011-11-13 - lavf 53.21.0 / 53.15.0
|
||||
New interrupt callback API, allowing per-AVFormatContext/AVIOContext
|
||||
interrupt callbacks.
|
||||
5f268ca / 6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to
|
||||
AVFormatContext.
|
||||
5f268ca / 1dee0ac Add avio_open2() with additional parameters. Those are
|
||||
an interrupt callback and an options AVDictionary.
|
||||
This will allow passing AVOptions to protocols after lavf
|
||||
54.0.
|
||||
|
||||
2011-11-06 - 13b7781 / ba04ecf - lavu 51.24.0 / 51.14.0
|
||||
Add av_strcasecmp() and av_strncasecmp() to avstring.h.
|
||||
|
||||
2011-11-06 - 13b7781 / 07b172f - lavu 51.24.0 / 51.13.0
|
||||
Add av_toupper()/av_tolower()
|
||||
|
||||
2011-11-05 - d8cab5c / b6d08f4 - lavf 53.19.0 / 53.13.0
|
||||
Add avformat_network_init()/avformat_network_uninit()
|
||||
|
||||
2011-10-27 - 6faf0a2 / 512557b - lavc 53.24.0 / 53.15.0
|
||||
Remove avcodec_parse_frame.
|
||||
Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY.
|
||||
|
||||
2011-10-19 - d049257 / 569129a - lavf 53.17.0 / 53.10.0
|
||||
Add avformat_new_stream(). Deprecate av_new_stream().
|
||||
|
||||
2011-10-13 - 91eb1b1 / b631fba - lavf 53.16.0 / 53.9.0
|
||||
Add AVFMT_NO_BYTE_SEEK AVInputFormat flag.
|
||||
|
||||
2011-10-12 - lavu 51.21.0 / 51.12.0
|
||||
AVOptions API rewrite.
|
||||
|
||||
- f884ef0 / 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_*
|
||||
- new setting/getting functions with slightly different semantics:
|
||||
f884ef0 / dac66da av_set_string3 -> av_opt_set
|
||||
av_set_double -> av_opt_set_double
|
||||
av_set_q -> av_opt_set_q
|
||||
av_set_int -> av_opt_set_int
|
||||
|
||||
f884ef0 / 41d9d51 av_get_string -> av_opt_get
|
||||
av_get_double -> av_opt_get_double
|
||||
av_get_q -> av_opt_get_q
|
||||
av_get_int -> av_opt_get_int
|
||||
|
||||
- f884ef0 / 8c5dcaa trivial rename av_next_option -> av_opt_next
|
||||
- f884ef0 / 641c7af new functions - av_opt_child_next, av_opt_child_class_next
|
||||
and av_opt_find2()
|
||||
|
||||
2011-09-22 - a70e787 - lavu 51.17.0
|
||||
Add av_x_if_null().
|
||||
|
||||
2011-09-18 - 645cebb - lavc 53.16.0
|
||||
Add showall flag2
|
||||
|
||||
2011-09-16 - ea8de10 - lavfi 2.42.0
|
||||
Add avfilter_all_channel_layouts.
|
||||
|
||||
2011-09-16 - 9899037 - lavfi 2.41.0
|
||||
Rename avfilter_all_* function names to avfilter_make_all_*.
|
||||
|
||||
In particular, apply the renames:
|
||||
avfilter_all_formats -> avfilter_make_all_formats
|
||||
avfilter_all_channel_layouts -> avfilter_make_all_channel_layouts
|
||||
avfilter_all_packing_formats -> avfilter_make_all_packing_formats
|
||||
|
||||
2011-09-12 - 4381bdd - lavfi 2.40.0
|
||||
Change AVFilterBufferRefAudioProps.sample_rate type from uint32_t to int.
|
||||
|
||||
2011-09-12 - 2c03174 - lavfi 2.40.0
|
||||
Simplify signature for avfilter_get_audio_buffer(), make it
|
||||
consistent with avfilter_get_video_buffer().
|
||||
|
||||
2011-09-06 - 4f7dfe1 - lavfi 2.39.0
|
||||
Rename libavfilter/vsink_buffer.h to libavfilter/buffersink.h.
|
||||
|
||||
2011-09-06 - c4415f6 - lavfi 2.38.0
|
||||
Unify video and audio sink API.
|
||||
|
||||
In particular, add av_buffersink_get_buffer_ref(), deprecate
|
||||
av_vsink_buffer_get_video_buffer_ref() and change the value for the
|
||||
opaque field passed to the abuffersink init function.
|
||||
|
||||
2011-09-04 - 61e2e29 - lavu 51.16.0
|
||||
Add av_asprintf().
|
||||
|
||||
2011-08-22 - dacd827 - lavf 53.10.0
|
||||
Add av_find_program_from_stream().
|
||||
|
||||
2011-08-20 - 69e2c1a - lavu 51.13.0
|
||||
Add av_get_media_type_string().
|
||||
|
||||
2011-09-03 - 1889c67 / fb4ca26 - lavc 53.13.0
|
||||
lavf 53.11.0
|
||||
lsws 2.1.0
|
||||
Add {avcodec,avformat,sws}_get_class().
|
||||
|
||||
2011-08-03 - 1889c67 / c11fb82 - lavu 51.15.0
|
||||
Add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find() function.
|
||||
|
||||
2011-08-14 - 323b930 - lavu 51.12.0
|
||||
Add av_fifo_peek2(), deprecate av_fifo_peek().
|
||||
|
||||
2011-08-26 - lavu 51.14.0 / 51.9.0
|
||||
- 976a8b2 / add41de..976a8b2 / abc78a5 Do not include intfloat_readwrite.h,
|
||||
mathematics.h, rational.h, pixfmt.h, or log.h from avutil.h.
|
||||
|
||||
2011-08-16 - 27fbe31 / 48f9e45 - lavf 53.11.0 / 53.8.0
|
||||
Add avformat_query_codec().
|
||||
|
||||
2011-08-16 - 27fbe31 / bca06e7 - lavc 53.11.0
|
||||
Add avcodec_get_type().
|
||||
|
||||
2011-08-06 - 0cb233c / 2f63440 - lavf 53.7.0
|
||||
Add error_recognition to AVFormatContext.
|
||||
|
||||
2011-08-02 - 1d186e9 / 9d39cbf - lavc 53.9.1
|
||||
Add AV_PKT_FLAG_CORRUPT AVPacket flag.
|
||||
|
||||
2011-07-16 - b57df29 - lavfi 2.27.0
|
||||
Add audio packing negotiation fields and helper functions.
|
||||
|
||||
In particular, add AVFilterPacking enum, planar, in_packings and
|
||||
out_packings fields to AVFilterLink, and the functions:
|
||||
avfilter_set_common_packing_formats()
|
||||
avfilter_all_packing_formats()
|
||||
|
||||
2011-07-10 - 3602ad7 / a67c061 - lavf 53.6.0
|
||||
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||
|
||||
2011-07-10 - 3602ad7 / 0b950fe - lavc 53.8.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 - fd2c0a5 - lavfi 2.23.0 - avfilter.h
|
||||
2011-06-19 - xxxxxxx - lavfi 2.23.0 - avfilter.h
|
||||
Add layout negotiation fields and helper functions.
|
||||
|
||||
In particular, add in_chlayouts and out_chlayouts to AVFilterLink,
|
||||
@@ -252,7 +23,7 @@ API changes, most recent first:
|
||||
avfilter_set_common_channel_layouts()
|
||||
avfilter_all_channel_layouts()
|
||||
|
||||
2011-06-19 - 527ca39 - lavfi 2.22.0 - AVFilterFormats
|
||||
2011-06-19 - xxxxxxx - lavfi 2.22.0 - AVFilterFormats
|
||||
Change type of AVFilterFormats.formats from int * to int64_t *,
|
||||
and update formats handling API accordingly.
|
||||
|
||||
@@ -260,48 +31,51 @@ API changes, most recent first:
|
||||
it to int64_t. A new function, avfilter_make_format64_list(), that
|
||||
takes int64_t arrays has been added.
|
||||
|
||||
2011-06-19 - 44f669e - lavfi 2.21.0 - vsink_buffer.h
|
||||
2011-06-19 - xxxxxxx - lavfi 2.21.0 - vsink_buffer.h
|
||||
Add video sink buffer and vsink_buffer.h public header.
|
||||
|
||||
2011-06-12 - 9fdf772 - lavfi 2.18.0 - avcodec.h
|
||||
2011-06-12 - xxxxxxx - lavfi 2.18.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() function in
|
||||
libavfilter/avcodec.h.
|
||||
|
||||
2011-06-12 - c535494 - lavfi 2.17.0 - avfiltergraph.h
|
||||
2011-06-12 - xxxxxxx - lavfi 2.17.0 - avfiltergraph.h
|
||||
Add avfilter_inout_alloc() and avfilter_inout_free() functions.
|
||||
|
||||
2011-06-12 - 6119b23 - lavfi 2.16.0 - avfilter_graph_parse()
|
||||
2011-06-12 - xxxxxxx - lavfi 2.16.0 - avfilter_graph_parse()
|
||||
Change avfilter_graph_parse() signature.
|
||||
|
||||
2011-06-23 - 686959e / 67e9ae1 - lavu 51.10.0 / 51.8.0 - attributes.h
|
||||
Add av_printf_format().
|
||||
2011-07-10 - xxxxxxx - lavf 53.3.0
|
||||
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||
|
||||
2011-06-16 - 2905e3f / 05e84c9, 2905e3f / 25de595 - lavf 53.4.0 / 53.2.0 - avformat.h
|
||||
2011-07-10 - xxxxxxx - lavc 53.6.0
|
||||
Add avcodec_open2(), deprecate avcodec_open().
|
||||
|
||||
2011-06-xx - xxxxxxx - lavf 53.2.0 - avformat.h
|
||||
Add avformat_open_input and avformat_write_header().
|
||||
Deprecate av_open_input_stream, av_open_input_file,
|
||||
AVFormatParameters and av_write_header.
|
||||
|
||||
2011-06-16 - 2905e3f / 7e83e1c, 2905e3f / dc59ec5 - lavu 51.9.0 / 51.7.0 - opt.h
|
||||
2011-06-xx - xxxxxxx - lavu 51.7.0 - opt.h
|
||||
Add av_opt_set_dict() and av_opt_find().
|
||||
Deprecate av_find_opt().
|
||||
Add AV_DICT_APPEND flag.
|
||||
|
||||
2011-06-10 - 45fb647 / cb7c11c - lavu 51.6.0 - opt.h
|
||||
2011-06-xx - xxxxxxx - lavu 51.6.0 - opt.h
|
||||
Add av_opt_flag_is_set().
|
||||
|
||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
||||
|
||||
2011-06-09 - f9ecb84 / d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
2011-06-09 - d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
Move AVMetadata from lavf to lavu and rename it to
|
||||
AVDictionary -- new installed header dict.h.
|
||||
All av_metadata_* functions renamed to av_dict_*.
|
||||
|
||||
2011-06-07 - d552f61 / a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
2011-06-07 - a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
||||
Deprecate av_get_bits_per_sample_fmt().
|
||||
|
||||
2011-06-05 - f956924 / b39b062 - lavu 51.8.0 - opt.h
|
||||
2011-06-xx - b39b062 - lavu 51.8.0 - opt.h
|
||||
Add av_opt_free convenience function.
|
||||
|
||||
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
||||
@@ -331,7 +105,7 @@ API changes, most recent first:
|
||||
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
||||
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
||||
|
||||
2011-05-25 - 39e4206 / 30315a8 - lavf 53.3.0 - avformat.h
|
||||
2011-05-25 - 30315a8 - lavf 53.3.0 - avformat.h
|
||||
Add fps_probe_size to AVFormatContext.
|
||||
|
||||
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
||||
@@ -347,10 +121,10 @@ API changes, most recent first:
|
||||
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
||||
|
||||
2011-05-18 - 75a37b5 / 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
2011-05-18 - 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
Add request_sample_fmt field to AVCodecContext.
|
||||
|
||||
2011-05-10 - 59eb12f / 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
2011-05-10 - 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
Deprecate AVLPCType and the following fields in
|
||||
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
||||
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
||||
@@ -380,81 +154,82 @@ API changes, most recent first:
|
||||
Add av_dynarray_add function for adding
|
||||
an element to a dynamic array.
|
||||
|
||||
2011-04-26 - d7e5aeb / bebe72f - lavu 51.1.0 - avutil.h
|
||||
2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
|
||||
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
||||
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
||||
libavcodec/avcodec.h.
|
||||
|
||||
2011-04-26 - d7e5aeb / 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
||||
|
||||
2011-04-26 - d7e5aeb / 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||
|
||||
2011-04-21 - 8772156 / 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
||||
|
||||
2011-04-15 - lavc 52.120.0 - avcodec.h
|
||||
AVPacket structure got additional members for passing side information:
|
||||
c407984 / 4de339e introduce side information for AVPacket
|
||||
c407984 / 2d8591c make containers pass palette change in AVPacket
|
||||
4de339e introduce side information for AVPacket
|
||||
2d8591c make containers pass palette change in AVPacket
|
||||
|
||||
2011-04-12 - lavf 52.107.0 - avio.h
|
||||
Avio cleanup, part II - deprecate the entire URLContext API:
|
||||
c55780d / 175389c add avio_check as a replacement for url_exist
|
||||
9891004 / ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
175389c add avio_check as a replacement for url_exist
|
||||
ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
for _av_url_read_fseek/fpause
|
||||
d4d0932 / cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
should be used instead.
|
||||
c88caa5 / 80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
c88caa5 / f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
d4d0932 / f8270bb add avio_enum_protocols.
|
||||
d4d0932 / 5593f03 deprecate URLProtocol.
|
||||
d4d0932 / c486dad deprecate URLContext.
|
||||
d4d0932 / 026e175 deprecate the typedef for URLInterruptCB
|
||||
c88caa5 / 8e76a19 deprecate av_register_protocol2.
|
||||
11d7841 / b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
11d7841 / 1305d93 deprecate av_url_read_seek
|
||||
11d7841 / fa104e1 deprecate av_url_read_pause
|
||||
434f248 / 727c7aa deprecate url_get_filename().
|
||||
434f248 / 5958df3 deprecate url_max_packet_size().
|
||||
434f248 / 1869ea0 deprecate url_get_file_handle().
|
||||
434f248 / 32a97d4 deprecate url_filesize().
|
||||
434f248 / e52a914 deprecate url_close().
|
||||
434f248 / 58a48c6 deprecate url_seek().
|
||||
434f248 / 925e908 deprecate url_write().
|
||||
434f248 / dce3756 deprecate url_read_complete().
|
||||
434f248 / bc371ac deprecate url_read().
|
||||
434f248 / 0589da0 deprecate url_open().
|
||||
434f248 / 62eaaea deprecate url_connect.
|
||||
434f248 / 5652bb9 deprecate url_alloc.
|
||||
434f248 / 333e894 deprecate url_open_protocol
|
||||
434f248 / e230705 deprecate url_poll and URLPollEntry
|
||||
80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
f8270bb add avio_enum_protocols.
|
||||
5593f03 deprecate URLProtocol.
|
||||
c486dad deprecate URLContext.
|
||||
026e175 deprecate the typedef for URLInterruptCB
|
||||
8e76a19 deprecate av_register_protocol2.
|
||||
b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
1305d93 deprecate av_url_read_seek
|
||||
fa104e1 deprecate av_url_read_pause
|
||||
727c7aa deprecate url_get_filename().
|
||||
5958df3 deprecate url_max_packet_size().
|
||||
1869ea0 deprecate url_get_file_handle().
|
||||
32a97d4 deprecate url_filesize().
|
||||
e52a914 deprecate url_close().
|
||||
58a48c6 deprecate url_seek().
|
||||
925e908 deprecate url_write().
|
||||
dce3756 deprecate url_read_complete().
|
||||
bc371ac deprecate url_read().
|
||||
0589da0 deprecate url_open().
|
||||
62eaaea deprecate url_connect.
|
||||
5652bb9 deprecate url_alloc.
|
||||
333e894 deprecate url_open_protocol
|
||||
e230705 deprecate url_poll and URLPollEntry
|
||||
|
||||
2011-04-08 - lavf 52.106.0 - avformat.h
|
||||
Minor avformat.h cleanup:
|
||||
d4d0932 / a9bf9d8 deprecate av_guess_image2_codec
|
||||
d4d0932 / c3675df rename avf_sdp_create->av_sdp_create
|
||||
a9bf9d8 deprecate av_guess_image2_codec
|
||||
c3675df rename avf_sdp_create->av_sdp_create
|
||||
|
||||
2011-04-03 - lavf 52.105.0 - avio.h
|
||||
Large-scale renaming/deprecating of AVIOContext-related functions:
|
||||
2cae980 / 724f6a0 deprecate url_fdopen
|
||||
2cae980 / 403ee83 deprecate url_open_dyn_packet_buf
|
||||
2cae980 / 6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
2cae980 / b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
2cae980 / 8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
724f6a0 deprecate url_fdopen
|
||||
403ee83 deprecate url_open_dyn_packet_buf
|
||||
6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
AVIOContext.is_streamed and url_is_streamed()
|
||||
1caa412 / b64030f deprecate get_checksum()
|
||||
1caa412 / 4c4427a deprecate init_checksum()
|
||||
2fd41c9 / 4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
4fa0e24 / 933e90a deprecate av_url_read_fseek/fpause
|
||||
4fa0e24 / 8d9769a deprecate url_fileno
|
||||
0fecf26 / b7f2fdd rename put_flush_packet -> avio_flush
|
||||
0fecf26 / 35f1023 deprecate url_close_buf
|
||||
0fecf26 / 83fddae deprecate url_open_buf
|
||||
0fecf26 / d9d86e0 rename url_fprintf -> avio_printf
|
||||
0fecf26 / 59f65d9 deprecate url_setbufsize
|
||||
6947b0c / 3e68b3b deprecate url_ferror
|
||||
b64030f deprecate get_checksum()
|
||||
4c4427a deprecate init_checksum()
|
||||
4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
933e90a deprecate av_url_read_fseek/fpause
|
||||
8d9769a deprecate url_fileno
|
||||
b7f2fdd rename put_flush_packet -> avio_flush
|
||||
35f1023 deprecate url_close_buf
|
||||
83fddae deprecate url_open_buf
|
||||
d9d86e0 rename url_fprintf -> avio_printf
|
||||
59f65d9 deprecate url_setbufsize
|
||||
3e68b3b deprecate url_ferror
|
||||
66e5b1d deprecate url_feof
|
||||
e8bb2e2 deprecate url_fget_max_packet_size
|
||||
76aa876 rename url_fsize -> avio_size
|
||||
e519753 deprecate url_fgetc
|
||||
@@ -475,7 +250,7 @@ API changes, most recent first:
|
||||
b3db9ce deprecate get_partial_buffer
|
||||
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
||||
|
||||
2011-03-25 - 27ef7b1 / 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
Add audio_service_type field to AVCodecContext.
|
||||
|
||||
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
||||
@@ -513,11 +288,11 @@ API changes, most recent first:
|
||||
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
||||
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
||||
|
||||
2011-02-09 - c0b102c - lavc 52.112.0 - avcodec_thread_init()
|
||||
2011-02-09 - 5592734 - lavc 52.112.0 - avcodec_thread_init()
|
||||
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
||||
set thread_count before calling avcodec_open.
|
||||
|
||||
2011-02-09 - 37b00b4 - lavc 52.111.0 - threading API
|
||||
2011-02-09 - 778b08a - lavc 52.111.0 - threading API
|
||||
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
||||
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
||||
Add thread_type and active_thread_type fields to AVCodecContext.
|
||||
|
64
doc/Makefile
64
doc/Makefile
@@ -1,64 +0,0 @@
|
||||
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
||||
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
|
||||
doc/developer.html \
|
||||
doc/faq.html \
|
||||
doc/fate.html \
|
||||
doc/general.html \
|
||||
doc/git-howto.html \
|
||||
doc/libavfilter.html \
|
||||
doc/platform.html \
|
||||
|
||||
TXTPAGES = doc/fate.txt \
|
||||
|
||||
|
||||
DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
||||
ifdef HAVE_MAKEINFO
|
||||
DOCS += $(TXTPAGES)
|
||||
endif
|
||||
|
||||
all-$(CONFIG_DOC): documentation
|
||||
|
||||
documentation: $(DOCS)
|
||||
|
||||
TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
||||
|
||||
doc/%.txt: TAG = TXT
|
||||
doc/%.txt: doc/%.texi
|
||||
$(Q)$(TEXIDEP)
|
||||
$(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
|
||||
|
||||
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) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
|
||||
|
||||
-include $(wildcard $(DOCS:%=%.d))
|
||||
|
||||
.PHONY: documentation
|
@@ -1,15 +1,28 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 0.10 "Freedom" January, 2012
|
||||
* 0.8 "Love" June, 2011
|
||||
* 0.7.1 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
||||
|
||||
|
||||
General notes
|
||||
-------------
|
||||
This release is binary compatible with 0.8 and 0.9.
|
||||
|
||||
See the Changelog file for a list of significant changes. Note, there
|
||||
are many more new features and bugfixes than whats listed there.
|
||||
This release enables frame-based multithreaded decoding for a number of codecs,
|
||||
including theora, huffyuv, VP8, H.263, mpeg4 and H.264. Additionally, there has
|
||||
been a major cleanup of
|
||||
both internal and external APIs. For this reason, the major versions of all
|
||||
libraries except libpostproc have been bumped. This means that 0.8 can be installed
|
||||
side-by-side with previous releases, on the other hand applications need to be
|
||||
recompiled to use 0.8.
|
||||
|
||||
Other important changes are more than 200 bugfixes, known regressions were fixed
|
||||
w.r.t 0.5 and 0.6, additions of decoders including, but not limited to,
|
||||
AMR-WB, single stream LATM/LOAS, G.722 ADPCM, a native VP8 decoder
|
||||
and HE-AACv2. Additionally, many new de/muxers such as WebM in Matroska, Apple
|
||||
HTTP Live Streaming, SAP, IEC 61937 (S/PDIF) have been added.
|
||||
|
||||
See the Changelog file for a list of significant changes.
|
||||
|
||||
Bugreports against FFmpeg git master or the most recent FFmpeg release are
|
||||
accepted. If you are experiencing issues with any formally released version of
|
||||
@@ -17,33 +30,36 @@ FFmpeg, please try git master to check if the issue still exists. If it does,
|
||||
make your report against the development code following the usual bug reporting
|
||||
guidelines.
|
||||
|
||||
Note, if you have difficulty building for mingw, try --disable-outdev=sdl
|
||||
|
||||
|
||||
API changes
|
||||
-----------
|
||||
|
||||
A number of additional APIs have been introduced and some existing
|
||||
functions have been deprecated and are scheduled for removal in the next
|
||||
release. Significant API changes include:
|
||||
|
||||
* new audio decoding API which decodes from an AVPacket to an AVFrame and
|
||||
is able to use AVCodecContext.get_buffer() in the similar way as video decoding.
|
||||
|
||||
* new audio encoding API which encodes from an AVFrame to an AVPacket, thus
|
||||
allowing it to properly output timing information and side data.
|
||||
|
||||
Please see the git history and the file doc/APIchanges for details.
|
||||
Please see git log of the public headers or the file doc/APIchanges for
|
||||
programmer-centric information. Note that some long-time deprecated APIs have
|
||||
been removed. Also, a number of additional APIs have been deprecated and might
|
||||
be removed in the next release.
|
||||
|
||||
|
||||
Other notable changes
|
||||
---------------------
|
||||
|
||||
Libavcodec and libavformat built as shared libraries now hide non-public
|
||||
symbols. This will break applications using those symbols. Possible solutions
|
||||
are, in order of preference:
|
||||
1) Try finding a way of accomplishing the same with public API.
|
||||
2) If there is no corresponding public API, but you think there should be,
|
||||
post a request on the developer mailing list or IRC channel.
|
||||
3) Finally if your program needs access to FFmpeg / libavcodec / libavformat
|
||||
internals for some special reason then the best solution is to link statically.
|
||||
|
||||
Please see the Changelog file and git history for a more detailed list of changes.
|
||||
- high quality dithering in swscale to fix banding issues
|
||||
- ffmpeg is now interactive and various information can be turned on/off while its running
|
||||
- resolution changing support in ffmpeg
|
||||
- sdl output device
|
||||
- optimizations in libavfilter that make it much faster
|
||||
- split, buffer, select, lut, negate filters amongth others
|
||||
- more than 50 new video filters from mplayers libmpcodecs
|
||||
- many ARM NEON optimizations
|
||||
- nonfree libfaad support for AAC decoding removed
|
||||
- 4:4:4 H.264 decoding
|
||||
- 9/10bit H.264 decoding
|
||||
- Win64 Assembler support
|
||||
- native MMSH/MMST support
|
||||
- Windows TV demuxing
|
||||
- native AMR-WB decoding
|
||||
- native GSM-MS decoding
|
||||
- SMPTE 302M decoding
|
||||
- AVS encoding
|
||||
|
82
doc/TODO
Normal file
82
doc/TODO
Normal file
@@ -0,0 +1,82 @@
|
||||
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
|
@@ -1,168 +0,0 @@
|
||||
All the numerical options, if not specified otherwise, accept in input
|
||||
a string representing a number, which may contain one of the
|
||||
International System number postfixes, for example 'K', 'M', 'G'.
|
||||
If 'i' is appended after the postfix, powers of 2 are used instead of
|
||||
powers of 10. The 'B' postfix multiplies the value for 8, and can be
|
||||
appended after another postfix or used alone. This allows using for
|
||||
example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||
|
||||
Options which do not take arguments are boolean options, and set the
|
||||
corresponding value to true. They can be set to false by prefixing
|
||||
with "no" the option name, for example using "-nofoo" in the
|
||||
command line will set to false the boolean option with name "foo".
|
||||
|
||||
@anchor{Stream specifiers}
|
||||
@section Stream specifiers
|
||||
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
||||
are used to precisely specify which stream(s) does a given option belong to.
|
||||
|
||||
A stream specifier is a string generally appended to the option name and
|
||||
separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
|
||||
@code{a:1} stream specifer, which matches the second audio stream. Therefore it
|
||||
would select the ac3 codec for the second audio stream.
|
||||
|
||||
A stream specifier can match several stream, the option is then applied to all
|
||||
of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
|
||||
streams.
|
||||
|
||||
An empty stream specifier matches all streams, for example @code{-codec copy}
|
||||
or @code{-codec: copy} would copy all the streams without reencoding.
|
||||
|
||||
Possible forms of stream specifiers are:
|
||||
@table @option
|
||||
@item @var{stream_index}
|
||||
Matches the stream with this index. E.g. @code{-threads:1 4} would set the
|
||||
thread count for the second stream to 4.
|
||||
@item @var{stream_type}[:@var{stream_index}]
|
||||
@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle,
|
||||
'd' for data and 't' for attachments. If @var{stream_index} is given, then
|
||||
matches stream number @var{stream_index} of this type. Otherwise matches all
|
||||
streams of this type.
|
||||
@item p:@var{program_id}[:@var{stream_index}]
|
||||
If @var{stream_index} is given, then matches stream number @var{stream_index} in
|
||||
program with id @var{program_id}. Otherwise matches all streams in this program.
|
||||
@end table
|
||||
@section Generic options
|
||||
|
||||
These options are shared amongst the av* tools.
|
||||
|
||||
@table @option
|
||||
|
||||
@item -L
|
||||
Show license.
|
||||
|
||||
@item -h, -?, -help, --help
|
||||
Show help.
|
||||
|
||||
@item -version
|
||||
Show version.
|
||||
|
||||
@item -formats
|
||||
Show available formats.
|
||||
|
||||
The fields preceding the format names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@end table
|
||||
|
||||
@item -codecs
|
||||
Show available codecs.
|
||||
|
||||
The fields preceding the codec names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@item V/A/S
|
||||
Video/audio/subtitle codec
|
||||
@item S
|
||||
Codec supports slices
|
||||
@item D
|
||||
Codec supports direct rendering
|
||||
@item T
|
||||
Codec can handle input truncated at random locations instead of only at frame boundaries
|
||||
@end table
|
||||
|
||||
@item -bsfs
|
||||
Show available bitstream filters.
|
||||
|
||||
@item -protocols
|
||||
Show available protocols.
|
||||
|
||||
@item -filters
|
||||
Show available libavfilter filters.
|
||||
|
||||
@item -pix_fmts
|
||||
Show available pixel formats.
|
||||
|
||||
@item -sample_fmts
|
||||
Show available sample formats.
|
||||
|
||||
@item -loglevel @var{loglevel} | -v @var{loglevel}
|
||||
Set the logging level used by the library.
|
||||
@var{loglevel} is a number or a string containing one of the following values:
|
||||
@table @samp
|
||||
@item quiet
|
||||
@item panic
|
||||
@item fatal
|
||||
@item error
|
||||
@item warning
|
||||
@item info
|
||||
@item verbose
|
||||
@item debug
|
||||
@end table
|
||||
|
||||
By default the program logs to stderr, if coloring is supported by the
|
||||
terminal, colors are used to mark errors and warnings. Log coloring
|
||||
can be disabled setting the environment variable
|
||||
@env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
|
||||
the environment variable @env{AV_LOG_FORCE_COLOR}.
|
||||
The use of the environment variable @env{NO_COLOR} is deprecated and
|
||||
will be dropped in a following FFmpeg version.
|
||||
|
||||
@item -report
|
||||
Dump full command line and console output to a file named
|
||||
@code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
|
||||
directory.
|
||||
This file can be useful for bug reports.
|
||||
It also implies @code{-loglevel verbose}.
|
||||
|
||||
Note: setting the environment variable @code{FFREPORT} to any value has the
|
||||
same effect.
|
||||
|
||||
@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
|
||||
|
||||
All codec AVOptions are obviously per-stream, so the chapter on stream
|
||||
specifiers applies to them
|
||||
|
||||
Note @option{-nooption} syntax cannot be used for boolean AVOptions,
|
||||
use @option{-option 0}/@option{-option 1}.
|
||||
|
||||
Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
||||
v/a/s to the options name is now obsolete and will be removed soon.
|
@@ -23,20 +23,6 @@ Below is a description of the currently available bitstream filters.
|
||||
|
||||
@section h264_mp4toannexb
|
||||
|
||||
Convert an H.264 bitstream from length prefixed mode to start code
|
||||
prefixed mode (as defined in the Annex B of the ITU-T H.264
|
||||
specification).
|
||||
|
||||
This is required by some streaming formats, typically the MPEG-2
|
||||
transport stream format ("mpegts").
|
||||
|
||||
For example to remux an MP4 file containing an H.264 stream to mpegts
|
||||
format with @command{ffmpeg}, you can use the command:
|
||||
|
||||
@example
|
||||
ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
|
||||
@end example
|
||||
|
||||
@section imx_dump_header
|
||||
|
||||
@section mjpeg2jpeg
|
||||
@@ -48,7 +34,7 @@ JPEG image. The individual frames can be extracted without loss,
|
||||
e.g. by
|
||||
|
||||
@example
|
||||
ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
|
||||
ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg
|
||||
@end example
|
||||
|
||||
Unfortunately, these chunks are incomplete JPEG images, because
|
||||
@@ -71,9 +57,9 @@ stream (carrying the AVI1 header ID and lacking a DHT segment) to
|
||||
produce fully qualified JPEG images.
|
||||
|
||||
@example
|
||||
ffmpeg -i mjpeg-movie.avi -c:v copy -vbsf mjpeg2jpeg frame_%d.jpg
|
||||
ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg
|
||||
exiftran -i -9 frame*.jpg
|
||||
ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
|
||||
ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi
|
||||
@end example
|
||||
|
||||
@section mjpega_dump_header
|
||||
|
@@ -27,7 +27,7 @@ follows.
|
||||
|
||||
@section rawvideo
|
||||
|
||||
Raw video decoder.
|
||||
Rawvideo decoder.
|
||||
|
||||
This decoder decodes rawvideo streams.
|
||||
|
||||
@@ -48,16 +48,3 @@ top-field-first is assumed
|
||||
@end table
|
||||
|
||||
@c man end VIDEO DECODERS
|
||||
|
||||
@chapter Audio Decoders
|
||||
@c man begin AUDIO DECODERS
|
||||
|
||||
@section ffwavesynth
|
||||
|
||||
Internal wave synthetizer.
|
||||
|
||||
This decoder generates wave patterns according to predefined sequences. Its
|
||||
use is purely internal and the format of the data it accepts is not publicly
|
||||
documented.
|
||||
|
||||
@c man end AUDIO DECODERS
|
||||
|
@@ -49,19 +49,19 @@ sequence of filenames of the form @file{i%m%g-1.jpg},
|
||||
The size, the pixel format, and the format of each image must be the
|
||||
same for all the files in the sequence.
|
||||
|
||||
The following example shows how to use @command{ffmpeg} for creating a
|
||||
The following example shows how to use @file{ffmpeg} for creating a
|
||||
video from the images in the file sequence @file{img-001.jpeg},
|
||||
@file{img-002.jpeg}, ..., assuming an input frame rate of 10 frames per
|
||||
@file{img-002.jpeg}, ..., assuming an input framerate of 10 frames per
|
||||
second:
|
||||
@example
|
||||
ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv
|
||||
ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
|
||||
@end example
|
||||
|
||||
Note that the pattern must not necessarily contain "%d" or
|
||||
"%0@var{N}d", for example to convert a single image file
|
||||
@file{img.jpeg} you can employ the command:
|
||||
@example
|
||||
ffmpeg -i img.jpeg img.png
|
||||
ffmpeg -f image2 -i img.jpeg img.png
|
||||
@end example
|
||||
|
||||
@section applehttp
|
||||
@@ -75,34 +75,4 @@ the caller can decide which variant streams to actually receive.
|
||||
The total bitrate of the variant that the stream belongs to is
|
||||
available in a metadata key named "variant_bitrate".
|
||||
|
||||
@section sbg
|
||||
|
||||
SBaGen script demuxer.
|
||||
|
||||
This demuxer reads the script language used by SBaGen
|
||||
@url{http://uazu.net/sbagen/} to generate binaural beats sessions. A SBG
|
||||
script looks like that:
|
||||
@example
|
||||
-SE
|
||||
a: 300-2.5/3 440+4.5/0
|
||||
b: 300-2.5/0 440+4.5/3
|
||||
off: -
|
||||
NOW == a
|
||||
+0:07:00 == b
|
||||
+0:14:00 == a
|
||||
+0:21:00 == b
|
||||
+0:30:00 off
|
||||
@end example
|
||||
|
||||
A SBG script can mix absolute and relative timestamps. If the script uses
|
||||
either only absolute timestamps (including the script start time) or only
|
||||
relative ones, then its layout is fixed, and the conversion is
|
||||
straightforward. On the other hand, if the script mixes both kind of
|
||||
timestamps, then the @var{NOW} reference for relative timestamps will be
|
||||
taken from the current time of day at the time the script is read, and the
|
||||
script layout will be frozen according to that reference. That means that if
|
||||
the script is directly played, the actual times will match the absolute
|
||||
timestamps up to the sound controller's clock accuracy, but if the user
|
||||
somehow pauses the playback or seeks, all times will be shifted accordingly.
|
||||
|
||||
@c man end INPUT DEVICES
|
||||
|
@@ -34,86 +34,9 @@ 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
|
||||
to send your patches to the FFmpeg mailing list.
|
||||
|
||||
@section Contributing
|
||||
|
||||
There are 3 ways by which code gets into ffmpeg.
|
||||
@itemize @bullet
|
||||
@item Submitting Patches to the main developer mailing list
|
||||
see @ref{Submitting patches} for details.
|
||||
@item Directly committing changes to the main tree.
|
||||
@item Committing changes to a git clone, for example on github.com or
|
||||
gitorious.org. And asking us to merge these changes.
|
||||
@end itemize
|
||||
|
||||
Whichever way, changes should be reviewed by the maintainer of the code
|
||||
before they are committed. And they should follow the @ref{Coding Rules}.
|
||||
The developer making the commit and the author are responsible for their changes
|
||||
and should try to fix issues their commit causes.
|
||||
|
||||
@anchor{Coding Rules}
|
||||
@section Coding Rules
|
||||
|
||||
@subsection Code formatting conventions
|
||||
|
||||
There are the following guidelines regarding the indentation in files:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Indent size is 4.
|
||||
@item
|
||||
The TAB character is forbidden outside of Makefiles as is any
|
||||
form of trailing whitespace. Commits containing either will be
|
||||
rejected by the git repository.
|
||||
@item
|
||||
You should try to limit your code lines to 80 characters; however, do so if
|
||||
and only if this improves readability.
|
||||
@end itemize
|
||||
The presentation is one inspired by 'indent -i4 -kr -nut'.
|
||||
|
||||
The main priority in FFmpeg is simplicity and small code size in order to
|
||||
minimize the bug count.
|
||||
|
||||
@subsection Comments
|
||||
Use the JavaDoc/Doxygen format (see examples below) so that code documentation
|
||||
can be generated automatically. All nontrivial functions should have a comment
|
||||
above them explaining what the function does, even if it is just one sentence.
|
||||
All structures and their member variables should be documented, too.
|
||||
|
||||
Avoid Qt-style and similar Doxygen syntax with @code{!} in it, i.e. replace
|
||||
@code{//!} with @code{///} and similar. Also @@ syntax should be employed
|
||||
for markup commands, i.e. use @code{@@param} and not @code{\param}.
|
||||
|
||||
@example
|
||||
/**
|
||||
* @@file
|
||||
* MPEG codec.
|
||||
* @@author ...
|
||||
*/
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
*/
|
||||
typedef struct Foobar@{
|
||||
int var1; /**< var1 description */
|
||||
int var2; ///< var2 description
|
||||
/** var3 description */
|
||||
int var3;
|
||||
@} Foobar;
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
* @@param my_parameter description of my_parameter
|
||||
* @@return return value description
|
||||
*/
|
||||
int myfunc(int my_parameter)
|
||||
...
|
||||
@end example
|
||||
|
||||
@subsection C language features
|
||||
|
||||
FFmpeg is programmed in the ISO C90 language with a few additional
|
||||
features from ISO C99, namely:
|
||||
@itemize @bullet
|
||||
@@ -145,64 +68,55 @@ mixing statements and declarations;
|
||||
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
||||
@end itemize
|
||||
|
||||
@subsection Naming conventions
|
||||
All names are using underscores (_), not CamelCase. For example, @samp{avfilter_get_video_buffer} is
|
||||
a valid function name and @samp{AVFilterGetVideo} is not. The exception from this are type names, like
|
||||
for example structs and enums; they should always be in the CamelCase
|
||||
Indent size is 4.
|
||||
The presentation is one inspired by 'indent -i4 -kr -nut'.
|
||||
The TAB character is forbidden outside of Makefiles as is any
|
||||
form of trailing whitespace. Commits containing either will be
|
||||
rejected by the git repository.
|
||||
|
||||
The main priority in FFmpeg is simplicity and small code size in order to
|
||||
minimize the bug count.
|
||||
|
||||
There are following conventions for naming variables and functions:
|
||||
@itemize @bullet
|
||||
@item
|
||||
For local variables no prefix is required.
|
||||
@item
|
||||
For variables and functions declared as @code{static} no prefixes are required.
|
||||
@item
|
||||
For variables and functions used internally by the library, @code{ff_} prefix
|
||||
should be used.
|
||||
For example, @samp{ff_w64_demuxer}.
|
||||
@item
|
||||
For variables and functions used internally across multiple libraries, use
|
||||
@code{avpriv_}. For example, @samp{avpriv_aac_parse_header}.
|
||||
@item
|
||||
For exported names, each library has its own prefixes. Just check the existing
|
||||
code and name accordingly.
|
||||
@end itemize
|
||||
Comments: Use the JavaDoc/Doxygen
|
||||
format (see examples below) so that code documentation
|
||||
can be generated automatically. All nontrivial functions should have a comment
|
||||
above them explaining what the function does, even if it is just one sentence.
|
||||
All structures and their member variables should be documented, too.
|
||||
@example
|
||||
/**
|
||||
* @@file mpeg.c
|
||||
* MPEG codec.
|
||||
* @@author ...
|
||||
*/
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
*/
|
||||
typedef struct Foobar@{
|
||||
int var1; /**< var1 description */
|
||||
int var2; ///< var2 description
|
||||
/** var3 description */
|
||||
int var3;
|
||||
@} Foobar;
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
* @@param my_parameter description of my_parameter
|
||||
* @@return return value description
|
||||
*/
|
||||
int myfunc(int my_parameter)
|
||||
...
|
||||
@end example
|
||||
|
||||
@subsection Miscellanous conventions
|
||||
@itemize @bullet
|
||||
@item
|
||||
fprintf and printf are forbidden in libavformat and libavcodec,
|
||||
please use av_log() instead.
|
||||
@item
|
||||
|
||||
Casts should be used only when necessary. Unneeded parentheses
|
||||
should also be avoided if they don't make the code easier to understand.
|
||||
@end itemize
|
||||
|
||||
@subsection Editor configuration
|
||||
In order to configure Vim to follow FFmpeg formatting conventions, paste
|
||||
the following snippet into your @file{.vimrc}:
|
||||
@example
|
||||
" indentation rules for FFmpeg: 4 spaces, no tabs
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
" Allow tabs in Makefiles.
|
||||
autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8
|
||||
" Trailing whitespace and tabs are forbidden, so highlight them.
|
||||
highlight ForbiddenWhitespace ctermbg=red guibg=red
|
||||
match ForbiddenWhitespace /\s\+$\|\t/
|
||||
" Do not highlight spaces at the end of line while typing on that line.
|
||||
autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@<!$/
|
||||
@end example
|
||||
|
||||
For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
||||
@example
|
||||
(setq c-default-style "k&r")
|
||||
(setq-default c-basic-offset 4)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default show-trailing-whitespace t)
|
||||
@end example
|
||||
|
||||
@section Development Policy
|
||||
|
||||
@@ -264,7 +178,7 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
||||
Always fill out the commit log message. Describe in a few lines what you
|
||||
changed and why. You can refer to mailing list postings if you fix a
|
||||
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
||||
Recommended format:
|
||||
Recommanded format:
|
||||
area changed: Short 1 line description
|
||||
|
||||
details describing what and why and giving references.
|
||||
@@ -299,7 +213,7 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
||||
always check values read from some untrusted source before using them
|
||||
as array index or other risky things.
|
||||
@item
|
||||
Remember to check if you need to bump versions for the specific libav*
|
||||
Remember to check if you need to bump versions for the specific libav
|
||||
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
||||
to change the version integer.
|
||||
Incrementing the first component means no backward compatibility to
|
||||
@@ -326,11 +240,9 @@ We think our rules are not too hard. If you have comments, contact us.
|
||||
|
||||
Note, these rules are mostly borrowed from the MPlayer project.
|
||||
|
||||
@anchor{Submitting patches}
|
||||
@section Submitting patches
|
||||
|
||||
First, read the @ref{Coding Rules} above if you did not yet, in particular
|
||||
the rules regarding patch submission.
|
||||
First, read the (@pxref{Coding Rules}) above if you did not yet.
|
||||
|
||||
When you submit your patch, please use @code{git format-patch} or
|
||||
@code{git send-email}. We cannot read other diffs :-)
|
||||
@@ -345,8 +257,8 @@ for us and greatly increases your chances of getting your patch applied.
|
||||
Use the patcheck tool of FFmpeg to check your patch.
|
||||
The tool is located in the tools directory.
|
||||
|
||||
Run the @ref{Regression tests} before submitting a patch in order to verify
|
||||
it does not cause unexpected problems.
|
||||
Run the regression tests before submitting a patch so that you can
|
||||
verify that there are no big problems.
|
||||
|
||||
Patches should be posted as base64 encoded attachments (or any other
|
||||
encoding which ensures that the patch will not be trashed during
|
||||
@@ -380,13 +292,13 @@ send a reminder by email. Your patch should eventually be dealt with.
|
||||
AVInputFormat/AVOutputFormat struct?
|
||||
@item
|
||||
Did you bump the minor version number (and reset the micro version
|
||||
number) in @file{libavcodec/version.h} or @file{libavformat/version.h}?
|
||||
number) in @file{avcodec.h} or @file{avformat.h}?
|
||||
@item
|
||||
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
||||
@item
|
||||
Did you add the CodecID to @file{avcodec.h}?
|
||||
@item
|
||||
If it has a fourCC, did you add it to @file{libavformat/riff.c},
|
||||
If it has a fourcc, did you add it to @file{libavformat/riff.c},
|
||||
even if it is only a decoder?
|
||||
@item
|
||||
Did you add a rule to compile the appropriate files in the Makefile?
|
||||
@@ -413,7 +325,7 @@ send a reminder by email. Your patch should eventually be dealt with.
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Does @code{make fate} pass with the patch applied?
|
||||
Does 'make fate' pass with the patch applied?
|
||||
@item
|
||||
Was the patch generated with git format-patch or send-email?
|
||||
@item
|
||||
@@ -425,7 +337,7 @@ send a reminder by email. Your patch should eventually be dealt with.
|
||||
@item
|
||||
Is the patch against latest FFmpeg git master branch?
|
||||
@item
|
||||
Are you subscribed to ffmpeg-devel?
|
||||
Are you subscribed to ffmpeg-dev?
|
||||
(the list is subscribers only due to spam)
|
||||
@item
|
||||
Have you checked that the changes are minimal, so that the same cannot be
|
||||
@@ -498,23 +410,34 @@ After a patch is approved it will be committed to the repository.
|
||||
We will review all submitted patches, but sometimes we are quite busy so
|
||||
especially for large patches this can take several weeks.
|
||||
|
||||
If you feel that the review process is too slow and you are willing to try to
|
||||
take over maintainership of the area of code you change then just clone
|
||||
git master and maintain the area of code there. We will merge each area from
|
||||
where its best maintained.
|
||||
|
||||
When resubmitting patches, please do not make any significant changes
|
||||
not related to the comments received during review. Such patches will
|
||||
be rejected. Instead, submit significant changes or new features as
|
||||
be rejected. Instead, submit significant changes or new features as
|
||||
separate patches.
|
||||
|
||||
@anchor{Regression tests}
|
||||
@section Regression tests
|
||||
|
||||
Before submitting a patch (or committing to the repository), you should at least
|
||||
test that you did not break anything.
|
||||
|
||||
Running 'make fate' accomplishes this, please see @url{fate.html} for details.
|
||||
The regression tests build a synthetic video stream and a synthetic
|
||||
audio stream. These are then encoded and decoded with all codecs or
|
||||
formats. The CRC (or MD5) of each generated file is recorded in a
|
||||
result file. A 'diff' is launched to compare the reference results and
|
||||
the result file. The output is checked immediately after each test
|
||||
has run.
|
||||
|
||||
The regression tests then go on to test the FFserver code with a
|
||||
limited set of streams. It is important that this step runs correctly
|
||||
as well.
|
||||
|
||||
Run 'make test' to test all the codecs and formats. Commands like
|
||||
'make regtest-mpeg2' can be used to run a single test. By default,
|
||||
make will abort if any test fails. To run all tests regardless,
|
||||
use make -k. To get a more verbose output, use 'make V=1 test' or
|
||||
'make V=2 test'.
|
||||
|
||||
Run 'make fulltest' to test all the codecs, formats and FFserver.
|
||||
|
||||
[Of course, some patches may change the results of the regression tests. In
|
||||
this case, the reference results of the regression tests shall be modified
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on $datetime for $projectname by <a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath$doxy_stylesheet.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="body">
|
||||
<div>
|
@@ -320,10 +320,10 @@ apply Dolby Surround EX processing.
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx on
|
||||
Dolby Surround EX Off
|
||||
Dolby Surround EX On
|
||||
@item 2
|
||||
@itemx off
|
||||
Dolby Surround EX On
|
||||
Dolby Surround EX Off
|
||||
@end table
|
||||
|
||||
@item -dheadphone_mode @var{mode}
|
||||
@@ -337,10 +337,10 @@ processing.
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx on
|
||||
Dolby Headphone Off
|
||||
Dolby Headphone On
|
||||
@item 2
|
||||
@itemx off
|
||||
Dolby Headphone On
|
||||
Dolby Headphone Off
|
||||
@end table
|
||||
|
||||
@item -ad_conv_type @var{type}
|
||||
@@ -551,33 +551,36 @@ Set the encoding preset.
|
||||
|
||||
@item tune @var{tune_name}
|
||||
Tune the encoding params.
|
||||
Deprecated in favor of @var{x264_opts}
|
||||
|
||||
@item fastfirstpass @var{bool}
|
||||
Use fast settings when encoding first pass, default value is 1.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item profile @var{profile_name}
|
||||
Set profile restrictions.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item level @var{level}
|
||||
Specify level (as defined by Annex A).
|
||||
Deprecated in favor of @var{x264opts}.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item passlogfile @var{filename}
|
||||
Specify filename for 2 pass stats.
|
||||
Deprecated in favor of @var{x264opts} (see @var{stats} libx264 option).
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item wpredp @var{wpred_type}
|
||||
Specify Weighted prediction for P-frames.
|
||||
Deprecated in favor of @var{x264opts} (see @var{weightp} libx264 option).
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item x264opts @var{options}
|
||||
Allow to set any x264 option, see x264 --fullhelp for a list.
|
||||
Allow to set any x264 option, see x264 manual for a list.
|
||||
|
||||
@var{options} is a list of @var{key}=@var{value} couples separated by
|
||||
":".
|
||||
@end table
|
||||
|
||||
For example to specify libx264 encoding options with @command{ffmpeg}:
|
||||
For example to specify libx264 encoding options with @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
|
||||
@end example
|
||||
|
174
doc/errno.txt
174
doc/errno.txt
@@ -1,174 +0,0 @@
|
||||
The following table lists most error codes found in various operating
|
||||
systems supported by FFmpeg.
|
||||
|
||||
OS
|
||||
Code Std F LBMWwb Text (YMMV)
|
||||
|
||||
E2BIG POSIX ++++++ Argument list too long
|
||||
EACCES POSIX ++++++ Permission denied
|
||||
EADDRINUSE POSIX +++..+ Address in use
|
||||
EADDRNOTAVAIL POSIX +++..+ Cannot assign requested address
|
||||
EADV +..... Advertise error
|
||||
EAFNOSUPPORT POSIX +++..+ Address family not supported
|
||||
EAGAIN POSIX + ++++++ Resource temporarily unavailable
|
||||
EALREADY POSIX +++..+ Operation already in progress
|
||||
EAUTH .++... Authentication error
|
||||
EBADARCH ..+... Bad CPU type in executable
|
||||
EBADE +..... Invalid exchange
|
||||
EBADEXEC ..+... Bad executable
|
||||
EBADF POSIX ++++++ Bad file descriptor
|
||||
EBADFD +..... File descriptor in bad state
|
||||
EBADMACHO ..+... Malformed Macho file
|
||||
EBADMSG POSIX ++4... Bad message
|
||||
EBADR +..... Invalid request descriptor
|
||||
EBADRPC .++... RPC struct is bad
|
||||
EBADRQC +..... Invalid request code
|
||||
EBADSLT +..... Invalid slot
|
||||
EBFONT +..... Bad font file format
|
||||
EBUSY POSIX - ++++++ Device or resource busy
|
||||
ECANCELED POSIX +++... Operation canceled
|
||||
ECHILD POSIX ++++++ No child processes
|
||||
ECHRNG +..... Channel number out of range
|
||||
ECOMM +..... Communication error on send
|
||||
ECONNABORTED POSIX +++..+ Software caused connection abort
|
||||
ECONNREFUSED POSIX - +++ss+ Connection refused
|
||||
ECONNRESET POSIX +++..+ Connection reset
|
||||
EDEADLK POSIX ++++++ Resource deadlock avoided
|
||||
EDEADLOCK +..++. File locking deadlock error
|
||||
EDESTADDRREQ POSIX +++... Destination address required
|
||||
EDEVERR ..+... Device error
|
||||
EDOM C89 - ++++++ Numerical argument out of domain
|
||||
EDOOFUS .F.... Programming error
|
||||
EDOTDOT +..... RFS specific error
|
||||
EDQUOT POSIX +++... Disc quota exceeded
|
||||
EEXIST POSIX ++++++ File exists
|
||||
EFAULT POSIX - ++++++ Bad address
|
||||
EFBIG POSIX - ++++++ File too large
|
||||
EFTYPE .++... Inappropriate file type or format
|
||||
EHOSTDOWN +++... Host is down
|
||||
EHOSTUNREACH POSIX +++..+ No route to host
|
||||
EHWPOISON +..... Memory page has hardware error
|
||||
EIDRM POSIX +++... Identifier removed
|
||||
EILSEQ C99 ++++++ Illegal byte sequence
|
||||
EINPROGRESS POSIX - +++ss+ Operation in progress
|
||||
EINTR POSIX - ++++++ Interrupted system call
|
||||
EINVAL POSIX + ++++++ Invalid argument
|
||||
EIO POSIX + ++++++ I/O error
|
||||
EISCONN POSIX +++..+ Socket is already connected
|
||||
EISDIR POSIX ++++++ Is a directory
|
||||
EISNAM +..... Is a named type file
|
||||
EKEYEXPIRED +..... Key has expired
|
||||
EKEYREJECTED +..... Key was rejected by service
|
||||
EKEYREVOKED +..... Key has been revoked
|
||||
EL2HLT +..... Level 2 halted
|
||||
EL2NSYNC +..... Level 2 not synchronized
|
||||
EL3HLT +..... Level 3 halted
|
||||
EL3RST +..... Level 3 reset
|
||||
ELIBACC +..... Can not access a needed shared library
|
||||
ELIBBAD +..... Accessing a corrupted shared library
|
||||
ELIBEXEC +..... Cannot exec a shared library directly
|
||||
ELIBMAX +..... Too many shared libraries
|
||||
ELIBSCN +..... .lib section in a.out corrupted
|
||||
ELNRNG +..... Link number out of range
|
||||
ELOOP POSIX +++..+ Too many levels of symbolic links
|
||||
EMEDIUMTYPE +..... Wrong medium type
|
||||
EMFILE POSIX ++++++ Too many open files
|
||||
EMLINK POSIX ++++++ Too many links
|
||||
EMSGSIZE POSIX +++..+ Message too long
|
||||
EMULTIHOP POSIX ++4... Multihop attempted
|
||||
ENAMETOOLONG POSIX - ++++++ Filen ame too long
|
||||
ENAVAIL +..... No XENIX semaphores available
|
||||
ENEEDAUTH .++... Need authenticator
|
||||
ENETDOWN POSIX +++..+ Network is down
|
||||
ENETRESET SUSv3 +++..+ Network dropped connection on reset
|
||||
ENETUNREACH POSIX +++..+ Network unreachable
|
||||
ENFILE POSIX ++++++ Too many open files in system
|
||||
ENOANO +..... No anode
|
||||
ENOATTR .++... Attribute not found
|
||||
ENOBUFS POSIX - +++..+ No buffer space available
|
||||
ENOCSI +..... No CSI structure available
|
||||
ENODATA XSR +N4... No message available
|
||||
ENODEV POSIX - ++++++ No such device
|
||||
ENOENT POSIX - ++++++ No such file or directory
|
||||
ENOEXEC POSIX ++++++ Exec format error
|
||||
ENOFILE ...++. No such file or directory
|
||||
ENOKEY +..... Required key not available
|
||||
ENOLCK POSIX ++++++ No locks available
|
||||
ENOLINK POSIX ++4... Link has been severed
|
||||
ENOMEDIUM +..... No medium found
|
||||
ENOMEM POSIX ++++++ Not enough space
|
||||
ENOMSG POSIX +++..+ No message of desired type
|
||||
ENONET +..... Machine is not on the network
|
||||
ENOPKG +..... Package not installed
|
||||
ENOPROTOOPT POSIX +++..+ Protocol not available
|
||||
ENOSPC POSIX ++++++ No space left on device
|
||||
ENOSR XSR +N4... No STREAM resources
|
||||
ENOSTR XSR +N4... Not a STREAM
|
||||
ENOSYS POSIX + ++++++ Function not implemented
|
||||
ENOTBLK +++... Block device required
|
||||
ENOTCONN POSIX +++..+ Socket is not connected
|
||||
ENOTDIR POSIX ++++++ Not a directory
|
||||
ENOTEMPTY POSIX ++++++ Directory not empty
|
||||
ENOTNAM +..... Not a XENIX named type file
|
||||
ENOTRECOVERABLE SUSv4 - +..... State not recoverable
|
||||
ENOTSOCK POSIX +++..+ Socket operation on non-socket
|
||||
ENOTSUP POSIX +++... Operation not supported
|
||||
ENOTTY POSIX ++++++ Inappropriate I/O control operation
|
||||
ENOTUNIQ +..... Name not unique on network
|
||||
ENXIO POSIX ++++++ No such device or address
|
||||
EOPNOTSUPP POSIX +++..+ Operation not supported (on socket)
|
||||
EOVERFLOW POSIX +++..+ Value too large to be stored in data type
|
||||
EOWNERDEAD SUSv4 +..... Owner died
|
||||
EPERM POSIX - ++++++ Operation not permitted
|
||||
EPFNOSUPPORT +++..+ Protocol family not supported
|
||||
EPIPE POSIX - ++++++ Broken pipe
|
||||
EPROCLIM .++... Too many processes
|
||||
EPROCUNAVAIL .++... Bad procedure for program
|
||||
EPROGMISMATCH .++... Program version wrong
|
||||
EPROGUNAVAIL .++... RPC prog. not avail
|
||||
EPROTO POSIX ++4... Protocol error
|
||||
EPROTONOSUPPORT POSIX - +++ss+ Protocol not supported
|
||||
EPROTOTYPE POSIX +++..+ Protocol wrong type for socket
|
||||
EPWROFF ..+... Device power is off
|
||||
ERANGE C89 - ++++++ Result too large
|
||||
EREMCHG +..... Remote address changed
|
||||
EREMOTE +++... Object is remote
|
||||
EREMOTEIO +..... Remote I/O error
|
||||
ERESTART +..... Interrupted system call should be restarted
|
||||
ERFKILL +..... Operation not possible due to RF-kill
|
||||
EROFS POSIX ++++++ Read-only file system
|
||||
ERPCMISMATCH .++... RPC version wrong
|
||||
ESHLIBVERS ..+... Shared library version mismatch
|
||||
ESHUTDOWN +++..+ Cannot send after socket shutdown
|
||||
ESOCKTNOSUPPORT +++... Socket type not supported
|
||||
ESPIPE POSIX ++++++ Illegal seek
|
||||
ESRCH POSIX ++++++ No such process
|
||||
ESRMNT +..... Srmount error
|
||||
ESTALE POSIX +++..+ Stale NFS file handle
|
||||
ESTRPIPE +..... Streams pipe error
|
||||
ETIME XSR +N4... Stream ioctl timeout
|
||||
ETIMEDOUT POSIX - +++ss+ Connection timed out
|
||||
ETOOMANYREFS +++... Too many references: cannot splice
|
||||
ETXTBSY POSIX +++... Text file busy
|
||||
EUCLEAN +..... Structure needs cleaning
|
||||
EUNATCH +..... Protocol driver not attached
|
||||
EUSERS +++... Too many users
|
||||
EWOULDBLOCK POSIX +++..+ Operation would block
|
||||
EXDEV POSIX ++++++ Cross-device link
|
||||
EXFULL +..... Exchange full
|
||||
|
||||
Notations:
|
||||
|
||||
F: used in FFmpeg (-: a few times, +: a lot)
|
||||
|
||||
SUSv3: Single Unix Specification, version 3
|
||||
SUSv4: Single Unix Specification, version 4
|
||||
XSR: XSI STREAMS (obsolete)
|
||||
|
||||
OS: availability on some supported operating systems
|
||||
L: GNU/Linux
|
||||
B: BSD (F: FreeBSD, N: NetBSD)
|
||||
M: MacOS X
|
||||
W: Microsoft Windows (s: emulated with winsock, see libavformat/network.h)
|
||||
w: Mingw32 (3.17) and Mingw64 (2.0.1)
|
||||
b: BeOS
|
@@ -1,7 +1,7 @@
|
||||
@chapter Expression Evaluation
|
||||
@c man begin EXPRESSION EVALUATION
|
||||
|
||||
When evaluating an arithmetic expression, FFmpeg uses an internal
|
||||
When evaluating an arithemetic expression, FFmpeg uses an internal
|
||||
formula evaluator, implemented through the @file{libavutil/eval.h}
|
||||
interface.
|
||||
|
||||
@@ -50,11 +50,10 @@ Allow to store the value of the expression @var{expr} in an internal
|
||||
variable. @var{var} specifies the number of the variable where to
|
||||
store the value, and it is a value ranging from 0 to 9. The function
|
||||
returns the value stored in the internal variable.
|
||||
Note, Variables are currently not shared between expressions.
|
||||
|
||||
@item ld(var)
|
||||
Allow to load the value of the internal variable with number
|
||||
@var{var}, which was previously stored with st(@var{var}, @var{expr}).
|
||||
@var{var}, which was previosly stored with st(@var{var}, @var{expr}).
|
||||
The function returns the loaded value.
|
||||
|
||||
@item while(cond, expr)
|
||||
@@ -84,54 +83,21 @@ Return 1.0 if @var{expr} is zero, 0.0 otherwise.
|
||||
@item pow(x, y)
|
||||
Compute the power of @var{x} elevated @var{y}, it is equivalent to
|
||||
"(@var{x})^(@var{y})".
|
||||
|
||||
@item random(x)
|
||||
Return a pseudo random value between 0.0 and 1.0. @var{x} is the index of the
|
||||
internal variable which will be used to save the seed/state.
|
||||
|
||||
@item hypot(x, y)
|
||||
This function is similar to the C function with the same name; it returns
|
||||
"sqrt(@var{x}*@var{x} + @var{y}*@var{y})", the length of the hypotenuse of a
|
||||
right triangle with sides of length @var{x} and @var{y}, or the distance of the
|
||||
point (@var{x}, @var{y}) from the origin.
|
||||
|
||||
@item gcd(x, y)
|
||||
Return the greatest common divisor of @var{x} and @var{y}. If both @var{x} and
|
||||
@var{y} are 0 or either or both are less than zero then behavior is undefined.
|
||||
|
||||
@item if(x, y)
|
||||
Evaluate @var{x}, and if the result is non-zero return the result of
|
||||
the evaluation of @var{y}, return 0 otherwise.
|
||||
|
||||
@item ifnot(x, y)
|
||||
Evaluate @var{x}, and if the result is zero return the result of the
|
||||
evaluation of @var{y}, return 0 otherwise.
|
||||
@end table
|
||||
|
||||
The following constants are available:
|
||||
@table @option
|
||||
@item PI
|
||||
area of the unit disc, approximately 3.14
|
||||
@item E
|
||||
exp(1) (Euler's number), approximately 2.718
|
||||
@item PHI
|
||||
golden ratio (1+sqrt(5))/2, approximately 1.618
|
||||
@end table
|
||||
|
||||
Assuming that an expression is considered "true" if it has a non-zero
|
||||
value, note that:
|
||||
Note that:
|
||||
|
||||
@code{*} works like AND
|
||||
|
||||
@code{+} works like OR
|
||||
|
||||
and the construct:
|
||||
thus
|
||||
@example
|
||||
if A then B else C
|
||||
@end example
|
||||
is equivalent to
|
||||
@example
|
||||
if(A,B) + ifnot(A,C)
|
||||
A*B + not(A)*C
|
||||
@end example
|
||||
|
||||
In your C code, you can extend the list of unary and binary functions,
|
||||
|
@@ -3,7 +3,7 @@ FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
|
||||
CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
|
||||
LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
|
||||
|
||||
EXAMPLES=decoding_encoding filtering metadata muxing
|
||||
EXAMPLES=encoding-example muxing-example
|
||||
|
||||
OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||
|
||||
|
@@ -1,39 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2001 Fabrice Bellard
|
||||
*
|
||||
* 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:
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* libavcodec API use example.
|
||||
* avcodec API use example.
|
||||
*
|
||||
* Note that libavcodec only handles codecs (mpeg, mpeg4, etc...),
|
||||
* not file formats (avi, vob, mp4, mov, mkv, mxf, flv, mpegts, mpegps, etc...). See library 'libavformat' for the
|
||||
* Note that this library only handles codecs (mpeg, mpeg4, etc...),
|
||||
* not file formats (avi, vob, etc...). See library 'libavformat' for the
|
||||
* format handling
|
||||
*/
|
||||
|
||||
#include "libavutil/imgutils.h"
|
||||
#include "libavutil/opt.h"
|
||||
#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 "libavutil/mathematics.h"
|
||||
#include "libavutil/samplefmt.h"
|
||||
|
||||
#define INBUF_SIZE 4096
|
||||
#define AUDIO_INBUF_SIZE 20480
|
||||
@@ -61,13 +64,12 @@ static void audio_encode_example(const char *filename)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = avcodec_alloc_context3(codec);
|
||||
c= avcodec_alloc_context();
|
||||
|
||||
/* put sample parameters */
|
||||
c->bit_rate = 64000;
|
||||
c->sample_rate = 44100;
|
||||
c->channels = 2;
|
||||
c->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
|
||||
/* open it */
|
||||
if (avcodec_open(c, codec) < 0) {
|
||||
@@ -115,11 +117,11 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
||||
{
|
||||
AVCodec *codec;
|
||||
AVCodecContext *c= NULL;
|
||||
int len;
|
||||
int out_size, len;
|
||||
FILE *f, *outfile;
|
||||
uint8_t *outbuf;
|
||||
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||
AVPacket avpkt;
|
||||
AVFrame *decoded_frame = NULL;
|
||||
|
||||
av_init_packet(&avpkt);
|
||||
|
||||
@@ -132,7 +134,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = avcodec_alloc_context3(codec);
|
||||
c= avcodec_alloc_context();
|
||||
|
||||
/* open it */
|
||||
if (avcodec_open(c, codec) < 0) {
|
||||
@@ -140,6 +142,8 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
|
||||
|
||||
f = fopen(filename, "rb");
|
||||
if (!f) {
|
||||
fprintf(stderr, "could not open %s\n", filename);
|
||||
@@ -156,32 +160,18 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
||||
avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f);
|
||||
|
||||
while (avpkt.size > 0) {
|
||||
int got_frame = 0;
|
||||
|
||||
if (!decoded_frame) {
|
||||
if (!(decoded_frame = avcodec_alloc_frame())) {
|
||||
fprintf(stderr, "out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
} else
|
||||
avcodec_get_frame_defaults(decoded_frame);
|
||||
|
||||
len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
|
||||
out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
len = avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt);
|
||||
if (len < 0) {
|
||||
fprintf(stderr, "Error while decoding\n");
|
||||
exit(1);
|
||||
}
|
||||
if (got_frame) {
|
||||
if (out_size > 0) {
|
||||
/* if a frame has been decoded, output it */
|
||||
int data_size = av_samples_get_buffer_size(NULL, c->channels,
|
||||
decoded_frame->nb_samples,
|
||||
c->sample_fmt, 1);
|
||||
fwrite(decoded_frame->data[0], 1, data_size, outfile);
|
||||
fwrite(outbuf, 1, out_size, outfile);
|
||||
}
|
||||
avpkt.size -= len;
|
||||
avpkt.data += len;
|
||||
avpkt.dts =
|
||||
avpkt.pts = AV_NOPTS_VALUE;
|
||||
if (avpkt.size < AUDIO_REFILL_THRESH) {
|
||||
/* Refill the input buffer, to avoid trying to decode
|
||||
* incomplete frames. Instead of this, one could also use
|
||||
@@ -198,34 +188,34 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
||||
|
||||
fclose(outfile);
|
||||
fclose(f);
|
||||
free(outbuf);
|
||||
|
||||
avcodec_close(c);
|
||||
av_free(c);
|
||||
av_free(decoded_frame);
|
||||
}
|
||||
|
||||
/*
|
||||
* Video encoding example
|
||||
*/
|
||||
static void video_encode_example(const char *filename, int codec_id)
|
||||
static void video_encode_example(const char *filename)
|
||||
{
|
||||
AVCodec *codec;
|
||||
AVCodecContext *c= NULL;
|
||||
int i, out_size, size, x, y, outbuf_size;
|
||||
FILE *f;
|
||||
AVFrame *picture;
|
||||
uint8_t *outbuf;
|
||||
uint8_t *outbuf, *picture_buf;
|
||||
|
||||
printf("Video encoding\n");
|
||||
|
||||
/* find the mpeg1 video encoder */
|
||||
codec = avcodec_find_encoder(codec_id);
|
||||
codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
|
||||
if (!codec) {
|
||||
fprintf(stderr, "codec not found\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = avcodec_alloc_context3(codec);
|
||||
c= avcodec_alloc_context();
|
||||
picture= avcodec_alloc_frame();
|
||||
|
||||
/* put sample parameters */
|
||||
@@ -239,9 +229,6 @@ static void video_encode_example(const char *filename, int codec_id)
|
||||
c->max_b_frames=1;
|
||||
c->pix_fmt = PIX_FMT_YUV420P;
|
||||
|
||||
if(codec_id == CODEC_ID_H264)
|
||||
av_opt_set(c->priv_data, "preset", "slow", 0);
|
||||
|
||||
/* open it */
|
||||
if (avcodec_open(c, codec) < 0) {
|
||||
fprintf(stderr, "could not open codec\n");
|
||||
@@ -257,11 +244,15 @@ static void video_encode_example(const char *filename, int codec_id)
|
||||
/* alloc image and output buffer */
|
||||
outbuf_size = 100000;
|
||||
outbuf = malloc(outbuf_size);
|
||||
size = c->width * c->height;
|
||||
picture_buf = malloc((size * 3) / 2); /* size for YUV 420 */
|
||||
|
||||
/* the image can be allocated by any means and av_image_alloc() is
|
||||
* just the most convenient way if av_malloc() is to be used */
|
||||
av_image_alloc(picture->data, picture->linesize,
|
||||
c->width, c->height, c->pix_fmt, 1);
|
||||
picture->data[0] = picture_buf;
|
||||
picture->data[1] = picture->data[0] + size;
|
||||
picture->data[2] = picture->data[1] + size / 4;
|
||||
picture->linesize[0] = c->width;
|
||||
picture->linesize[1] = c->width / 2;
|
||||
picture->linesize[2] = c->width / 2;
|
||||
|
||||
/* encode 1 second of video */
|
||||
for(i=0;i<25;i++) {
|
||||
@@ -304,11 +295,11 @@ static void video_encode_example(const char *filename, int codec_id)
|
||||
outbuf[3] = 0xb7;
|
||||
fwrite(outbuf, 1, 4, f);
|
||||
fclose(f);
|
||||
free(picture_buf);
|
||||
free(outbuf);
|
||||
|
||||
avcodec_close(c);
|
||||
av_free(c);
|
||||
av_free(picture->data[0]);
|
||||
av_free(picture);
|
||||
printf("\n");
|
||||
}
|
||||
@@ -355,7 +346,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = avcodec_alloc_context3(codec);
|
||||
c= avcodec_alloc_context();
|
||||
picture= avcodec_alloc_frame();
|
||||
|
||||
if(codec->capabilities&CODEC_CAP_TRUNCATED)
|
||||
@@ -463,8 +454,7 @@ int main(int argc, char **argv)
|
||||
audio_encode_example("/tmp/test.mp2");
|
||||
audio_decode_example("/tmp/test.sw", "/tmp/test.mp2");
|
||||
|
||||
video_encode_example("/tmp/test.h264", CODEC_ID_H264);
|
||||
video_encode_example("/tmp/test.mpg", CODEC_ID_MPEG1VIDEO);
|
||||
video_encode_example("/tmp/test.mpg");
|
||||
filename = "/tmp/test.mpg";
|
||||
} else {
|
||||
filename = argv[1];
|
@@ -1,229 +0,0 @@
|
||||
/*
|
||||
* 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/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);
|
||||
}
|
@@ -22,10 +22,8 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* libavformat API example.
|
||||
*
|
||||
* Output a media file in any supported libavformat format.
|
||||
* The default codecs are used.
|
||||
* Libavformat API example: Output a media file in any supported
|
||||
* libavformat format. The default codecs are used.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -33,14 +31,13 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libswscale/swscale.h"
|
||||
|
||||
#undef exit
|
||||
|
||||
/* 5 seconds stream duration */
|
||||
#define STREAM_DURATION 200.0
|
||||
#define STREAM_DURATION 5.0
|
||||
#define STREAM_FRAME_RATE 25 /* 25 images/s */
|
||||
#define STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE))
|
||||
#define STREAM_PIX_FMT PIX_FMT_YUV420P /* default pix_fmt */
|
||||
@@ -50,11 +47,11 @@ static int sws_flags = SWS_BICUBIC;
|
||||
/**************************************************************/
|
||||
/* audio output */
|
||||
|
||||
static float t, tincr, tincr2;
|
||||
static int16_t *samples;
|
||||
static uint8_t *audio_outbuf;
|
||||
static int audio_outbuf_size;
|
||||
static int audio_input_frame_size;
|
||||
float t, tincr, tincr2;
|
||||
int16_t *samples;
|
||||
uint8_t *audio_outbuf;
|
||||
int audio_outbuf_size;
|
||||
int audio_input_frame_size;
|
||||
|
||||
/*
|
||||
* add an audio output stream
|
||||
@@ -64,12 +61,11 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
|
||||
AVCodecContext *c;
|
||||
AVStream *st;
|
||||
|
||||
st = avformat_new_stream(oc, NULL);
|
||||
st = av_new_stream(oc, 1);
|
||||
if (!st) {
|
||||
fprintf(stderr, "Could not alloc stream\n");
|
||||
exit(1);
|
||||
}
|
||||
st->id = 1;
|
||||
|
||||
c = st->codec;
|
||||
c->codec_id = codec_id;
|
||||
@@ -82,7 +78,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
|
||||
c->channels = 2;
|
||||
|
||||
// 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;
|
||||
|
||||
return st;
|
||||
@@ -145,7 +141,7 @@ static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
|
||||
int16_t *q;
|
||||
|
||||
q = samples;
|
||||
for (j = 0; j < frame_size; j++) {
|
||||
for(j=0;j<frame_size;j++) {
|
||||
v = (int)(sin(t) * 10000);
|
||||
for(i = 0; i < nb_channels; i++)
|
||||
*q++ = v;
|
||||
@@ -164,13 +160,13 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
||||
|
||||
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)
|
||||
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||
pkt.stream_index = st->index;
|
||||
pkt.data = audio_outbuf;
|
||||
pkt.stream_index= st->index;
|
||||
pkt.data= audio_outbuf;
|
||||
|
||||
/* write the compressed frame in the media file */
|
||||
if (av_interleaved_write_frame(oc, &pkt) != 0) {
|
||||
@@ -190,34 +186,25 @@ static void close_audio(AVFormatContext *oc, AVStream *st)
|
||||
/**************************************************************/
|
||||
/* video output */
|
||||
|
||||
static AVFrame *picture, *tmp_picture;
|
||||
static uint8_t *video_outbuf;
|
||||
static int frame_count, video_outbuf_size;
|
||||
AVFrame *picture, *tmp_picture;
|
||||
uint8_t *video_outbuf;
|
||||
int frame_count, video_outbuf_size;
|
||||
|
||||
/* add a video output stream */
|
||||
static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
|
||||
{
|
||||
AVCodecContext *c;
|
||||
AVStream *st;
|
||||
AVCodec *codec;
|
||||
|
||||
st = avformat_new_stream(oc, NULL);
|
||||
st = av_new_stream(oc, 0);
|
||||
if (!st) {
|
||||
fprintf(stderr, "Could not alloc stream\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = st->codec;
|
||||
|
||||
/* find the video encoder */
|
||||
codec = avcodec_find_encoder(codec_id);
|
||||
if (!codec) {
|
||||
fprintf(stderr, "codec not found\n");
|
||||
exit(1);
|
||||
}
|
||||
avcodec_get_context_defaults3(c, codec);
|
||||
|
||||
c->codec_id = codec_id;
|
||||
c->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
|
||||
/* put sample parameters */
|
||||
c->bit_rate = 400000;
|
||||
@@ -243,7 +230,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
|
||||
c->mb_decision=2;
|
||||
}
|
||||
// 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;
|
||||
|
||||
return st;
|
||||
@@ -329,15 +316,15 @@ static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height
|
||||
i = frame_index;
|
||||
|
||||
/* Y */
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
for(y=0;y<height;y++) {
|
||||
for(x=0;x<width;x++) {
|
||||
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
|
||||
}
|
||||
}
|
||||
|
||||
/* Cb and Cr */
|
||||
for (y = 0; y < height/2; y++) {
|
||||
for (x = 0; x < width/2; x++) {
|
||||
for(y=0;y<height/2;y++) {
|
||||
for(x=0;x<width/2;x++) {
|
||||
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;
|
||||
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;
|
||||
}
|
||||
@@ -382,14 +369,14 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
||||
|
||||
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
|
||||
/* raw video case. The API will change slightly in the near
|
||||
future for that. */
|
||||
futur for that */
|
||||
AVPacket pkt;
|
||||
av_init_packet(&pkt);
|
||||
|
||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||
pkt.stream_index = st->index;
|
||||
pkt.data = (uint8_t *)picture;
|
||||
pkt.size = sizeof(AVPicture);
|
||||
pkt.stream_index= st->index;
|
||||
pkt.data= (uint8_t *)picture;
|
||||
pkt.size= sizeof(AVPicture);
|
||||
|
||||
ret = av_interleaved_write_frame(oc, &pkt);
|
||||
} else {
|
||||
@@ -404,9 +391,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);
|
||||
if(c->coded_frame->key_frame)
|
||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||
pkt.stream_index = st->index;
|
||||
pkt.data = video_outbuf;
|
||||
pkt.size = out_size;
|
||||
pkt.stream_index= st->index;
|
||||
pkt.data= video_outbuf;
|
||||
pkt.size= out_size;
|
||||
|
||||
/* write the compressed frame in the media file */
|
||||
ret = av_interleaved_write_frame(oc, &pkt);
|
||||
@@ -454,7 +441,7 @@ int main(int argc, char **argv)
|
||||
"The output format is automatically guessed according to the file extension.\n"
|
||||
"Raw images can also be output by using '%%d' in the filename\n"
|
||||
"\n", argv[0]);
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
filename = argv[1];
|
||||
@@ -466,9 +453,9 @@ int main(int argc, char **argv)
|
||||
avformat_alloc_output_context2(&oc, NULL, "mpeg", filename);
|
||||
}
|
||||
if (!oc) {
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
fmt = oc->oformat;
|
||||
fmt= oc->oformat;
|
||||
|
||||
/* add the audio and video streams using the default format codecs
|
||||
and initialize the codecs */
|
||||
@@ -492,15 +479,15 @@ int main(int argc, char **argv)
|
||||
|
||||
/* open the output file, if needed */
|
||||
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);
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* write the stream header, if any */
|
||||
av_write_header(oc);
|
||||
picture->pts = 0;
|
||||
|
||||
for(;;) {
|
||||
/* compute current audio and video time */
|
||||
if (audio_st)
|
||||
@@ -522,7 +509,6 @@ int main(int argc, char **argv)
|
||||
write_audio_frame(oc, audio_st);
|
||||
} else {
|
||||
write_video_frame(oc, video_st);
|
||||
picture->pts++;
|
||||
}
|
||||
}
|
||||
|
200
doc/faq.texi
200
doc/faq.texi
@@ -11,6 +11,22 @@
|
||||
|
||||
@chapter General Questions
|
||||
|
||||
@section When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?
|
||||
|
||||
Like most open source projects FFmpeg suffers from a certain lack of
|
||||
manpower. For this reason the developers have to prioritize the work
|
||||
they do and putting out releases is not at the top of the list, fixing
|
||||
bugs and reviewing patches takes precedence. Please don't complain or
|
||||
request more timely and/or frequent releases unless you are willing to
|
||||
help out creating them.
|
||||
|
||||
@section I have a problem with an old version of FFmpeg; where should I report it?
|
||||
Nowhere. We do not support old FFmpeg versions in any way, we simply lack
|
||||
the time, motivation and manpower to do so. If you have a problem with an
|
||||
old version of FFmpeg, upgrade to the latest git snapshot. If you
|
||||
still experience the problem, then you can report it according to the
|
||||
guidelines in @url{http://ffmpeg.org/bugreports.html}.
|
||||
|
||||
@section Why doesn't FFmpeg support feature [xyz]?
|
||||
|
||||
Because no one has taken on that task yet. FFmpeg development is
|
||||
@@ -24,6 +40,30 @@ No. Windows DLLs are not portable, bloated and often slow.
|
||||
Moreover FFmpeg strives to support all codecs natively.
|
||||
A DLL loader is not conducive to that goal.
|
||||
|
||||
@section My bug report/mail to ffmpeg-devel/user has not received any replies.
|
||||
|
||||
Likely reasons
|
||||
@itemize
|
||||
@item We are busy and haven't had time yet to read your report or
|
||||
investigate the issue.
|
||||
@item You didn't follow @url{http://ffmpeg.org/bugreports.html}.
|
||||
@item You didn't use git HEAD.
|
||||
@item You reported a segmentation fault without gdb output.
|
||||
@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
|
||||
libav* from another application.
|
||||
@item You speak about a video having problems on playback but
|
||||
not what you use to play it.
|
||||
@item We have no faint clue what you are talking about besides
|
||||
that it is related to FFmpeg.
|
||||
@end itemize
|
||||
|
||||
@section Is there a forum for FFmpeg? I do not like mailing lists.
|
||||
|
||||
You may view our mailing lists with a more forum-alike look here:
|
||||
@url{http://dir.gmane.org/gmane.comp.video.ffmpeg.user},
|
||||
but, if you post, please remember that our mailing list rules still apply there.
|
||||
|
||||
@section I cannot read this file although this format seems to be supported by ffmpeg.
|
||||
|
||||
Even if ffmpeg can read the container format, it may not support all its
|
||||
@@ -83,8 +123,7 @@ problem and an NP-hard problem...
|
||||
|
||||
@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}).
|
||||
|
||||
@section How do I encode single pictures into movies?
|
||||
@@ -135,15 +174,15 @@ The @file{movie.mpg} used as input will be converted to
|
||||
|
||||
Instead of relying on file format self-recognition, you may also use
|
||||
@table @option
|
||||
@item -c:v ppm
|
||||
@item -c:v png
|
||||
@item -c:v mjpeg
|
||||
@item -vcodec ppm
|
||||
@item -vcodec png
|
||||
@item -vcodec mjpeg
|
||||
@end table
|
||||
to force the encoding.
|
||||
|
||||
Applying that to the previous example:
|
||||
@example
|
||||
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg
|
||||
ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
|
||||
@end example
|
||||
|
||||
Beware that there is no "jpeg" codec. Use "mjpeg" instead.
|
||||
@@ -162,21 +201,59 @@ Use @file{-} as file name.
|
||||
|
||||
Try '-f image2 test%d.jpg'.
|
||||
|
||||
@section Why can I not change the frame rate?
|
||||
@section Why can I not change the framerate?
|
||||
|
||||
Some codecs, like MPEG-1/2, only allow a small number of fixed frame rates.
|
||||
Choose a different codec with the -c:v command line option.
|
||||
Some codecs, like MPEG-1/2, only allow a small number of fixed framerates.
|
||||
Choose a different codec with the -vcodec command line option.
|
||||
|
||||
@section How do I encode Xvid or DivX video with ffmpeg?
|
||||
|
||||
Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
|
||||
standard (note that there are many other coding formats that use this
|
||||
same standard). Thus, use '-c:v mpeg4' to encode in these formats. The
|
||||
same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The
|
||||
default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want
|
||||
a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will
|
||||
force the fourcc 'xvid' to be stored as the video fourcc rather than the
|
||||
default.
|
||||
|
||||
@section How do I encode videos which play on the iPod?
|
||||
|
||||
@table @option
|
||||
@item needed stuff
|
||||
-acodec libfaac -vcodec mpeg4 width<=320 height<=240
|
||||
@item working stuff
|
||||
mv4, title
|
||||
@item non-working stuff
|
||||
B-frames
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
|
||||
@end table
|
||||
|
||||
@section How do I encode videos which play on the PSP?
|
||||
|
||||
@table @option
|
||||
@item needed stuff
|
||||
-acodec libfaac -vcodec mpeg4 width*height<=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
|
||||
@item working stuff
|
||||
mv4, title
|
||||
@item non-working stuff
|
||||
B-frames
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
|
||||
@item needed stuff for H.264
|
||||
-acodec libfaac -vcodec libx264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
|
||||
@item working stuff for H.264
|
||||
title, loop filter
|
||||
@item non-working stuff for H.264
|
||||
CAVLC
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
|
||||
@item higher resolution for newer PSP firmwares, width<=480, height<=272
|
||||
-vcodec libx264 -level 21 -coder 1 -f psp
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
|
||||
@end table
|
||||
|
||||
@section Which are good parameters for encoding high quality MPEG-4?
|
||||
|
||||
'-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
|
||||
@@ -208,8 +285,7 @@ Just create an "input.avs" text file with this single line ...
|
||||
ffmpeg -i input.avs
|
||||
@end example
|
||||
|
||||
For ANY other help on Avisynth, please visit the
|
||||
@uref{http://www.avisynth.org/, Avisynth homepage}.
|
||||
For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}.
|
||||
|
||||
@section How can I join video files?
|
||||
|
||||
@@ -222,13 +298,13 @@ equally humble @code{copy} under Windows), and finally transcoding back to your
|
||||
format of choice.
|
||||
|
||||
@example
|
||||
ffmpeg -i input1.avi -same_quant intermediate1.mpg
|
||||
ffmpeg -i input2.avi -same_quant intermediate2.mpg
|
||||
ffmpeg -i input1.avi -sameq intermediate1.mpg
|
||||
ffmpeg -i input2.avi -sameq intermediate2.mpg
|
||||
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
|
||||
ffmpeg -i intermediate_all.mpg -same_quant output.avi
|
||||
ffmpeg -i intermediate_all.mpg -sameq output.avi
|
||||
@end example
|
||||
|
||||
Notice that you should either use @code{-same_quant} or set a reasonably high
|
||||
Notice that you should either use @code{-sameq} or set a reasonably high
|
||||
bitrate for your intermediate and output files, if you want to preserve
|
||||
video quality.
|
||||
|
||||
@@ -238,10 +314,10 @@ of named pipes, should your platform support it:
|
||||
@example
|
||||
mkfifo intermediate1.mpg
|
||||
mkfifo intermediate2.mpg
|
||||
ffmpeg -i input1.avi -same_quant -y intermediate1.mpg < /dev/null &
|
||||
ffmpeg -i input2.avi -same_quant -y intermediate2.mpg < /dev/null &
|
||||
ffmpeg -i input1.avi -sameq -y intermediate1.mpg < /dev/null &
|
||||
ffmpeg -i input2.avi -sameq -y intermediate2.mpg < /dev/null &
|
||||
cat intermediate1.mpg intermediate2.mpg |\
|
||||
ffmpeg -f mpeg -i - -same_quant -c:v mpeg4 -acodec libmp3lame output.avi
|
||||
ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
|
||||
@end example
|
||||
|
||||
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
|
||||
@@ -268,47 +344,27 @@ cat temp1.a temp2.a > all.a &
|
||||
cat temp1.v temp2.v > all.v &
|
||||
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
||||
-f yuv4mpegpipe -i all.v \
|
||||
-same_quant -y output.flv
|
||||
-sameq -y output.flv
|
||||
rm temp[12].[av] all.[av]
|
||||
@end example
|
||||
|
||||
@section -profile option fails when encoding H.264 video with AAC audio
|
||||
@section The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.
|
||||
|
||||
@command{ffmpeg} prints an error like
|
||||
Read the MPEG spec about video buffer verifier.
|
||||
|
||||
@example
|
||||
Undefined constant or missing '(' in 'baseline'
|
||||
Unable to parse option value "baseline"
|
||||
Error setting option profile to value baseline.
|
||||
@end example
|
||||
@section I want CBR, but no matter what I do frame sizes differ.
|
||||
|
||||
Short answer: write @option{-profile:v} instead of @option{-profile}.
|
||||
You do not understand what CBR is, please read the MPEG spec.
|
||||
Read about video buffer verifier and constant bitrate.
|
||||
The one sentence summary is that there is a buffer and the input rate is
|
||||
constant, the output can vary as needed.
|
||||
|
||||
Long answer: this happens because the @option{-profile} option can apply to both
|
||||
video and audio. Specifically the AAC encoder also defines some profiles, none
|
||||
of which are named @var{baseline}.
|
||||
@section How do I check if a stream is CBR?
|
||||
|
||||
The solution is to apply the @option{-profile} option to the video stream only
|
||||
by using @url{http://ffmpeg.org/ffmpeg.html#Stream-specifiers-1, Stream specifiers}.
|
||||
Appending @code{:v} to it will do exactly that.
|
||||
To quote the MPEG-2 spec:
|
||||
"There is no way to tell that a bitstream is constant bitrate without
|
||||
examining all of the vbv_delay values and making complicated computations."
|
||||
|
||||
@section Using @option{-f lavfi}, audio becomes mono for no apparent reason.
|
||||
|
||||
Use @option{-dumpgraph -} to find out exactly where the channel layout is
|
||||
lost.
|
||||
|
||||
Most likely, it is through @code{auto-inserted aconvert}. Try to understand
|
||||
why the converting filter was needed at that place.
|
||||
|
||||
Just before the output is a likely place, as @option{-f lavfi} currently
|
||||
only support packed S16.
|
||||
|
||||
Then insert the correct @code{aconvert} explicitly in the filter graph,
|
||||
specifying the exact format.
|
||||
|
||||
@example
|
||||
aconvert=s16:stereo:packed
|
||||
@end example
|
||||
|
||||
@chapter Development
|
||||
|
||||
@@ -356,12 +412,12 @@ the FFmpeg Windows Help Forum at
|
||||
|
||||
No. These tools are too bloated and they complicate the build.
|
||||
|
||||
@section Why not rewrite FFmpeg in object-oriented C++?
|
||||
@section Why not rewrite ffmpeg in object-oriented C++?
|
||||
|
||||
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
|
||||
favor straight C; it works for them. For more arguments on this matter,
|
||||
read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}.
|
||||
read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}).
|
||||
|
||||
@section Why are the ffmpeg programs devoid of debugging symbols?
|
||||
|
||||
@@ -372,10 +428,18 @@ you need the debug information, use the *_g versions.
|
||||
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
||||
|
||||
Yes, as long as the code is optional and can easily and cleanly be placed
|
||||
under #if CONFIG_GPL without breaking anything. So, for example, a new codec
|
||||
under #if CONFIG_GPL without breaking anything. So for example a new codec
|
||||
or filter would be OK under GPL while a bug fix to LGPL code would not.
|
||||
|
||||
@section I'm using FFmpeg from within my C++ application but the linker complains about missing symbols which seem to be available.
|
||||
@section I want to compile xyz.c alone but my compiler produced many errors.
|
||||
|
||||
Common code is in its own files in libav* and is used by the individual
|
||||
codecs. They will not work without the common parts, you have to compile
|
||||
the whole libav*. If you wish, disable some parts with configure switches.
|
||||
You can also try to hack it and remove more, but if you had problems fixing
|
||||
the compilation failure then you are probably not qualified for this.
|
||||
|
||||
@section I'm using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.
|
||||
|
||||
FFmpeg is a pure C project, so to use the libraries within your C++ application
|
||||
you need to explicitly state that you are using a C library. You can do this by
|
||||
@@ -385,7 +449,7 @@ See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
|
||||
|
||||
@section I'm using libavutil from within my C++ application but the compiler complains about 'UINT64_C' was not declared in this scope
|
||||
|
||||
FFmpeg is a pure C project using C99 math features, in order to enable C++
|
||||
Libav is a pure C project using C99 math features, in order to enable C++
|
||||
to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
|
||||
|
||||
@section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
|
||||
@@ -393,6 +457,14 @@ to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
|
||||
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
||||
FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer sources.
|
||||
|
||||
@section I get "No compatible shell script interpreter found." in MSys.
|
||||
|
||||
The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
|
||||
|
||||
@section I get "./configure: line <xxx>: pr: command not found" in MSys.
|
||||
|
||||
The standard MSys install doesn't come with pr. You need to get it from the coreutils package.
|
||||
|
||||
@section Where can I find libav* headers for Pascal/Delphi?
|
||||
|
||||
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
||||
@@ -407,24 +479,12 @@ Even if peculiar since it is network oriented, RTP is a container like any
|
||||
other. You have to @emph{demux} RTP before feeding the payload to libavcodec.
|
||||
In this specific case please look at RFC 4629 to see how it should be done.
|
||||
|
||||
@section AVStream.r_frame_rate is wrong, it is much larger than the frame rate.
|
||||
@section AVStream.r_frame_rate is wrong, it is much larger than the framerate.
|
||||
|
||||
r_frame_rate is NOT the average frame rate, it is the smallest frame rate
|
||||
r_frame_rate is NOT the average framerate, it is the smallest framerate
|
||||
that can accurately represent all timestamps. So no, it is not
|
||||
wrong if it is larger than the average!
|
||||
For example, if you have mixed 25 and 30 fps content, then r_frame_rate
|
||||
will be 150.
|
||||
|
||||
@section Why is @code{make fate} not running all tests?
|
||||
|
||||
Make sure you have the fate-suite samples and the @code{SAMPLES} Make variable
|
||||
or @code{FATE_SAMPLES} environment variable or the @code{--samples}
|
||||
@command{configure} option is set to the right path.
|
||||
|
||||
@section Why is @code{make fate} not finding the samples?
|
||||
|
||||
Do you happen to have a @code{~} character in the samples path to indicate a
|
||||
home directory? The value is used in ways where the shell cannot expand it,
|
||||
causing FATE to not find files. Just replace @code{~} by the full path.
|
||||
|
||||
@bye
|
||||
|
174
doc/fate.texi
174
doc/fate.texi
@@ -1,174 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle FATE Automated Testing Environment
|
||||
@titlepage
|
||||
@center @titlefont{FATE Automated Testing Environment}
|
||||
@end titlepage
|
||||
|
||||
@node Top
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Introduction
|
||||
|
||||
FATE is an extended regression suite on the client-side and a means
|
||||
for results aggregation and presentation on the server-side.
|
||||
|
||||
The first part of this document explains how you can use FATE from
|
||||
your FFmpeg source directory to test your ffmpeg binary. The second
|
||||
part describes how you can run FATE to submit the results to FFmpeg's
|
||||
FATE server.
|
||||
|
||||
In any way you can have a look at the publicly viewable FATE results
|
||||
by visiting this website:
|
||||
|
||||
@url{http://fate.ffmpeg.org/}
|
||||
|
||||
This is especially recommended for all people contributing source
|
||||
code to FFmpeg, as it can be seen if some test on some platform broke
|
||||
with there recent contribution. This usually happens on the platforms
|
||||
the developers could not test on.
|
||||
|
||||
The second part of this document describes how you can run FATE to
|
||||
submit your results to FFmpeg's FATE server. If you want to submit your
|
||||
results be sure to check that your combination of CPU, OS and compiler
|
||||
is not already listed on the above mentioned website.
|
||||
|
||||
In the third part you can find a comprehensive listing of FATE makefile
|
||||
targets and variables.
|
||||
|
||||
|
||||
@chapter Using FATE from your FFmpeg source directory
|
||||
|
||||
If you want to run FATE on your machine you need to have the samples
|
||||
in place. You can get the samples via the build target fate-rsync.
|
||||
Use this command from the top-level source directory:
|
||||
|
||||
@example
|
||||
make fate-rsync SAMPLES=fate-suite/
|
||||
make fate SAMPLES=fate-suite/
|
||||
@end example
|
||||
|
||||
The above commands set the samples location by passing a makefile
|
||||
variable via command line. It is also possible to set the samples
|
||||
location at source configuration time by invoking configure with
|
||||
`--samples=<path to the samples directory>'. Afterwards you can
|
||||
invoke the makefile targets without setting the SAMPLES makefile
|
||||
variable. This is illustrated by the following commands:
|
||||
|
||||
@example
|
||||
./configure --samples=fate-suite/
|
||||
make fate-rsync
|
||||
make fate
|
||||
@end example
|
||||
|
||||
Yet another way to tell FATE about the location of the sample
|
||||
directory is by making sure the environment variable FATE_SAMPLES
|
||||
contains the path to your samples directory. This can be achieved
|
||||
by e.g. putting that variable in your shell profile or by setting
|
||||
it in your interactive session.
|
||||
|
||||
@example
|
||||
FATE_SAMPLES=fate-suite/ make fate
|
||||
@end example
|
||||
|
||||
@float NOTE
|
||||
Do not put a '~' character in the samples path to indicate a home
|
||||
directory. Because of shell nuances, this will cause FATE to fail.
|
||||
@end float
|
||||
|
||||
|
||||
@chapter Submitting the results to the FFmpeg result aggregation server
|
||||
|
||||
To submit your results to the server you should run fate through the
|
||||
shell script tests/fate.sh from the FFmpeg sources. This script needs
|
||||
to be invoked with a configuration file as its first argument.
|
||||
|
||||
@example
|
||||
tests/fate.sh /path/to/fate_config
|
||||
@end example
|
||||
|
||||
A configuration file template with comments describing the individual
|
||||
configuration variables can be found at @file{tests/fate_config.sh.template}.
|
||||
|
||||
@ifhtml
|
||||
The mentioned configuration template is also available here:
|
||||
@verbatiminclude ../tests/fate_config.sh.template
|
||||
@end ifhtml
|
||||
|
||||
Create a configuration that suits your needs, based on the configuration
|
||||
template. The `slot' configuration variable can be any string that is not
|
||||
yet used, but it is suggested that you name it adhering to the following
|
||||
pattern <arch>-<os>-<compiler>-<compiler version>. The configuration file
|
||||
itself will be sourced in a shell script, therefore all shell features may
|
||||
be used. This enables you to setup the environment as you need it for your
|
||||
build.
|
||||
|
||||
For your first test runs the `fate_recv' variable should be empty or
|
||||
commented out. This will run everything as normal except that it will omit
|
||||
the submission of the results to the server. The following files should be
|
||||
present in $workdir as specified in the configuration file:
|
||||
|
||||
@itemize
|
||||
@item configure.log
|
||||
@item compile.log
|
||||
@item test.log
|
||||
@item report
|
||||
@item version
|
||||
@end itemize
|
||||
|
||||
When you have everything working properly you can create an SSH key and
|
||||
send its public part to the FATE server administrator.
|
||||
|
||||
Configure your SSH client to use public key authentication with that key
|
||||
when connecting to the FATE server. Also do not forget to check the identity
|
||||
of the server and to accept its host key. This can usually be achieved by
|
||||
running your SSH client manually and killing it after you accepted the key.
|
||||
The FATE server's fingerprint is:
|
||||
|
||||
b1:31:c8:79:3f:04:1d:f8:f2:23:26:5a:fd:55:fa:92
|
||||
|
||||
The only thing left is to automate the execution of the fate.sh script and
|
||||
the synchronisation of the samples directory.
|
||||
|
||||
|
||||
@chapter FATE makefile targets and variables
|
||||
|
||||
@section Makefile targets
|
||||
|
||||
@table @option
|
||||
@item fate-rsync
|
||||
Download/synchronize sample files to the configured samples directory.
|
||||
|
||||
@item fate-list
|
||||
Will list all fate/regression test targets.
|
||||
|
||||
@item fate
|
||||
Run the FATE test suite (requires the fate-suite dataset).
|
||||
@end table
|
||||
|
||||
@section Makefile variables
|
||||
|
||||
@table @option
|
||||
@item V
|
||||
Verbosity level, can be set to 0, 1 or 2.
|
||||
@itemize
|
||||
@item 0: show just the test arguments
|
||||
@item 1: show just the command used in the test
|
||||
@item 2: show everything
|
||||
@end itemize
|
||||
|
||||
@item SAMPLES
|
||||
Specify or override the path to the FATE samples at make time, it has a
|
||||
meaning only while running the regression tests.
|
||||
|
||||
@item THREADS
|
||||
Specify how many threads to use while running regression tests, it is
|
||||
quite useful to detect thread-related regressions.
|
||||
@end table
|
||||
|
||||
Example:
|
||||
@example
|
||||
make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
|
||||
@end example
|
45
doc/fate.txt
Normal file
45
doc/fate.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
FATE Automated Testing Environment
|
||||
|
||||
FATE provides a regression testsuite that can be run locally or configured
|
||||
to send reports to fate.ffmpeg.org.
|
||||
In order to run, it needs a large amount of data (samples and references)
|
||||
that is provided separately from the actual source distribution.
|
||||
|
||||
Use the following command to get the fate test samples
|
||||
|
||||
# make fate-rsync SAMPLES=fate-suite/
|
||||
|
||||
To inform the build system about the testsuite location, pass
|
||||
`--samples=<path to the samples>` to configure or set the SAMPLES Make
|
||||
variable or the FATE_SAMPLES environment variable to a suitable value.
|
||||
|
||||
For information on how to set up FATE to send results to the official FFmpeg
|
||||
testing framework, please refer to the following wiki page:
|
||||
http://wiki.multimedia.cx/index.php?title=FATE
|
||||
|
||||
FATE Makefile targets:
|
||||
|
||||
fate-list
|
||||
Will list all fate/regression test targets.
|
||||
|
||||
fate
|
||||
Run the FATE test suite (requires the fate-suite dataset).
|
||||
|
||||
Fate Makefile variables:
|
||||
|
||||
V
|
||||
Verbosity level, can be set to 0, 1 or 2.
|
||||
* 0: show just the test arguments
|
||||
* 1: show just the command used in the test
|
||||
* 2: show everything
|
||||
|
||||
SAMPLES
|
||||
Specify or override the path to the FATE samples at make time, it has a
|
||||
meaning only while running the regression tests.
|
||||
|
||||
THREADS
|
||||
Specify how many threads to use while running regression tests, it is
|
||||
quite useful to detect thread-related regressions.
|
||||
|
||||
Example:
|
||||
make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
|
4561
doc/ffmpeg-mt-authorship.txt
Normal file
4561
doc/ffmpeg-mt-authorship.txt
Normal file
File diff suppressed because it is too large
Load Diff
606
doc/ffmpeg.texi
606
doc/ffmpeg.texi
@@ -15,7 +15,7 @@ The generic syntax is:
|
||||
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffmpeg [global options] [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
|
||||
ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@@ -26,39 +26,21 @@ ffmpeg is a very fast video and audio converter that can also grab from
|
||||
a live audio/video source. It can also convert between arbitrary sample
|
||||
rates and resize video on the fly with a high quality polyphase filter.
|
||||
|
||||
ffmpeg reads from an arbitrary number of input "files" (which can be regular
|
||||
files, pipes, network streams, grabbing devices, etc.), specified by the
|
||||
@code{-i} option, and writes to an arbitrary number of output "files", which are
|
||||
specified by a plain output filename. Anything found on the command line which
|
||||
cannot be interpreted as an option is considered to be an output filename.
|
||||
|
||||
Each input or output file can in principle contain any number of streams of
|
||||
different types (video/audio/subtitle/attachment/data). Allowed number and/or
|
||||
types of streams can be limited by the container format. Selecting, which
|
||||
streams from which inputs go into output, is done either automatically or with
|
||||
the @code{-map} option (see the Stream selection chapter).
|
||||
|
||||
To refer to input files in options, you must use their indices (0-based). E.g.
|
||||
the first input file is @code{0}, the second is @code{1} etc. Similarly, streams
|
||||
within a file are referred to by their indices. E.g. @code{2:3} refers to the
|
||||
fourth stream in the third input file. See also the Stream specifiers chapter.
|
||||
The command line interface is designed to be intuitive, in the sense
|
||||
that ffmpeg tries to figure out all parameters that can possibly be
|
||||
derived automatically. You usually only have to specify the target
|
||||
bitrate you want.
|
||||
|
||||
As a general rule, options are applied to the next specified
|
||||
file. Therefore, order is important, and you can have the same
|
||||
option on the command line multiple times. Each occurrence is
|
||||
then applied to the next input or output file.
|
||||
Exceptions from this rule are the global options (e.g. verbosity level),
|
||||
which should be specified first.
|
||||
|
||||
Do not mix input and output files -- first specify all input files, then all
|
||||
output files. Also do not mix options which belong to different files. All
|
||||
options apply ONLY to the next input or output file and are reset between files.
|
||||
|
||||
@itemize
|
||||
@item
|
||||
To set the video bitrate of the output file to 64kbit/s:
|
||||
@example
|
||||
ffmpeg -i input.avi -b:v 64k output.avi
|
||||
ffmpeg -i input.avi -b 64k output.avi
|
||||
@end example
|
||||
|
||||
@item
|
||||
@@ -77,90 +59,51 @@ ffmpeg -r 1 -i input.m2v -r 24 output.avi
|
||||
|
||||
The format option may be needed for raw input files.
|
||||
|
||||
By default ffmpeg tries to convert as losslessly as possible: It
|
||||
uses the same audio and video parameters for the outputs as the one
|
||||
specified for the inputs.
|
||||
|
||||
@c man end DESCRIPTION
|
||||
|
||||
@chapter Stream selection
|
||||
@c man begin STREAM SELECTION
|
||||
|
||||
By default ffmpeg includes only one stream of each type (video, audio, subtitle)
|
||||
present in the input files and adds them to each output file. It picks the
|
||||
"best" of each based upon the following criteria; for video it is the stream
|
||||
with the highest resolution, for audio the stream with the most channels, for
|
||||
subtitle it's the first subtitle stream. In the case where several streams of
|
||||
the same type rate equally, the lowest numbered stream is chosen.
|
||||
|
||||
You can disable some of those defaults by using @code{-vn/-an/-sn} options. For
|
||||
full manual control, use the @code{-map} option, which disables the defaults just
|
||||
described.
|
||||
|
||||
@c man end STREAM SELECTION
|
||||
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include avtools-common-opts.texi
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@table @option
|
||||
|
||||
@item -f @var{fmt} (@emph{input/output})
|
||||
Force input or output file format. The format is normally auto detected for input
|
||||
files and guessed from file extension for output files, so this option is not
|
||||
needed in most cases.
|
||||
@item -f @var{fmt}
|
||||
Force format.
|
||||
|
||||
@item -i @var{filename} (@emph{input})
|
||||
@item -i @var{filename}
|
||||
input file name
|
||||
|
||||
@item -y (@emph{global})
|
||||
Overwrite output files without asking.
|
||||
@item -y
|
||||
Overwrite output files.
|
||||
|
||||
@item -n (@emph{global})
|
||||
Do not overwrite output files but exit if file exists.
|
||||
@item -t @var{duration}
|
||||
Restrict the transcoded/captured video sequence
|
||||
to the duration specified in seconds.
|
||||
@code{hh:mm:ss[.xxx]} syntax is also supported.
|
||||
|
||||
@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||
Select an encoder (when used before an output file) or a decoder (when used
|
||||
before an input file) for one or more streams. @var{codec} is the name of a
|
||||
decoder/encoder or a special value @code{copy} (output only) to indicate that
|
||||
the stream is not to be re-encoded.
|
||||
|
||||
For example
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT
|
||||
@end example
|
||||
encodes all video streams with libx264 and copies all audio streams.
|
||||
|
||||
For each stream, the last matching @code{c} option is applied, so
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT
|
||||
@end example
|
||||
will copy all the streams except the second video, which will be encoded with
|
||||
libx264, and the 138th audio, which will be encoded with libvorbis.
|
||||
|
||||
@item -t @var{duration} (@emph{output})
|
||||
Stop writing the output after its duration reaches @var{duration}.
|
||||
@var{duration} may be a number in seconds, or in @code{hh:mm:ss[.xxx]} form.
|
||||
|
||||
@item -fs @var{limit_size} (@emph{output})
|
||||
@item -fs @var{limit_size}
|
||||
Set the file size limit.
|
||||
|
||||
@item -ss @var{position} (@emph{input/output})
|
||||
When used as an input option (before @code{-i}), seeks in this input file to
|
||||
@var{position}. When used as an output option (before an output filename),
|
||||
decodes but discards input until the timestamps reach @var{position}. This is
|
||||
slower, but more accurate.
|
||||
@item -ss @var{position}
|
||||
Seek to given time position in seconds.
|
||||
@code{hh:mm:ss[.xxx]} syntax is also supported.
|
||||
|
||||
@var{position} may be either in seconds or in @code{hh:mm:ss[.xxx]} form.
|
||||
|
||||
@item -itsoffset @var{offset} (@emph{input})
|
||||
@item -itsoffset @var{offset}
|
||||
Set the input time offset in seconds.
|
||||
@code{[-]hh:mm:ss[.xxx]} syntax is also supported.
|
||||
This option affects all the input files that follow it.
|
||||
The offset is added to the timestamps of the input files.
|
||||
Specifying a positive offset means that the corresponding
|
||||
streams are delayed by @var{offset} seconds.
|
||||
streams are delayed by 'offset' seconds.
|
||||
|
||||
@item -timestamp @var{time} (@emph{output})
|
||||
@item -timestamp @var{time}
|
||||
Set the recording timestamp in the container.
|
||||
The syntax for @var{time} is:
|
||||
@example
|
||||
@@ -172,31 +115,21 @@ interpreted as UTC.
|
||||
If the year-month-day part is not specified it takes the current
|
||||
year-month-day.
|
||||
|
||||
@item -metadata[:metadata_specifier] @var{key}=@var{value} (@emph{output,per-metadata})
|
||||
@item -metadata @var{key}=@var{value}
|
||||
Set a metadata key/value pair.
|
||||
|
||||
An optional @var{metadata_specifier} may be given to set metadata
|
||||
on streams or chapters. See @code{-map_metadata} documentation for
|
||||
details.
|
||||
|
||||
This option overrides metadata set with @code{-map_metadata}. It is
|
||||
also possible to delete metadata by using an empty value.
|
||||
|
||||
For example, for setting the title in the output file:
|
||||
@example
|
||||
ffmpeg -i in.avi -metadata title="my title" out.flv
|
||||
@end example
|
||||
|
||||
To set the language of the first audio stream:
|
||||
@example
|
||||
ffmpeg -i INPUT -metadata:s:a:1 language=eng OUTPUT
|
||||
@end example
|
||||
@item -v @var{number}
|
||||
Set the logging verbosity level.
|
||||
|
||||
@item -target @var{type} (@emph{output})
|
||||
Specify target file type (@code{vcd}, @code{svcd}, @code{dvd}, @code{dv},
|
||||
@code{dv50}). @var{type} may be prefixed with @code{pal-}, @code{ntsc-} or
|
||||
@code{film-} to use the corresponding standard. All the format options
|
||||
(bitrate, codecs, buffer sizes) are then set automatically. You can just type:
|
||||
@item -target @var{type}
|
||||
Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd",
|
||||
"ntsc-svcd", ... ). All the format options (bitrate, codecs,
|
||||
buffer sizes) are then set automatically. You can just type:
|
||||
|
||||
@example
|
||||
ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
|
||||
@@ -209,71 +142,33 @@ they do not conflict with the standard, as in:
|
||||
ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
|
||||
@end example
|
||||
|
||||
@item -dframes @var{number} (@emph{output})
|
||||
Set the number of data frames to record. This is an alias for @code{-frames:d}.
|
||||
@item -dframes @var{number}
|
||||
Set the number of data frames to record.
|
||||
|
||||
@item -frames[:@var{stream_specifier}] @var{framecount} (@emph{output,per-stream})
|
||||
Stop writing to the stream after @var{framecount} frames.
|
||||
@item -scodec @var{codec}
|
||||
Force subtitle codec ('copy' to copy stream).
|
||||
|
||||
@item -q[:@var{stream_specifier}] @var{q} (@emph{output,per-stream})
|
||||
@itemx -qscale[:@var{stream_specifier}] @var{q} (@emph{output,per-stream})
|
||||
Use fixed quality scale (VBR). The meaning of @var{q} is
|
||||
codec-dependent.
|
||||
@item -newsubtitle
|
||||
Add a new subtitle stream to the current output stream.
|
||||
|
||||
@item -filter[:@var{stream_specifier}] @var{filter_graph} (@emph{output,per-stream})
|
||||
@var{filter_graph} is a description of the filter graph to apply to
|
||||
the stream. Use @code{-filters} to show all the available filters
|
||||
(including also sources and sinks).
|
||||
@item -pre[:@var{stream_specifier}] @var{preset_name} (@emph{output,per-stream})
|
||||
Specify the preset for matching stream(s).
|
||||
|
||||
@item -stats (@emph{global})
|
||||
Print encoding progress/statistics. On by default.
|
||||
|
||||
@item -attach @var{filename} (@emph{output})
|
||||
Add an attachment to the output file. This is supported by a few formats
|
||||
like Matroska for e.g. fonts used in rendering subtitles. Attachments
|
||||
are implemented as a specific type of stream, so this option will add
|
||||
a new stream to the file. It is then possible to use per-stream options
|
||||
on this stream in the usual way. Attachment streams created with this
|
||||
option will be created after all the other streams (i.e. those created
|
||||
with @code{-map} or automatic mappings).
|
||||
|
||||
Note that for Matroska you also have to set the mimetype metadata tag:
|
||||
@example
|
||||
ffmpeg -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv
|
||||
@end example
|
||||
(assuming that the attachment stream will be third in the output file).
|
||||
|
||||
@item -dump_attachment[:@var{stream_specifier}] @var{filename} (@emph{input,per-stream})
|
||||
Extract the matching attachment stream into a file named @var{filename}. If
|
||||
@var{filename} is empty, then the value of the @code{filename} metadata tag
|
||||
will be used.
|
||||
|
||||
E.g. to extract the first attachment to a file named 'out.ttf':
|
||||
@example
|
||||
ffmpeg -dump_attachment:t:0 out.ttf INPUT
|
||||
@end example
|
||||
To extract all attachments to files determined by the @code{filename} tag:
|
||||
@example
|
||||
ffmpeg -dump_attachment:t "" INPUT
|
||||
@end example
|
||||
|
||||
Technical note -- attachments are implemented as codec extradata, so this
|
||||
option can actually be used to extract extradata from any stream, not just
|
||||
attachments.
|
||||
@item -slang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current subtitle stream.
|
||||
|
||||
@end table
|
||||
|
||||
@section Video Options
|
||||
|
||||
@table @option
|
||||
@item -vframes @var{number} (@emph{output})
|
||||
Set the number of video frames to record. This is an alias for @code{-frames:v}.
|
||||
@item -r[:@var{stream_specifier}] @var{fps} (@emph{input/output,per-stream})
|
||||
@item -b @var{bitrate}
|
||||
Set the video bitrate in bit/s (default = 200 kb/s).
|
||||
@item -vframes @var{number}
|
||||
Set the number of video frames to record.
|
||||
@item -r @var{fps}
|
||||
Set frame rate (Hz value, fraction or abbreviation), (default = 25).
|
||||
@item -s[:@var{stream_specifier}] @var{size} (@emph{input/output,per-stream})
|
||||
Set frame size. The format is @samp{wxh} (default - same as source).
|
||||
@item -s @var{size}
|
||||
Set frame size. The format is @samp{wxh} (ffserver default = 160x128).
|
||||
There is no default for input streams,
|
||||
for output streams it is set by default to the size of the source stream.
|
||||
The following abbreviations are recognized:
|
||||
@table @samp
|
||||
@item sqcif
|
||||
@@ -336,7 +231,7 @@ The following abbreviations are recognized:
|
||||
1920x1080
|
||||
@end table
|
||||
|
||||
@item -aspect[:@var{stream_specifier}] @var{aspect} (@emph{output,per-stream})
|
||||
@item -aspect @var{aspect}
|
||||
Set the video display aspect ratio specified by @var{aspect}.
|
||||
|
||||
@var{aspect} can be a floating point number string, or a string of the
|
||||
@@ -358,8 +253,7 @@ crop=width:height:x:y instead.
|
||||
@item -padcolor @var{hex_color}
|
||||
All the pad options have been removed. Use -vf
|
||||
pad=width:height:x:y:color instead.
|
||||
|
||||
@item -vn (@emph{output})
|
||||
@item -vn
|
||||
Disable video recording.
|
||||
@item -bt @var{tolerance}
|
||||
Set video bitrate tolerance (in bits, default 4000k).
|
||||
@@ -375,19 +269,17 @@ Requires -bufsize to be set.
|
||||
Set min video bitrate (in bit/s).
|
||||
Most useful in setting up a CBR encode:
|
||||
@example
|
||||
ffmpeg -i myfile.avi -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
|
||||
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
|
||||
@end example
|
||||
It is of little use elsewise.
|
||||
@item -bufsize @var{size}
|
||||
Set video buffer verifier buffer size (in bits).
|
||||
@item -vcodec @var{codec} (@emph{output})
|
||||
Set the video codec. This is an alias for @code{-codec:v}.
|
||||
@item -same_quant
|
||||
@item -vcodec @var{codec}
|
||||
Force video codec to @var{codec}. Use the @code{copy} special value to
|
||||
tell that the raw codec data must be copied as is.
|
||||
@item -sameq
|
||||
Use same quantizer as source (implies VBR).
|
||||
|
||||
Note that this is NOT SAME QUALITY. Do not use this option unless you know you
|
||||
need it.
|
||||
|
||||
@item -pass @var{n}
|
||||
Select the pass number (1 or 2). It is used to do two-pass
|
||||
video encoding. The statistics of the video are recorded in the first
|
||||
@@ -397,45 +289,46 @@ at the exact requested bitrate.
|
||||
On pass 1, you may just deactivate audio and set output to null,
|
||||
examples for Windows and Unix:
|
||||
@example
|
||||
ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL
|
||||
ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null
|
||||
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y NUL
|
||||
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y /dev/null
|
||||
@end example
|
||||
|
||||
@item -passlogfile @var{prefix} (@emph{global})
|
||||
@item -passlogfile @var{prefix}
|
||||
Set two-pass log file name prefix to @var{prefix}, the default file name
|
||||
prefix is ``ffmpeg2pass''. The complete file name will be
|
||||
@file{PREFIX-N.log}, where N is a number specific to the output
|
||||
stream
|
||||
stream.
|
||||
|
||||
Note that this option is overwritten by a local option of the same name
|
||||
when using @code{-vcodec libx264}. That option maps to the x264 option stats
|
||||
which has a different syntax.
|
||||
@item -newvideo
|
||||
Add a new video stream to the current output stream.
|
||||
|
||||
@item -vlang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current video stream.
|
||||
|
||||
@item -vf @var{filter_graph} (@emph{output})
|
||||
@item -vf @var{filter_graph}
|
||||
@var{filter_graph} is a description of the filter graph to apply to
|
||||
the input video.
|
||||
Use the option "-filters" to show all the available filters (including
|
||||
also sources and sinks). This is an alias for @code{-filter:v}.
|
||||
also sources and sinks).
|
||||
|
||||
@end table
|
||||
|
||||
@section Advanced Video Options
|
||||
|
||||
@table @option
|
||||
@item -pix_fmt[:@var{stream_specifier}] @var{format} (@emph{input/output,per-stream})
|
||||
Set pixel format. Use @code{-pix_fmts} to show all the supported
|
||||
@item -pix_fmt @var{format}
|
||||
Set pixel format. Use 'list' as parameter to show all the supported
|
||||
pixel formats.
|
||||
@item -sws_flags @var{flags} (@emph{input/output})
|
||||
@item -sws_flags @var{flags}
|
||||
Set SwScaler flags.
|
||||
@item -g @var{gop_size}
|
||||
Set the group of pictures size.
|
||||
@item -intra
|
||||
deprecated, use -g 1
|
||||
Use only intra frames.
|
||||
@item -vdt @var{n}
|
||||
Discard threshold.
|
||||
@item -qscale @var{q}
|
||||
Use fixed video quantizer scale (VBR).
|
||||
@item -qmin @var{q}
|
||||
minimum video quantizer scale (VBR)
|
||||
@item -qmax @var{q}
|
||||
@@ -507,8 +400,8 @@ and the following constants are available:
|
||||
@item avgTex
|
||||
@end table
|
||||
|
||||
@item -rc_override[:@var{stream_specifier}] @var{override} (@emph{output,per-stream})
|
||||
Rate control override for specific intervals, formatted as "int,int,int"
|
||||
@item -rc_override @var{override}
|
||||
Rate control override for specific intervals, formated as "int,int,int"
|
||||
list separated with slashes. Two first values are the beginning and
|
||||
end frame numbers, last one is quantizer to use if positive, or quality
|
||||
factor if negative.
|
||||
@@ -636,59 +529,69 @@ Calculate PSNR of compressed frames.
|
||||
Dump video coding statistics to @file{vstats_HHMMSS.log}.
|
||||
@item -vstats_file @var{file}
|
||||
Dump video coding statistics to @var{file}.
|
||||
@item -top[:@var{stream_specifier}] @var{n} (@emph{output,per-stream})
|
||||
@item -top @var{n}
|
||||
top=1/bottom=0/auto=-1 field first
|
||||
@item -dc @var{precision}
|
||||
Intra_dc_precision.
|
||||
@item -vtag @var{fourcc/tag} (@emph{output})
|
||||
Force video tag/fourcc. This is an alias for @code{-tag:v}.
|
||||
@item -qphist (@emph{global})
|
||||
Show QP histogram
|
||||
@item -vtag @var{fourcc/tag}
|
||||
Force video tag/fourcc.
|
||||
@item -qphist
|
||||
Show QP histogram.
|
||||
@item -vbsf @var{bitstream_filter}
|
||||
Deprecated see -bsf
|
||||
@item -force_key_frames[:@var{stream_specifier}] @var{time}[,@var{time}...] (@emph{output,per-stream})
|
||||
Bitstream filters available are "dump_extra", "remove_extra", "noise", "h264_mp4toannexb", "imxdump", "mjpegadump", "mjpeg2jpeg".
|
||||
@example
|
||||
ffmpeg -i h264.mp4 -vcodec copy -vbsf h264_mp4toannexb -an out.h264
|
||||
@end example
|
||||
@item -force_key_frames @var{time}[,@var{time}...]
|
||||
Force key frames at the specified timestamps, more precisely at the first
|
||||
frames after each specified time.
|
||||
This option can be useful to ensure that a seek point is present at a
|
||||
chapter mark or any other designated place in the output file.
|
||||
The timestamps must be specified in ascending order.
|
||||
|
||||
@item -copyinkf[:@var{stream_specifier}] (@emph{output,per-stream})
|
||||
When doing stream copy, copy also non-key frames found at the
|
||||
beginning.
|
||||
@end table
|
||||
|
||||
@section Audio Options
|
||||
|
||||
@table @option
|
||||
@item -aframes @var{number} (@emph{output})
|
||||
Set the number of audio frames to record. This is an alias for @code{-frames:a}.
|
||||
@item -ar[:@var{stream_specifier}] @var{freq} (@emph{input/output,per-stream})
|
||||
Set the audio sampling frequency. For output streams it is set by
|
||||
default to the frequency of the corresponding input stream. For input
|
||||
streams this option only makes sense for audio grabbing devices and raw
|
||||
demuxers and is mapped to the corresponding demuxer options.
|
||||
@item -aq @var{q} (@emph{output})
|
||||
Set the audio quality (codec-specific, VBR). This is an alias for -q:a.
|
||||
@item -ac[:@var{stream_specifier}] @var{channels} (@emph{input/output,per-stream})
|
||||
Set the number of audio channels. For output streams it is set by
|
||||
default to the number of input audio channels. For input streams
|
||||
this option only makes sense for audio grabbing devices and raw demuxers
|
||||
and is mapped to the corresponding demuxer options.
|
||||
@item -an (@emph{output})
|
||||
@item -aframes @var{number}
|
||||
Set the number of audio frames to record.
|
||||
@item -ar @var{freq}
|
||||
Set the audio sampling frequency. there is no default for input streams,
|
||||
for output streams it is set by default to the frequency of the input stream.
|
||||
@item -ab @var{bitrate}
|
||||
Set the audio bitrate in bit/s (default = 64k).
|
||||
@item -aq @var{q}
|
||||
Set the audio quality (codec-specific, VBR).
|
||||
@item -ac @var{channels}
|
||||
Set the number of audio channels. For input streams it is set by
|
||||
default to 1, for output streams it is set by default to the same
|
||||
number of audio channels in input.
|
||||
@item -an
|
||||
Disable audio recording.
|
||||
@item -acodec @var{codec} (@emph{input/output})
|
||||
Set the audio codec. This is an alias for @code{-codec:a}.
|
||||
@item -sample_fmt[:@var{stream_specifier}] @var{sample_fmt} (@emph{output,per-stream})
|
||||
Set the audio sample format. Use @code{-sample_fmts} to get a list
|
||||
of supported sample formats.
|
||||
@item -acodec @var{codec}
|
||||
Force audio codec to @var{codec}. Use the @code{copy} special value to
|
||||
specify that the raw codec data must be copied as is.
|
||||
@item -newaudio
|
||||
Add a new audio track to the output file. If you want to specify parameters,
|
||||
do so before @code{-newaudio} (@code{-acodec}, @code{-ab}, etc..).
|
||||
|
||||
Mapping will be done automatically, if the number of output streams is equal to
|
||||
the number of input streams, else it will pick the first one that matches. You
|
||||
can override the mapping using @code{-map} as usual.
|
||||
|
||||
Example:
|
||||
@example
|
||||
ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio
|
||||
@end example
|
||||
@item -alang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current audio stream.
|
||||
@end table
|
||||
|
||||
@section Advanced Audio options:
|
||||
|
||||
@table @option
|
||||
@item -atag @var{fourcc/tag} (@emph{output})
|
||||
Force audio tag/fourcc. This is an alias for @code{-tag:a}.
|
||||
@item -atag @var{fourcc/tag}
|
||||
Force audio tag/fourcc.
|
||||
@item -audio_service_type @var{type}
|
||||
Set the type of service that the audio stream contains.
|
||||
@table @option
|
||||
@@ -712,155 +615,91 @@ Voice Over
|
||||
Karaoke
|
||||
@end table
|
||||
@item -absf @var{bitstream_filter}
|
||||
Deprecated, see -bsf
|
||||
Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
|
||||
@end table
|
||||
|
||||
@section Subtitle options:
|
||||
|
||||
@table @option
|
||||
@item -scodec @var{codec}
|
||||
Force subtitle codec ('copy' to copy stream).
|
||||
@item -newsubtitle
|
||||
Add a new subtitle stream to the current output stream.
|
||||
@item -slang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current subtitle stream.
|
||||
@item -scodec @var{codec} (@emph{input/output})
|
||||
Set the subtitle codec. This is an alias for @code{-codec:s}.
|
||||
@item -sn (@emph{output})
|
||||
@item -sn
|
||||
Disable subtitle recording.
|
||||
@item -sbsf @var{bitstream_filter}
|
||||
Deprecated, see -bsf
|
||||
Bitstream filters available are "mov2textsub", "text2movsub".
|
||||
@example
|
||||
ffmpeg -i file.mov -an -vn -sbsf mov2textsub -scodec copy -f rawvideo sub.txt
|
||||
@end example
|
||||
@end table
|
||||
|
||||
@section Audio/Video grab options
|
||||
|
||||
@table @option
|
||||
@item -isync (@emph{global})
|
||||
@item -vc @var{channel}
|
||||
Set video grab channel (DV1394 only).
|
||||
@item -tvstd @var{standard}
|
||||
Set television standard (NTSC, PAL (SECAM)).
|
||||
@item -isync
|
||||
Synchronize read on input.
|
||||
@end table
|
||||
|
||||
@section Advanced options
|
||||
|
||||
@table @option
|
||||
@item -map [-]@var{input_file_id}[:@var{stream_specifier}][,@var{sync_file_id}[:@var{stream_specifier}]] (@emph{output})
|
||||
@item -map @var{input_file_id}.@var{input_stream_id}[:@var{sync_file_id}.@var{sync_stream_id}]
|
||||
|
||||
Designate one or more input streams as a source for the output file. Each input
|
||||
Designate an input stream as a source for the output file. Each input
|
||||
stream is identified by the input file index @var{input_file_id} and
|
||||
the input stream index @var{input_stream_id} within the input
|
||||
file. Both indices start at 0. If specified,
|
||||
@var{sync_file_id}:@var{stream_specifier} sets which input stream
|
||||
file. Both indexes start at 0. If specified,
|
||||
@var{sync_file_id}.@var{sync_stream_id} sets which input stream
|
||||
is used as a presentation sync reference.
|
||||
|
||||
The first @code{-map} option on the command line specifies the
|
||||
The @code{-map} options must be specified just after the output file.
|
||||
If any @code{-map} options are used, the number of @code{-map} options
|
||||
on the command line must match the number of streams in the output
|
||||
file. The first @code{-map} option on the command line specifies the
|
||||
source for output stream 0, the second @code{-map} option specifies
|
||||
the source for output stream 1, etc.
|
||||
|
||||
A @code{-} character before the stream identifier creates a "negative" mapping.
|
||||
It disables matching streams from already created mappings.
|
||||
|
||||
For example, to map ALL streams from the first input file to output
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0 output
|
||||
@end example
|
||||
|
||||
For example, if you have two audio streams in the first input file,
|
||||
these streams are identified by "0:0" and "0:1". You can use
|
||||
@code{-map} to select which streams to place in an output file. For
|
||||
these streams are identified by "0.0" and "0.1". You can use
|
||||
@code{-map} to select which stream to place in an output file. For
|
||||
example:
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0:1 out.wav
|
||||
ffmpeg -i INPUT out.wav -map 0.1
|
||||
@end example
|
||||
will map the input stream in @file{INPUT} identified by "0:1" to
|
||||
will map the input stream in @file{INPUT} identified by "0.1" to
|
||||
the (single) output stream in @file{out.wav}.
|
||||
|
||||
For example, to select the stream with index 2 from input file
|
||||
@file{a.mov} (specified by the identifier "0:2"), and stream with
|
||||
index 6 from input @file{b.mov} (specified by the identifier "1:6"),
|
||||
@file{a.mov} (specified by the identifier "0.2"), and stream with
|
||||
index 6 from input @file{b.mov} (specified by the identifier "1.6"),
|
||||
and copy them to the output file @file{out.mov}:
|
||||
@example
|
||||
ffmpeg -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov
|
||||
ffmpeg -i a.mov -i b.mov -vcodec copy -acodec copy out.mov -map 0.2 -map 1.6
|
||||
@end example
|
||||
|
||||
To select all video and the third audio stream from an input file:
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0:v -map 0:a:2 OUTPUT
|
||||
@end example
|
||||
To add more streams to the output file, you can use the
|
||||
@code{-newaudio}, @code{-newvideo}, @code{-newsubtitle} options.
|
||||
|
||||
To map all the streams except the second audio, use negative mappings
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0 -map -0:a:1 OUTPUT
|
||||
@end example
|
||||
@item -map_meta_data @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
|
||||
Deprecated, use @var{-map_metadata} instead.
|
||||
|
||||
Note that using this option disables the default mappings for this output file.
|
||||
@item -map_metadata @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
|
||||
Set metadata information of @var{outfile} from @var{infile}. Note that those
|
||||
are file indices (zero-based), not filenames.
|
||||
Optional @var{metadata} parameters specify, which metadata to copy - (g)lobal
|
||||
(i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter or
|
||||
per-(p)rogram. All metadata specifiers other than global must be followed by the
|
||||
stream/chapter/program number. If metadata specifier is omitted, it defaults to
|
||||
global.
|
||||
|
||||
@item -map_channel [@var{input_file_id}.@var{stream_specifier}.@var{channel_id}|-1][:@var{output_file_id}.@var{stream_specifier}]
|
||||
Map an audio channel from a given input to an output. If
|
||||
@var{output_file_id}.@var{stream_specifier} are not set, the audio channel will
|
||||
be mapped on all the audio streams.
|
||||
|
||||
Using "-1" instead of
|
||||
@var{input_file_id}.@var{stream_specifier}.@var{channel_id} will map a muted
|
||||
channel.
|
||||
|
||||
For example, assuming @var{INPUT} is a stereo audio file, you can switch the
|
||||
two audio channels with the following command:
|
||||
@example
|
||||
ffmpeg -i INPUT -map_channel 0.0.1 -map_channel 0.0.0 OUTPUT
|
||||
@end example
|
||||
|
||||
If you want to mute the first channel and keep the second:
|
||||
@example
|
||||
ffmpeg -i INPUT -map_channel -1 -map_channel 0.0.1 OUTPUT
|
||||
@end example
|
||||
|
||||
The order of the "-map_channel" option specifies the order of the channels in
|
||||
the output stream. The output channel layout is guessed from the number of
|
||||
channels mapped (mono if one "-map_channel", stereo if two, etc.). Using "-ac"
|
||||
in combination of "-map_channel" makes the channel gain levels to be updated if
|
||||
channel layouts don't match (for instance two "-map_channel" options and "-ac
|
||||
6").
|
||||
|
||||
You can also extract each channel of an @var{INPUT} to specific outputs; the
|
||||
following command extract each channel of the audio stream (file 0, stream 0)
|
||||
to the respective @var{OUTPUT_CH0} and @var{OUTPUT_CH1}:
|
||||
@example
|
||||
ffmpeg -i INPUT -map_channel 0.0.0 OUTPUT_CH0 -map_channel 0.0.1 OUTPUT_CH1
|
||||
@end example
|
||||
|
||||
The following example split the channels of a stereo input into streams:
|
||||
|
||||
@example
|
||||
ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -y out.ogg
|
||||
@end example
|
||||
|
||||
Note that currently each output stream can only contain channels from a single
|
||||
input stream; you can't for example use "-map_channel" to pick multiple input
|
||||
audio channels contained in different streams (from the same or different files)
|
||||
and merge them into a single output stream. It is therefore not currently
|
||||
possible, for example, to turn two separate mono streams into a single stereo
|
||||
stream. However spliting a stereo stream into two single channel mono streams
|
||||
is possible.
|
||||
|
||||
@item -map_metadata[:@var{metadata_spec_out}] @var{infile}[:@var{metadata_spec_in}] (@emph{output,per-metadata})
|
||||
Set metadata information of the next output file from @var{infile}. Note that
|
||||
those are file indices (zero-based), not filenames.
|
||||
Optional @var{metadata_spec_in/out} parameters specify, which metadata to copy.
|
||||
A metadata specifier can have the following forms:
|
||||
@table @option
|
||||
@item @var{g}
|
||||
global metadata, i.e. metadata that applies to the whole file
|
||||
|
||||
@item @var{s}[:@var{stream_spec}]
|
||||
per-stream metadata. @var{stream_spec} is a stream specifier as described
|
||||
in the @ref{Stream specifiers} chapter. In an input metadata specifier, the first
|
||||
matching stream is copied from. In an output metadata specifier, all matching
|
||||
streams are copied to.
|
||||
|
||||
@item @var{c}:@var{chapter_index}
|
||||
per-chapter metadata. @var{chapter_index} is the zero-based chapter index.
|
||||
|
||||
@item @var{p}:@var{program_index}
|
||||
per-program metadata. @var{program_index} is the zero-based program index.
|
||||
@end table
|
||||
If metadata specifier is omitted, it defaults to global.
|
||||
|
||||
By default, global metadata is copied from the first input file,
|
||||
By default, global metadata is copied from the first input file to all output files,
|
||||
per-stream and per-chapter metadata is copied along with streams/chapters. These
|
||||
default mappings are disabled by creating any mapping of the relevant type. A negative
|
||||
file index can be used to create a dummy mapping that just disables automatic copying.
|
||||
@@ -868,21 +707,12 @@ file index can be used to create a dummy mapping that just disables automatic co
|
||||
For example to copy metadata from the first stream of the input file to global metadata
|
||||
of the output file:
|
||||
@example
|
||||
ffmpeg -i in.ogg -map_metadata 0:s:0 out.mp3
|
||||
ffmpeg -i in.ogg -map_metadata 0:0,s0 out.mp3
|
||||
@end example
|
||||
|
||||
To do the reverse, i.e. copy global metadata to all audio streams:
|
||||
@example
|
||||
ffmpeg -i in.mkv -map_metadata:s:a 0:g out.mkv
|
||||
@end example
|
||||
Note that simple @code{0} would work as well in this example, since global
|
||||
metadata is assumed by default.
|
||||
|
||||
@item -map_chapters @var{input_file_index} (@emph{output})
|
||||
Copy chapters from input file with index @var{input_file_index} to the next
|
||||
output file. If no chapter mapping is specified, then chapters are copied from
|
||||
the first input file with at least one chapter. Use a negative file index to
|
||||
disable any chapter copying.
|
||||
@item -map_chapters @var{outfile}:@var{infile}
|
||||
Copy chapters from @var{infile} to @var{outfile}. If no chapter mapping is specified,
|
||||
then chapters are copied from the first input file with at least one chapter to all
|
||||
output files. Use a negative file index to disable any chapter copying.
|
||||
@item -debug @var{category}
|
||||
Print specific debug info.
|
||||
@var{category} is a number or a string containing one of the following values:
|
||||
@@ -916,44 +746,42 @@ visualize block types
|
||||
@item vis_qp
|
||||
visualize quantization parameter (QP), lower QP are tinted greener
|
||||
@end table
|
||||
@item -benchmark (@emph{global})
|
||||
@item -benchmark
|
||||
Show benchmarking information at the end of an encode.
|
||||
Shows CPU time used and maximum memory consumption.
|
||||
Maximum memory consumption is not supported on all systems,
|
||||
it will usually display as 0 if not supported.
|
||||
@item -timelimit @var{duration} (@emph{global})
|
||||
Exit after ffmpeg has been running for @var{duration} seconds.
|
||||
@item -dump (@emph{global})
|
||||
Dump each input packet to stderr.
|
||||
@item -hex (@emph{global})
|
||||
@item -dump
|
||||
Dump each input packet.
|
||||
@item -hex
|
||||
When dumping packets, also dump the payload.
|
||||
@item -bitexact
|
||||
Only use bit exact algorithms (for codec testing).
|
||||
@item -ps @var{size}
|
||||
Set RTP payload size in bytes.
|
||||
@item -re (@emph{input})
|
||||
@item -re
|
||||
Read input at native frame rate. Mainly used to simulate a grab device.
|
||||
@item -loop_input
|
||||
Loop over the input stream. Currently it works only for image
|
||||
streams. This option is used for automatic FFserver testing.
|
||||
This option is deprecated, use -loop 1.
|
||||
@item -loop_output @var{number_of_times}
|
||||
Repeatedly loop output for formats that support looping such as animated GIF
|
||||
(0 will loop the output infinitely).
|
||||
This option is deprecated, use -loop.
|
||||
@item -threads @var{count}
|
||||
Thread count.
|
||||
@item -vsync @var{parameter}
|
||||
Video sync method.
|
||||
|
||||
@table @option
|
||||
@item 0, passthrough
|
||||
@item 0
|
||||
Each frame is passed with its timestamp from the demuxer to the muxer.
|
||||
@item 1, cfr
|
||||
@item 1
|
||||
Frames will be duplicated and dropped to achieve exactly the requested
|
||||
constant framerate.
|
||||
@item 2, vfr
|
||||
@item 2
|
||||
Frames are passed through with their timestamp or dropped so as to
|
||||
prevent 2 frames from having the same timestamp.
|
||||
@item -1, auto
|
||||
@item -1
|
||||
Chooses between 1 and 2 depending on muxer capabilities. This is the
|
||||
default method.
|
||||
@end table
|
||||
@@ -975,11 +803,11 @@ Copy input stream time base from input to output when stream copying.
|
||||
Finish encoding when the shortest input stream ends.
|
||||
@item -dts_delta_threshold
|
||||
Timestamp discontinuity delta threshold.
|
||||
@item -muxdelay @var{seconds} (@emph{input})
|
||||
@item -muxdelay @var{seconds}
|
||||
Set the maximum demux-decode delay.
|
||||
@item -muxpreload @var{seconds} (@emph{input})
|
||||
@item -muxpreload @var{seconds}
|
||||
Set the initial demux-decode delay.
|
||||
@item -streamid @var{output-stream-index}:@var{new-value} (@emph{output})
|
||||
@item -streamid @var{output-stream-index}:@var{new-value}
|
||||
Assign a new stream-id value to an output stream. This option should be
|
||||
specified prior to the output filename to which it applies.
|
||||
For the situation where multiple output files exist, a streamid
|
||||
@@ -990,35 +818,15 @@ an output mpegts file:
|
||||
@example
|
||||
ffmpeg -i infile -streamid 0:33 -streamid 1:36 out.ts
|
||||
@end example
|
||||
|
||||
@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream})
|
||||
Set bitstream filters for matching streams. @var{bistream_filters} is
|
||||
a comma-separated list of bitstream filters. Use the @code{-bsfs} option
|
||||
to get the list of bitstream filters.
|
||||
@example
|
||||
ffmpeg -i h264.mp4 -c:v copy -vbsf h264_mp4toannexb -an out.h264
|
||||
@end example
|
||||
@example
|
||||
ffmpeg -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt
|
||||
@end example
|
||||
|
||||
@item -tag[:@var{stream_specifier}] @var{codec_tag} (@emph{per-stream})
|
||||
Force a tag/fourcc for matching streams.
|
||||
|
||||
@item -timecode @var{hh}:@var{mm}:@var{ss}SEP@var{ff}
|
||||
Specify Timecode for writing. @var{SEP} is ':' for non drop timecode and ';'
|
||||
(or '.') for drop.
|
||||
@example
|
||||
ffmpeg -i input.mpg -timecode 01:02:03.04 -r 30000/1001 -s ntsc output.mpg
|
||||
@end example
|
||||
@end table
|
||||
|
||||
@section Preset files
|
||||
|
||||
A preset file contains a sequence of @var{option}=@var{value} pairs,
|
||||
one for each line, specifying a sequence of options which would be
|
||||
awkward to specify on the command line. Lines starting with the hash
|
||||
('#') character are ignored and are used to provide comments. Check
|
||||
the @file{presets} directory in the FFmpeg source tree for examples.
|
||||
the @file{ffpresets} directory in the FFmpeg source tree for examples.
|
||||
|
||||
Preset files are specified with the @code{vpre}, @code{apre},
|
||||
@code{spre}, and @code{fpre} options. The @code{fpre} option takes the
|
||||
@@ -1045,7 +853,7 @@ directories, where @var{codec_name} is the name of the codec to which
|
||||
the preset file options will be applied. For example, if you select
|
||||
the video codec with @code{-vcodec libx264} and use @code{-vpre max},
|
||||
then it will search for the file @file{libx264-max.ffpreset}.
|
||||
@c man end OPTIONS
|
||||
@c man end
|
||||
|
||||
@chapter Tips
|
||||
@c man begin TIPS
|
||||
@@ -1058,7 +866,7 @@ the Linux player does not seem to be very fast, so it can miss
|
||||
frames. An example is:
|
||||
|
||||
@example
|
||||
ffmpeg -g 3 -r 3 -t 10 -b:v 50k -s qcif -f rv10 /tmp/b.rm
|
||||
ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
|
||||
@end example
|
||||
|
||||
@item
|
||||
@@ -1085,27 +893,17 @@ To have a constant quality (but a variable bitrate), use the option
|
||||
'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
|
||||
quality).
|
||||
|
||||
@item
|
||||
When converting video files, you can use the '-sameq' option which
|
||||
uses the same quality factor in the encoder as in the decoder.
|
||||
It allows almost lossless encoding.
|
||||
|
||||
@end itemize
|
||||
@c man end TIPS
|
||||
|
||||
@chapter Examples
|
||||
@c man begin EXAMPLES
|
||||
|
||||
@section Preset files
|
||||
|
||||
A preset file contains a sequence of @var{option=value} pairs, one for
|
||||
each line, specifying a sequence of options which can be specified also on
|
||||
the command line. Lines starting with the hash ('#') character are ignored and
|
||||
are used to provide comments. Empty lines are also ignored. Check the
|
||||
@file{presets} directory in the FFmpeg source tree for examples.
|
||||
|
||||
Preset files are specified with the @code{pre} option, this option takes a
|
||||
preset name as input. FFmpeg searches for a file named @var{preset_name}.avpreset in
|
||||
the directories @file{$AVCONV_DATADIR} (if set), and @file{$HOME/.ffmpeg}, and in
|
||||
the data directory defined at configuration time (usually @file{$PREFIX/share/ffmpeg})
|
||||
in that order. For example, if the argument is @code{libx264-max}, it will
|
||||
search for the file @file{libx264-max.avpreset}.
|
||||
|
||||
@section Video and Audio grabbing
|
||||
|
||||
If you specify the input format and device then ffmpeg can grab video
|
||||
@@ -1115,14 +913,9 @@ and audio directly.
|
||||
ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
|
||||
@end example
|
||||
|
||||
Or with an ALSA audio source (mono input, card id 1) instead of OSS:
|
||||
@example
|
||||
ffmpeg -f alsa -ac 1 -i hw:1 -f video4linux2 -i /dev/video0 /tmp/out.mpg
|
||||
@end example
|
||||
|
||||
Note that you must activate the right video source and channel before
|
||||
launching ffmpeg with any TV viewer such as
|
||||
@uref{http://linux.bytesex.org/xawtv/, xawtv} by Gerd Knorr. You also
|
||||
launching ffmpeg with any TV viewer such as xawtv
|
||||
(@url{http://linux.bytesex.org/xawtv/}) by Gerd Knorr. You also
|
||||
have to set the audio recording levels correctly with a
|
||||
standard mixer.
|
||||
|
||||
@@ -1210,7 +1003,7 @@ You can encode to several formats at the same time and define a
|
||||
mapping from input stream to output streams:
|
||||
|
||||
@example
|
||||
ffmpeg -i /tmp/a.wav -map 0:a -b:a 64k /tmp/a.mp2 -map 0:a -b:a 128k /tmp/b.mp2
|
||||
ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0
|
||||
@end example
|
||||
|
||||
Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
|
||||
@@ -1221,7 +1014,7 @@ stream, in the order of the definition of output streams.
|
||||
You can transcode decrypted VOBs:
|
||||
|
||||
@example
|
||||
ffmpeg -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi
|
||||
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec libmp3lame -ab 128k snatch.avi
|
||||
@end example
|
||||
|
||||
This is a typical DVD ripping example; the input is a VOB file, the
|
||||
@@ -1265,11 +1058,16 @@ only formats accepting a normal integer are suitable.
|
||||
You can put many streams of the same type in the output:
|
||||
|
||||
@example
|
||||
ffmpeg -i test1.avi -i test2.avi -map 0.3 -map 0.2 -map 0.1 -map 0.0 -c copy test12.nut
|
||||
ffmpeg -i test1.avi -i test2.avi -vcodec copy -acodec copy -vcodec copy -acodec copy test12.avi -newvideo -newaudio
|
||||
@end example
|
||||
|
||||
The resulting output file @file{test12.avi} will contain first four streams from
|
||||
the input file in reverse order.
|
||||
In addition to the first video and audio streams, the resulting
|
||||
output file @file{test12.avi} will contain the second video
|
||||
and the second audio stream found in the input streams list.
|
||||
|
||||
The @code{-newvideo}, @code{-newaudio} and @code{-newsubtitle}
|
||||
options have to be specified immediately after the name of the output
|
||||
file to which you want to add them.
|
||||
|
||||
@end itemize
|
||||
@c man end EXAMPLES
|
||||
@@ -1296,7 +1094,7 @@ ffplay(1), ffprobe(1), ffserver(1) and the FFmpeg HTML documentation
|
||||
@c man end
|
||||
|
||||
@c man begin AUTHORS
|
||||
See git history
|
||||
The FFmpeg developers
|
||||
@c man end
|
||||
|
||||
@end ignore
|
||||
|
@@ -1,47 +0,0 @@
|
||||
:
|
||||
ffmpeg.c : libav*
|
||||
======== : ======
|
||||
:
|
||||
:
|
||||
--------------------------------:---> AVStream...
|
||||
InputStream input_streams[] / :
|
||||
/ :
|
||||
InputFile input_files[] +==========================+ / ^ :
|
||||
------> 0 | : st ---:-----------:--/ : :
|
||||
^ +------+-----------+-----+ / +--------------------------+ : :
|
||||
: | :ist_index--:-----:---------/ 1 | : st : | : :
|
||||
: +------+-----------+-----+ +==========================+ : :
|
||||
nb_input_files : | :ist_index--:-----:------------------> 2 | : st : | : :
|
||||
: +------+-----------+-----+ +--------------------------+ : nb_input_streams :
|
||||
: | :ist_index : | 3 | ... | : :
|
||||
v +------+-----------+-----+ +--------------------------+ : :
|
||||
--> 4 | | : :
|
||||
| +--------------------------+ : :
|
||||
| 5 | | : :
|
||||
| +==========================+ v :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
--------- --------------------------------:---> AVStream...
|
||||
\ / :
|
||||
OutputStream output_streams[] / :
|
||||
\ / :
|
||||
+======\======================/======+ ^ :
|
||||
------> 0 | : source_index : st-:--- | : :
|
||||
OuputFile output_files[] / +------------------------------------+ : :
|
||||
/ 1 | : : : | : :
|
||||
^ +------+------------+-----+ / +------------------------------------+ : :
|
||||
: | : ost_index -:-----:------/ 2 | : : : | : :
|
||||
nb_output_files : +------+------------+-----+ +====================================+ : :
|
||||
: | : ost_index -:-----|-----------------> 3 | : : : | : :
|
||||
: +------+------------+-----+ +------------------------------------+ : nb_output_streams :
|
||||
: | : : | 4 | | : :
|
||||
: +------+------------+-----+ +------------------------------------+ : :
|
||||
: | : : | 5 | | : :
|
||||
v +------+------------+-----+ +------------------------------------+ : :
|
||||
6 | | : :
|
||||
+------------------------------------+ : :
|
||||
7 | | : :
|
||||
+====================================+ v :
|
||||
:
|
@@ -28,7 +28,7 @@ various FFmpeg APIs.
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include avtools-common-opts.texi
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -38,9 +38,8 @@ Force displayed width.
|
||||
@item -y @var{height}
|
||||
Force displayed height.
|
||||
@item -s @var{size}
|
||||
Set frame size (WxH or abbreviation), needed for videos which do
|
||||
not contain a header with the frame size like raw YUV. This option
|
||||
has been deprecated in favor of private options, try -video_size.
|
||||
Set frame size (WxH or abbreviation), needed for videos which don't
|
||||
contain a header with the frame size like raw YUV.
|
||||
@item -an
|
||||
Disable audio.
|
||||
@item -vn
|
||||
@@ -91,7 +90,6 @@ Read @var{input_file}.
|
||||
@table @option
|
||||
@item -pix_fmt @var{format}
|
||||
Set pixel format.
|
||||
This option has been deprecated in favor of private options, try -pixel_format.
|
||||
@item -stats
|
||||
Show the stream duration, the codec parameters, the current position in
|
||||
the stream and the audio/video synchronisation drift.
|
||||
@@ -134,8 +132,6 @@ Exit when video is done playing.
|
||||
Exit if any key is pressed.
|
||||
@item -exitonmousedown
|
||||
Exit if any mouse button is pressed.
|
||||
@item -codec:@var{stream_type}
|
||||
Force a specific decoder implementation
|
||||
@end table
|
||||
|
||||
@section While playing
|
||||
@@ -168,9 +164,6 @@ Seek backward/forward 10 seconds.
|
||||
@item down/up
|
||||
Seek backward/forward 1 minute.
|
||||
|
||||
@item page down/page up
|
||||
Seek backward/forward 10 minutes.
|
||||
|
||||
@item mouse click
|
||||
Seek to percentage in file corresponding to fraction of width.
|
||||
|
||||
|
219
doc/ffprobe.texi
219
doc/ffprobe.texi
@@ -42,18 +42,25 @@ for specifying which information to display, and for setting how
|
||||
ffprobe will show it.
|
||||
|
||||
ffprobe output is designed to be easily parsable by a textual filter,
|
||||
and consists of one or more sections of a form defined by the selected
|
||||
writer, which is specified by the @option{print_format} option.
|
||||
and consists of one or more sections of the form:
|
||||
@example
|
||||
[SECTION]
|
||||
key1=val1
|
||||
...
|
||||
keyN=valN
|
||||
[/SECTION]
|
||||
@end example
|
||||
|
||||
Metadata tags stored in the container or in the streams are recognized
|
||||
and printed in the corresponding "FORMAT" or "STREAM" section.
|
||||
and printed in the corresponding "FORMAT" or "STREAM" section, and
|
||||
are prefixed by the string "TAG:".
|
||||
|
||||
@c man end
|
||||
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include avtools-common-opts.texi
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -80,25 +87,6 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
|
||||
Prettify the format of the displayed values, it corresponds to the
|
||||
options "-unit -prefix -byte_binary_prefix -sexagesimal".
|
||||
|
||||
@item -print_format @var{writer_name}[=@var{writer_options}]
|
||||
Set the output printing format.
|
||||
|
||||
@var{writer_name} specifies the name of the writer, and
|
||||
@var{writer_options} specifies the options to be passed to the writer.
|
||||
|
||||
For example for printing the output in JSON format, specify:
|
||||
@example
|
||||
-print_format json
|
||||
@end example
|
||||
|
||||
For more details on the available output printing formats, see the
|
||||
Writers section below.
|
||||
|
||||
@item -show_error
|
||||
Show information about the error found when trying to probe the input.
|
||||
|
||||
The error information is printed within a section with name "ERROR".
|
||||
|
||||
@item -show_format
|
||||
Show information about the container format of the input multimedia
|
||||
stream.
|
||||
@@ -113,13 +101,6 @@ stream.
|
||||
The information for each single packet is printed within a dedicated
|
||||
section with name "PACKET".
|
||||
|
||||
@item -show_frames
|
||||
Show information about each frame contained in the input multimedia
|
||||
stream.
|
||||
|
||||
The information for each single frame is printed within a dedicated
|
||||
section with name "FRAME".
|
||||
|
||||
@item -show_streams
|
||||
Show information about each media stream contained in the input
|
||||
multimedia stream.
|
||||
@@ -127,190 +108,12 @@ multimedia stream.
|
||||
Each media stream information is printed within a dedicated section
|
||||
with name "STREAM".
|
||||
|
||||
@item -show_private_data, -private
|
||||
Show private data, that is data depending on the format of the
|
||||
particular shown element.
|
||||
This option is enabled by default, but you may need to disable it
|
||||
for specific uses, for example when creating XSD-compliant XML output.
|
||||
|
||||
@item -show_program_version
|
||||
Show information related to program version.
|
||||
|
||||
Version information is printed within a section with name
|
||||
"PROGRAM_VERSION".
|
||||
|
||||
@item -show_library_versions
|
||||
Show information related to library versions.
|
||||
|
||||
Version information for each library is printed within a section with
|
||||
name "LIBRARY_VERSION".
|
||||
|
||||
@item -show_versions
|
||||
Show information related to program and library versions. This is the
|
||||
equivalent of setting both @option{-show_program_version} and
|
||||
@option{-show_library_versions} options.
|
||||
|
||||
@item -i @var{input_file}
|
||||
Read @var{input_file}.
|
||||
|
||||
@end table
|
||||
@c man end
|
||||
|
||||
@chapter Writers
|
||||
@c man begin WRITERS
|
||||
|
||||
A writer defines the output format adopted by @command{ffprobe}, and will be
|
||||
used for printing all the parts of the output.
|
||||
|
||||
A writer may accept one or more arguments, which specify the options to
|
||||
adopt.
|
||||
|
||||
A description of the currently available writers follows.
|
||||
|
||||
@section default
|
||||
Default format.
|
||||
|
||||
Print each section in the form:
|
||||
@example
|
||||
[SECTION]
|
||||
key1=val1
|
||||
...
|
||||
keyN=valN
|
||||
[/SECTION]
|
||||
@end example
|
||||
|
||||
Metadata tags are printed as a line in the corresponding FORMAT or
|
||||
STREAM section, and are prefixed by the string "TAG:".
|
||||
|
||||
@section compact
|
||||
Compact format.
|
||||
|
||||
Each section is printed on a single line.
|
||||
If no option is specifid, the output has the form:
|
||||
@example
|
||||
section|key1=val1| ... |keyN=valN
|
||||
@end example
|
||||
|
||||
Metadata tags are printed in the corresponding "format" or "stream"
|
||||
section. A metadata tag key, if printed, is prefixed by the string
|
||||
"tag:".
|
||||
|
||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
||||
separated by ":".
|
||||
|
||||
The description of the accepted options follows.
|
||||
|
||||
@table @option
|
||||
|
||||
@item item_sep, s
|
||||
Specify the character to use for separating fields in the output line.
|
||||
It must be a single printable character, it is "|" by default.
|
||||
|
||||
@item nokey, nk
|
||||
If set to 1 specify not to print the key of each field. Its default
|
||||
value is 0.
|
||||
|
||||
@item escape, e
|
||||
Set the escape mode to use, default to "c".
|
||||
|
||||
It can assume one of the following values:
|
||||
@table @option
|
||||
@item c
|
||||
Perform C-like escaping. Strings containing a newline ('\n') or
|
||||
carriage return ('\r'), the escaping character ('\') or the item
|
||||
separator character @var{SEP} are escaped using C-like fashioned
|
||||
escaping, so that a newline is converted to the sequence "\n", a
|
||||
carriage return to "\r", '\' to "\\" and the separator @var{SEP} is
|
||||
converted to "\@var{SEP}".
|
||||
|
||||
@item csv
|
||||
Perform CSV-like escaping, as described in RFC4180. Strings
|
||||
containing a newline ('\n'), a carriage return ('\r'), a double quote
|
||||
('"'), or @var{SEP} are enclosed in double-quotes.
|
||||
|
||||
@item none
|
||||
Perform no escaping.
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@section csv
|
||||
CSV format.
|
||||
|
||||
This writer is equivalent to
|
||||
@code{compact=item_sep=,:nokey=1:escape=csv}.
|
||||
|
||||
@section json
|
||||
JSON based format.
|
||||
|
||||
Each section is printed using JSON notation.
|
||||
|
||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
||||
separated by ":".
|
||||
|
||||
The description of the accepted options follows.
|
||||
|
||||
@table @option
|
||||
|
||||
@item compact, c
|
||||
If set to 1 enable compact output, that is each section will be
|
||||
printed on a single line. Default value is 0.
|
||||
@end table
|
||||
|
||||
For more information about JSON, see @url{http://www.json.org/}.
|
||||
|
||||
@section xml
|
||||
XML based format.
|
||||
|
||||
The XML output is described in the XML schema description file
|
||||
@file{ffprobe.xsd} installed in the FFmpeg datadir.
|
||||
|
||||
Note that the output issued will be compliant to the
|
||||
@file{ffprobe.xsd} schema only when no special global output options
|
||||
(@option{unit}, @option{prefix}, @option{byte_binary_prefix},
|
||||
@option{sexagesimal} etc.) are specified.
|
||||
|
||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
||||
separated by ":".
|
||||
|
||||
The description of the accepted options follows.
|
||||
|
||||
@table @option
|
||||
|
||||
@item fully_qualified, q
|
||||
If set to 1 specify if the output should be fully qualified. Default
|
||||
value is 0.
|
||||
This is required for generating an XML file which can be validated
|
||||
through an XSD file.
|
||||
|
||||
@item xsd_compliant, x
|
||||
If set to 1 perform more checks for ensuring that the output is XSD
|
||||
compliant. Default value is 0.
|
||||
This option automatically sets @option{fully_qualified} to 1.
|
||||
@end table
|
||||
|
||||
For more information about the XML format, see
|
||||
@url{http://www.w3.org/XML/}.
|
||||
|
||||
@chapter Timecode
|
||||
|
||||
@command{ffprobe} supports Timecode extraction:
|
||||
|
||||
@itemize
|
||||
|
||||
@item MPEG1/2 timecode is extracted from the GOP, and is available in the video
|
||||
stream details (@option{-show_streams}, see @var{timecode}).
|
||||
|
||||
@item MOV timecode is extracted from tmcd track, so is available in the tmcd
|
||||
stream metadata (@option{-show_streams}, see @var{TAG:timecode}).
|
||||
|
||||
@item DV and GXF timecodes are available in format metadata
|
||||
(@option{-show_format}, see @var{TAG:timecode}).
|
||||
|
||||
@end itemize
|
||||
|
||||
@c man end WRITERS
|
||||
|
||||
@include decoders.texi
|
||||
@include demuxers.texi
|
||||
@include protocols.texi
|
||||
|
164
doc/ffprobe.xsd
164
doc/ffprobe.xsd
@@ -1,164 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.ffmpeg.org/schema/ffprobe"
|
||||
xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe">
|
||||
|
||||
<xsd:element name="ffprobe" type="ffprobe:ffprobeType"/>
|
||||
|
||||
<xsd:complexType name="ffprobeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="packets" type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="frames" type="ffprobe:framesType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="format" type="ffprobe:formatType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="error" type="ffprobe:errorType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="program_version" type="ffprobe:programVersionType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="library_versions" type="ffprobe:libraryVersionsType" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="packetsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="packet" type="ffprobe:packetType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="framesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="frame" type="ffprobe:frameType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="packetType">
|
||||
<xsd:attribute name="codec_type" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="stream_index" type="xsd:int" use="required" />
|
||||
<xsd:attribute name="pts" type="xsd:long" />
|
||||
<xsd:attribute name="pts_time" type="xsd:float" />
|
||||
<xsd:attribute name="dts" type="xsd:long" />
|
||||
<xsd:attribute name="dts_time" type="xsd:float" />
|
||||
<xsd:attribute name="duration" type="xsd:long" />
|
||||
<xsd:attribute name="duration_time" type="xsd:float" />
|
||||
<xsd:attribute name="size" type="xsd:long" use="required" />
|
||||
<xsd:attribute name="pos" type="xsd:long" />
|
||||
<xsd:attribute name="flags" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="frameType">
|
||||
<xsd:attribute name="media_type" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="key_frame" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="pts" type="xsd:long" />
|
||||
<xsd:attribute name="pts_time" type="xsd:float"/>
|
||||
<xsd:attribute name="pkt_pts" type="xsd:long" />
|
||||
<xsd:attribute name="pkt_pts_time" type="xsd:float"/>
|
||||
<xsd:attribute name="pkt_dts" type="xsd:long" />
|
||||
<xsd:attribute name="pkt_dts_time" type="xsd:float"/>
|
||||
<xsd:attribute name="pkt_pos" type="xsd:long" />
|
||||
|
||||
<!-- audio attributes -->
|
||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="nb_samples" type="xsd:long" />
|
||||
|
||||
<!-- video attributes -->
|
||||
<xsd:attribute name="width" type="xsd:long" />
|
||||
<xsd:attribute name="height" type="xsd:long" />
|
||||
<xsd:attribute name="pix_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="sample_aspect_ratio" type="xsd:string"/>
|
||||
<xsd:attribute name="pict_type" type="xsd:string"/>
|
||||
<xsd:attribute name="coded_picture_number" type="xsd:long" />
|
||||
<xsd:attribute name="display_picture_number" type="xsd:long" />
|
||||
<xsd:attribute name="interlaced_frame" type="xsd:int" />
|
||||
<xsd:attribute name="top_field_first" type="xsd:int" />
|
||||
<xsd:attribute name="repeat_pict" type="xsd:int" />
|
||||
<xsd:attribute name="reference" type="xsd:int" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="streamsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="streamType">
|
||||
<xsd:attribute name="index" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="codec_name" type="xsd:string" />
|
||||
<xsd:attribute name="codec_long_name" type="xsd:string" />
|
||||
<xsd:attribute name="codec_type" type="xsd:string" />
|
||||
<xsd:attribute name="codec_time_base" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
|
||||
|
||||
<!-- video attributes -->
|
||||
<xsd:attribute name="width" type="xsd:int"/>
|
||||
<xsd:attribute name="height" type="xsd:int"/>
|
||||
<xsd:attribute name="has_b_frames" type="xsd:int"/>
|
||||
<xsd:attribute name="sample_aspect_ratio" type="xsd:string"/>
|
||||
<xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
|
||||
<xsd:attribute name="pix_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="level" type="xsd:int"/>
|
||||
<xsd:attribute name="timecode" type="xsd:string"/>
|
||||
|
||||
<!-- audio attributes -->
|
||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="sample_rate" type="xsd:int"/>
|
||||
<xsd:attribute name="channels" type="xsd:int"/>
|
||||
<xsd:attribute name="bits_per_sample" type="xsd:int"/>
|
||||
|
||||
<xsd:attribute name="id" type="xsd:string"/>
|
||||
<xsd:attribute name="r_frame_rate" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="avg_frame_rate" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="time_base" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
||||
<xsd:attribute name="duration" type="xsd:float"/>
|
||||
<xsd:attribute name="nb_frames" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="formatType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
|
||||
<xsd:attribute name="filename" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="format_name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="format_long_name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
||||
<xsd:attribute name="duration" type="xsd:float"/>
|
||||
<xsd:attribute name="size" type="xsd:long"/>
|
||||
<xsd:attribute name="bit_rate" type="xsd:long"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="tagType">
|
||||
<xsd:attribute name="key" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="value" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="errorType">
|
||||
<xsd:attribute name="code" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="string" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="programVersionType">
|
||||
<xsd:attribute name="version" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="copyright" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="build_date" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="build_time" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="compiler_type" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="compiler_version" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="configuration" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="libraryVersionType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="major" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="minor" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="micro" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="version" type="xsd:int" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="libraryVersionsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
@@ -23,7 +23,6 @@ ffserver [options]
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
ffserver is a streaming server for both audio and video. It supports
|
||||
|
||||
several live feeds, streaming from files and time shifting on live feeds
|
||||
(you can seek to positions in the past on each live feed, provided you
|
||||
specify a big enough feed storage in ffserver.conf).
|
||||
@@ -35,7 +34,7 @@ file.
|
||||
|
||||
This documentation covers only the streaming aspects of ffserver /
|
||||
ffmpeg. All questions about parameters for ffmpeg, codec questions,
|
||||
etc. are not covered here. Read @file{ffmpeg.html} for more
|
||||
etc. are not covered here. Read @file{ffmpeg-doc.html} for more
|
||||
information.
|
||||
|
||||
@section How does it work?
|
||||
@@ -111,8 +110,8 @@ As a simple test, just run the following two command lines where INPUTFILE
|
||||
is some file which you can decode with ffmpeg:
|
||||
|
||||
@example
|
||||
ffserver -f doc/ffserver.conf &
|
||||
ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
|
||||
./ffserver -f doc/ffserver.conf &
|
||||
./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
|
||||
@end example
|
||||
|
||||
At this point you should be able to go to your Windows machine and fire up
|
||||
@@ -147,7 +146,7 @@ that only captures in stereo and also requires that one channel be flipped.
|
||||
If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before
|
||||
starting ffmpeg.
|
||||
|
||||
@subsection The audio and video lose sync after a while.
|
||||
@subsection The audio and video loose sync after a while.
|
||||
|
||||
Yes, they do.
|
||||
|
||||
@@ -241,7 +240,7 @@ For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include avtools-common-opts.texi
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -266,7 +265,7 @@ rather than as a daemon.
|
||||
|
||||
@c man begin SEEALSO
|
||||
|
||||
ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffserver.conf}
|
||||
ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffmpeg/doc/ffserver.conf}
|
||||
example and the FFmpeg HTML documentation
|
||||
@c man end
|
||||
|
||||
|
93
doc/fftools-common-opts.texi
Normal file
93
doc/fftools-common-opts.texi
Normal file
@@ -0,0 +1,93 @@
|
||||
All the numerical options, if not specified otherwise, accept in input
|
||||
a string representing a number, which may contain one of the
|
||||
International System number postfixes, for example 'K', 'M', 'G'.
|
||||
If 'i' is appended after the postfix, powers of 2 are used instead of
|
||||
powers of 10. The 'B' postfix multiplies the value for 8, and can be
|
||||
appended after another postfix or used alone. This allows using for
|
||||
example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||
|
||||
Options which do not take arguments are boolean options, and set the
|
||||
corresponding value to true. They can be set to false by prefixing
|
||||
with "no" the option name, for example using "-nofoo" in the
|
||||
commandline will set to false the boolean option with name "foo".
|
||||
|
||||
@section Generic options
|
||||
|
||||
These options are shared amongst the ff* tools.
|
||||
|
||||
@table @option
|
||||
|
||||
@item -L
|
||||
Show license.
|
||||
|
||||
@item -h, -?, -help, --help
|
||||
Show help.
|
||||
|
||||
@item -version
|
||||
Show version.
|
||||
|
||||
@item -formats
|
||||
Show available formats.
|
||||
|
||||
The fields preceding the format names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@end table
|
||||
|
||||
@item -codecs
|
||||
Show available codecs.
|
||||
|
||||
The fields preceding the codec names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@item V/A/S
|
||||
Video/audio/subtitle codec
|
||||
@item S
|
||||
Codec supports slices
|
||||
@item D
|
||||
Codec supports direct rendering
|
||||
@item T
|
||||
Codec can handle input truncated at random locations instead of only at frame boundaries
|
||||
@end table
|
||||
|
||||
@item -bsfs
|
||||
Show available bitstream filters.
|
||||
|
||||
@item -protocols
|
||||
Show available protocols.
|
||||
|
||||
@item -filters
|
||||
Show available libavfilter filters.
|
||||
|
||||
@item -pix_fmts
|
||||
Show available pixel formats.
|
||||
|
||||
@item -loglevel @var{loglevel}
|
||||
Set the logging level used by the library.
|
||||
@var{loglevel} is a number or a string containing one of the following values:
|
||||
@table @samp
|
||||
@item quiet
|
||||
@item panic
|
||||
@item fatal
|
||||
@item error
|
||||
@item warning
|
||||
@item info
|
||||
@item verbose
|
||||
@item debug
|
||||
@end table
|
||||
|
||||
By default the program logs to stderr, if coloring is supported by the
|
||||
terminal, colors are used to mark errors and warnings. Log coloring
|
||||
can be disabled setting the environment variable
|
||||
@env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
|
||||
the environment variable @env{FFMPEG_FORCE_COLOR}.
|
||||
The use of the environment variable @env{NO_COLOR} is deprecated and
|
||||
will be dropped in a following FFmpeg version.
|
||||
|
||||
@end table
|
1646
doc/filters.texi
1646
doc/filters.texi
File diff suppressed because it is too large
Load Diff
510
doc/general.texi
510
doc/general.texi
@@ -9,92 +9,29 @@
|
||||
|
||||
@contents
|
||||
|
||||
@chapter External libraries
|
||||
@chapter external libraries
|
||||
|
||||
FFmpeg can be hooked up with a number of external libraries to add support
|
||||
for more formats. None of them are used by default, their use has to be
|
||||
explicitly requested by passing the appropriate flags to @file{./configure}.
|
||||
|
||||
@section OpenJPEG
|
||||
|
||||
FFmpeg can use the OpenJPEG libraries for encoding/decoding J2K videos. Go to
|
||||
@url{http://www.openjpeg.org/} to get the libraries and follow the installation
|
||||
instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to
|
||||
@file{./configure}.
|
||||
|
||||
|
||||
@section OpenCORE and VisualOn libraries
|
||||
|
||||
Spun off Google Android sources, OpenCore and VisualOn libraries provide
|
||||
encoders for a number of audio codecs.
|
||||
|
||||
@float NOTE
|
||||
OpenCORE and VisualOn libraries are under the Apache License 2.0
|
||||
(see @url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
|
||||
incompatible with the LGPL version 2.1 and GPL version 2. You have to
|
||||
upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
|
||||
GPL components, GPL version 3) to use it.
|
||||
@end float
|
||||
|
||||
@subsection OpenCORE AMR
|
||||
@section OpenCORE AMR
|
||||
|
||||
FFmpeg can make use of the OpenCORE libraries for AMR-NB
|
||||
decoding/encoding and AMR-WB decoding.
|
||||
|
||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
||||
instructions for installing the libraries.
|
||||
Then pass @code{--enable-libopencore-amrnb} and/or
|
||||
@code{--enable-libopencore-amrwb} to configure to enable them.
|
||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for
|
||||
installing the libraries. Then pass @code{--enable-libopencore-amrnb} and/or
|
||||
@code{--enable-libopencore-amrwb} to configure to enable the libraries.
|
||||
|
||||
@subsection VisualOn AAC encoder library
|
||||
|
||||
FFmpeg can make use of the VisualOn AACenc library for AAC encoding.
|
||||
|
||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
||||
instructions for installing the library.
|
||||
Then pass @code{--enable-libvo-aacenc} to configure to enable it.
|
||||
|
||||
@subsection VisualOn AMR-WB encoder library
|
||||
|
||||
FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
|
||||
|
||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
||||
instructions for installing the library.
|
||||
Then pass @code{--enable-libvo-amrwbenc} to configure to enable it.
|
||||
|
||||
@section LAME
|
||||
|
||||
FFmpeg can make use of the LAME library for MP3 encoding.
|
||||
|
||||
Go to @url{http://lame.sourceforge.net/} and follow the
|
||||
instructions for installing the library.
|
||||
Then pass @code{--enable-libmp3lame} to configure to enable it.
|
||||
|
||||
@section libvpx
|
||||
|
||||
FFmpeg can make use of the libvpx library for VP8 encoding.
|
||||
|
||||
Go to @url{http://www.webmproject.org/} and follow the instructions for
|
||||
installing the library. Then pass @code{--enable-libvpx} to configure to
|
||||
enable it.
|
||||
|
||||
@section x264
|
||||
|
||||
FFmpeg can make use of the x264 library for H.264 encoding.
|
||||
|
||||
Go to @url{http://www.videolan.org/developers/x264.html} and follow the
|
||||
instructions for installing the library. Then pass @code{--enable-libx264} to
|
||||
configure to enable it.
|
||||
|
||||
@float NOTE
|
||||
x264 is under the GNU Public License Version 2 or later
|
||||
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for
|
||||
details), you must upgrade FFmpeg's license to GPL in order to use it.
|
||||
@end float
|
||||
Note that OpenCORE is under the Apache License 2.0 (see
|
||||
@url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
|
||||
incompatible with the LGPL version 2.1 and GPL version 2. You have to
|
||||
upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
|
||||
GPL components, GPL version 3) to use it.
|
||||
|
||||
|
||||
|
||||
@chapter Supported File Formats, Codecs or Features
|
||||
@chapter Supported File Formats and Codecs
|
||||
|
||||
You can use the @code{-formats} and @code{-codecs} options to have an exhaustive list.
|
||||
|
||||
@@ -108,15 +45,12 @@ library:
|
||||
@item 4xm @tab @tab X
|
||||
@tab 4X Technologies format, used in some games.
|
||||
@item 8088flex TMV @tab @tab X
|
||||
@item ACT Voice @tab @tab X
|
||||
@tab contains G.729 audio
|
||||
@item Adobe Filmstrip @tab X @tab X
|
||||
@item Audio IFF (AIFF) @tab X @tab X
|
||||
@item American Laser Games MM @tab @tab X
|
||||
@tab Multimedia format used in games like Mad Dog McCree.
|
||||
@item 3GPP AMR @tab X @tab X
|
||||
@item Apple HTTP Live Streaming @tab @tab X
|
||||
@item Artworx Data Format @tab @tab X
|
||||
@item ASF @tab X @tab X
|
||||
@item AVI @tab X @tab X
|
||||
@item AVISynth @tab @tab X
|
||||
@@ -126,17 +60,12 @@ library:
|
||||
@tab Audio and video format used in some games by Beam Software.
|
||||
@item Bethesda Softworks VID @tab @tab X
|
||||
@tab Used in some games from Bethesda Softworks.
|
||||
@item Binary text @tab @tab X
|
||||
@item Bink @tab @tab X
|
||||
@tab Multimedia format used by many games.
|
||||
@item Bitmap Brothers JV @tab @tab X
|
||||
@tab Used in Z and Z95 games.
|
||||
@item Brute Force & Ignorance @tab @tab X
|
||||
@tab Used in the game Flash Traffic: City of Angels.
|
||||
@item BWF @tab X @tab X
|
||||
@item CRI ADX @tab X @tab X
|
||||
@tab Audio-only format used in console video games.
|
||||
@item Discworld II BMV @tab @tab X
|
||||
@item Interplay C93 @tab @tab X
|
||||
@tab Used in the game Cyberia from Interplay.
|
||||
@item Delphine Software International CIN @tab @tab X
|
||||
@@ -172,19 +101,13 @@ library:
|
||||
@item framecrc testing format @tab X @tab
|
||||
@item FunCom ISS @tab @tab X
|
||||
@tab Audio format used in various games from FunCom like The Longest Journey.
|
||||
@item G.723.1 @tab X @tab X
|
||||
@item G.729 BIT @tab X @tab X
|
||||
@item G.729 raw @tab @tab X
|
||||
@item GIF Animation @tab X @tab
|
||||
@item GXF @tab X @tab X
|
||||
@tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
|
||||
playout servers.
|
||||
@item iCEDraw File @tab @tab X
|
||||
@item ICO @tab @tab X
|
||||
@tab Microsoft Windows ICO
|
||||
@item id Quake II CIN video @tab @tab X
|
||||
@item id RoQ @tab X @tab X
|
||||
@tab Used in Quake III, Jedi Knight 2 and other computer games.
|
||||
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||
@item IEC61937 encapsulation @tab X @tab X
|
||||
@item IFF @tab @tab X
|
||||
@tab Interchange File Format
|
||||
@@ -194,11 +117,8 @@ library:
|
||||
@tab A format generated by IndigoVision 8000 video server.
|
||||
@item IVF (On2) @tab X @tab X
|
||||
@tab A format used by libvpx
|
||||
@item LATM @tab X @tab X
|
||||
@item LMLM4 @tab @tab X
|
||||
@tab Used by Linux Media Labs MPEG-4 PCI boards
|
||||
@item LOAS @tab @tab X
|
||||
@tab contains LATM multiplexed AAC audio
|
||||
@item LXF @tab @tab X
|
||||
@tab VR native stream format, used by Leitch/Harris' video servers.
|
||||
@item Matroska @tab X @tab X
|
||||
@@ -307,7 +227,6 @@ library:
|
||||
@item RTP @tab X @tab X
|
||||
@item RTSP @tab X @tab X
|
||||
@item SAP @tab X @tab X
|
||||
@item SBG @tab @tab X
|
||||
@item SDP @tab @tab X
|
||||
@item Sega FILM/CPK @tab @tab X
|
||||
@tab Used in many Sega Saturn console games.
|
||||
@@ -317,9 +236,7 @@ library:
|
||||
@tab Used in Sierra CD-ROM games.
|
||||
@item Smacker @tab @tab X
|
||||
@tab Multimedia format used by many games.
|
||||
@item SMJPEG @tab X @tab X
|
||||
@tab Used in certain Loki game ports.
|
||||
@item Sony OpenMG (OMA) @tab X @tab X
|
||||
@item Sony OpenMG (OMA) @tab @tab X
|
||||
@tab Audio format used in Sony Sonic Stage and Sony Vegas.
|
||||
@item Sony PlayStation STR @tab @tab X
|
||||
@item Sony Wave64 (W64) @tab @tab X
|
||||
@@ -335,18 +252,15 @@ library:
|
||||
@item WAV @tab X @tab X
|
||||
@item WavPack @tab @tab X
|
||||
@item WebM @tab X @tab X
|
||||
@item Windows Televison (WTV) @tab X @tab X
|
||||
@item Windows Televison (WTV) @tab @tab X
|
||||
@item Wing Commander III movie @tab @tab X
|
||||
@tab Multimedia format used in Origin's Wing Commander III computer game.
|
||||
@item Westwood Studios audio @tab @tab X
|
||||
@tab Multimedia format used in Westwood Studios games.
|
||||
@item Westwood Studios VQA @tab @tab X
|
||||
@tab Multimedia format used in Westwood Studios games.
|
||||
@item XMV @tab @tab X
|
||||
@tab Microsoft video container used in Xbox games.
|
||||
@item xWMA @tab @tab X
|
||||
@tab Microsoft audio container used by XAudio 2.
|
||||
@item eXtended BINary text (XBIN) @tab @tab X
|
||||
@item YUV4MPEG pipe @tab X @tab X
|
||||
@item Psygnosis YOP @tab @tab X
|
||||
@end multitable
|
||||
@@ -387,6 +301,7 @@ following image formats are supported:
|
||||
@item PIC @tab @tab X
|
||||
@tab Pictor/PC Paint
|
||||
@item PNG @tab X @tab X
|
||||
@tab 2/4 bpp not supported yet
|
||||
@item PPM @tab X @tab X
|
||||
@tab Portable PixelMap image
|
||||
@item PTX @tab @tab X
|
||||
@@ -399,8 +314,6 @@ following image formats are supported:
|
||||
@tab YUV, JPEG and some extension is not supported yet.
|
||||
@item Truevision Targa @tab X @tab X
|
||||
@tab Targa (.TGA) image format
|
||||
@item XWD @tab X @tab X
|
||||
@tab X Window Dump image format
|
||||
@end multitable
|
||||
|
||||
@code{X} means that encoding (resp. decoding) is supported.
|
||||
@@ -420,11 +333,10 @@ following image formats are supported:
|
||||
@tab Creates video suitable to be played on a commodore 64 (multicolor mode).
|
||||
@item American Laser Games MM @tab @tab X
|
||||
@tab Used in games like Mad Dog McCree.
|
||||
@item AMV Video @tab X @tab X
|
||||
@item AMV Video @tab @tab X
|
||||
@tab Used in Chinese MP3 players.
|
||||
@item ANSI/ASCII art @tab @tab X
|
||||
@item Apple MJPEG-B @tab @tab X
|
||||
@item Apple ProRes @tab X @tab X
|
||||
@item Apple QuickDraw @tab @tab X
|
||||
@tab fourcc: qdrw
|
||||
@item Asus v1 @tab X @tab X
|
||||
@@ -440,8 +352,6 @@ following image formats are supported:
|
||||
@item Autodesk Animator Flic video @tab @tab X
|
||||
@item Autodesk RLE @tab @tab X
|
||||
@tab fourcc: AASC
|
||||
@item Avid 1:1 10-bit RGB Packer @tab X @tab X
|
||||
@tab fourcc: AVrp
|
||||
@item AVS (Audio Video Standard) video @tab @tab X
|
||||
@tab Video encoding used by the Creature Shock game.
|
||||
@item Beam Software VB @tab @tab X
|
||||
@@ -449,7 +359,6 @@ following image formats are supported:
|
||||
@tab Used in some games from Bethesda Softworks.
|
||||
@item Bink Video @tab @tab X
|
||||
@item Bitmap Brothers JV video @tab @tab X
|
||||
@item y41p Brooktree uncompressed 4:1:1 12-bit @tab X @tab X
|
||||
@item Brute Force & Ignorance @tab @tab X
|
||||
@tab Used in the game Flash Traffic: City of Angels.
|
||||
@item C93 video @tab @tab X
|
||||
@@ -462,14 +371,13 @@ following image formats are supported:
|
||||
@tab AVS1-P2, JiZhun profile, encoding through external library libxavs
|
||||
@item Delphine Software International CIN video @tab @tab X
|
||||
@tab Codec used in Delphine Software International games.
|
||||
@item Discworld II BMV Video @tab @tab X
|
||||
@item Cinepak @tab @tab X
|
||||
@item Cirrus Logic AccuPak @tab X @tab X
|
||||
@item Cirrus Logic AccuPak @tab @tab X
|
||||
@tab fourcc: CLJR
|
||||
@item Creative YUV (CYUV) @tab @tab X
|
||||
@item DFA @tab @tab X
|
||||
@tab Codec used in Chronomaster game.
|
||||
@item Dirac @tab E @tab X
|
||||
@item Dirac @tab E @tab E
|
||||
@tab supported through external libdirac/libschroedinger libraries
|
||||
@item Deluxe Paint Animation @tab @tab X
|
||||
@item DNxHD @tab X @tab X
|
||||
@@ -479,7 +387,6 @@ following image formats are supported:
|
||||
@item Duck TrueMotion 2.0 @tab @tab X
|
||||
@tab fourcc: TM20
|
||||
@item DV (Digital Video) @tab X @tab X
|
||||
@item Dxtory capture format @tab @tab X
|
||||
@item Feeble Files/ScummVM DXA @tab @tab X
|
||||
@tab Codec originally used in Feeble Files game.
|
||||
@item Electronic Arts CMV video @tab @tab X
|
||||
@@ -489,12 +396,11 @@ following image formats are supported:
|
||||
@item Electronic Arts TGQ video @tab @tab X
|
||||
@item Electronic Arts TQI video @tab @tab X
|
||||
@item Escape 124 @tab @tab X
|
||||
@item Escape 130 @tab @tab X
|
||||
@item FFmpeg video codec #1 @tab X @tab X
|
||||
@tab experimental lossless codec (fourcc: FFV1)
|
||||
@item Flash Screen Video v1 @tab X @tab X
|
||||
@tab fourcc: FSV1
|
||||
@item Flash Screen Video v2 @tab X @tab X
|
||||
@item Flash Screen Video v2 @tab X
|
||||
@item Flash Video (FLV) @tab X @tab X
|
||||
@tab Sorenson H.263 used in Flash
|
||||
@item Fraps @tab @tab X
|
||||
@@ -513,19 +419,17 @@ following image formats are supported:
|
||||
@item id RoQ video @tab X @tab X
|
||||
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||
@item IFF ILBM @tab @tab X
|
||||
@tab IFF interleaved bitmap
|
||||
@tab IFF interlaved bitmap
|
||||
@item IFF ByteRun1 @tab @tab X
|
||||
@tab IFF run length encoded bitmap
|
||||
@item Intel H.263 @tab @tab X
|
||||
@item Intel Indeo 2 @tab @tab X
|
||||
@item Intel Indeo 3 @tab @tab X
|
||||
@item Intel Indeo 4 @tab @tab X
|
||||
@item Intel Indeo 5 @tab @tab X
|
||||
@item Interplay C93 @tab @tab X
|
||||
@tab Used in the game Cyberia from Interplay.
|
||||
@item Interplay MVE video @tab @tab X
|
||||
@tab Used in Interplay .MVE files.
|
||||
@item J2K @tab X @tab X
|
||||
@item Karl Morton's video codec @tab @tab X
|
||||
@tab Codec used in Worms games.
|
||||
@item Kega Game Video (KGV1) @tab @tab X
|
||||
@@ -549,7 +453,7 @@ following image formats are supported:
|
||||
@item MPEG-1/2 video (VDPAU acceleration) @tab @tab X
|
||||
@item MPEG-2 video @tab X @tab X
|
||||
@item MPEG-4 part 2 @tab X @tab X
|
||||
@tab libxvidcore can be used alternatively for encoding.
|
||||
@ libxvidcore can be used alternatively for encoding.
|
||||
@item MPEG-4 part 2 Microsoft variant version 1 @tab @tab X
|
||||
@item MPEG-4 part 2 Microsoft variant version 2 @tab X @tab X
|
||||
@item MPEG-4 part 2 Microsoft variant version 3 @tab X @tab X
|
||||
@@ -566,8 +470,6 @@ following image formats are supported:
|
||||
@tab fourcc: VP80, encoding supported through external library libvpx
|
||||
@item planar RGB @tab @tab X
|
||||
@tab fourcc: 8BPS
|
||||
@item Prores @tab @tab X
|
||||
@tab fourcc: apch,apcn,apcs,apco
|
||||
@item Q-team QPEG @tab @tab X
|
||||
@tab fourccs: QPEG, Q1.0, Q1.1
|
||||
@item QuickTime 8BPS video @tab @tab X
|
||||
@@ -577,8 +479,8 @@ following image formats are supported:
|
||||
@tab fourcc: 'smc '
|
||||
@item QuickTime video (RPZA) @tab @tab X
|
||||
@tab fourcc: rpza
|
||||
@item R10K AJA Kona 10-bit RGB Codec @tab X @tab X
|
||||
@item R210 Quicktime Uncompressed RGB 10-bit @tab X @tab X
|
||||
@item R10K AJA Kona 10-bit RGB Codec @tab @tab X
|
||||
@item R210 Quicktime Uncompressed RGB 10-bit @tab @tab X
|
||||
@item Raw Video @tab X @tab X
|
||||
@item RealVideo 1.0 @tab X @tab X
|
||||
@item RealVideo 2.0 @tab X @tab X
|
||||
@@ -609,15 +511,10 @@ following image formats are supported:
|
||||
@tab encoding supported through external library libtheora
|
||||
@item Tiertex Limited SEQ video @tab @tab X
|
||||
@tab Codec used in DOS CD-ROM FlashBack game.
|
||||
@item Ut Video @tab @tab X
|
||||
@item v210 QuickTime uncompressed 4:2:2 10-bit @tab X @tab X
|
||||
@item v308 QuickTime uncompressed 4:4:4 @tab X @tab X
|
||||
@item v410 QuickTime uncompressed 4:4:4 10-bit @tab X @tab X
|
||||
@item VBLE Lossless Codec @tab @tab X
|
||||
@item V210 Quicktime Uncompressed 4:2:2 10-bit @tab X @tab X
|
||||
@item VMware Screen Codec / VMware Video @tab @tab X
|
||||
@tab Codec used in videos captured by VMware.
|
||||
@item Westwood Studios VQA (Vector Quantized Animation) video @tab @tab X
|
||||
@item Windows Media Image @tab @tab X
|
||||
@item Windows Media Video 7 @tab X @tab X
|
||||
@item Windows Media Video 8 @tab X @tab X
|
||||
@item Windows Media Video 9 @tab @tab X
|
||||
@@ -630,8 +527,6 @@ following image formats are supported:
|
||||
@item WMV7 @tab X @tab X
|
||||
@item YAMAHA SMAF @tab X @tab X
|
||||
@item Psygnosis YOP Video @tab @tab X
|
||||
@item yuv4 @tab X @tab X
|
||||
@tab libquicktime uncompressed packed 4:2:0
|
||||
@item ZLIB @tab X @tab X
|
||||
@tab part of LCL, encoder experimental
|
||||
@item Zip Motion Blocks Video @tab X @tab X
|
||||
@@ -706,16 +601,15 @@ following image formats are supported:
|
||||
@item Atrac 3 @tab @tab X
|
||||
@item Bink Audio @tab @tab X
|
||||
@tab Used in Bink and Smacker files in many games.
|
||||
@item CELT @tab @tab E
|
||||
@item CELT (Opus) @tab @tab E
|
||||
@tab decoding supported through external library libcelt
|
||||
@item Delphine Software International CIN audio @tab @tab X
|
||||
@tab Codec used in Delphine Software International games.
|
||||
@item Discworld II BMV Audio @tab @tab X
|
||||
@item COOK @tab @tab X
|
||||
@tab All versions except 5.1 are supported.
|
||||
@item DCA (DTS Coherent Acoustics) @tab X @tab X
|
||||
@item DPCM id RoQ @tab X @tab X
|
||||
@tab Used in Quake III, Jedi Knight 2 and other computer games.
|
||||
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||
@item DPCM Interplay @tab @tab X
|
||||
@tab Used in various Interplay computer games.
|
||||
@item DPCM Sierra Online @tab @tab X
|
||||
@@ -727,8 +621,6 @@ following image formats are supported:
|
||||
@item DV audio @tab @tab X
|
||||
@item Enhanced AC-3 @tab X @tab X
|
||||
@item FLAC (Free Lossless Audio Codec) @tab X @tab IX
|
||||
@item G.723.1 @tab X @tab X
|
||||
@item G.729 @tab @tab X
|
||||
@item GSM @tab E @tab X
|
||||
@tab encoding supported through external library libgsm
|
||||
@item GSM Microsoft variant @tab E @tab X
|
||||
@@ -771,7 +663,7 @@ following image formats are supported:
|
||||
@item PCM unsigned 24-bit little-endian @tab X @tab X
|
||||
@item PCM unsigned 32-bit big-endian @tab X @tab X
|
||||
@item PCM unsigned 32-bit little-endian @tab X @tab X
|
||||
@item PCM Zork @tab @tab X
|
||||
@item PCM Zork @tab X @tab X
|
||||
@item QCELP / PureVoice @tab @tab X
|
||||
@item QDesign Music Codec 2 @tab @tab X
|
||||
@tab There are still some distortions.
|
||||
@@ -791,7 +683,7 @@ following image formats are supported:
|
||||
@tab experimental codec
|
||||
@item Sonic lossless @tab X @tab X
|
||||
@tab experimental codec
|
||||
@item Speex @tab E @tab E
|
||||
@item Speex @tab @tab E
|
||||
@tab supported through external library libspeex
|
||||
@item True Audio (TTA) @tab @tab X
|
||||
@item TrueHD @tab @tab X
|
||||
@@ -857,7 +749,6 @@ performance on systems without hardware floating point support).
|
||||
@item JACK @tab X @tab
|
||||
@item LIBDC1394 @tab X @tab
|
||||
@item OSS @tab X @tab X
|
||||
@item Pulseaudio @tab X @tab
|
||||
@item Video4Linux @tab X @tab
|
||||
@item Video4Linux2 @tab X @tab
|
||||
@item VfW capture @tab X @tab
|
||||
@@ -866,15 +757,342 @@ performance on systems without hardware floating point support).
|
||||
|
||||
@code{X} means that input/output is supported.
|
||||
|
||||
@section Timecode
|
||||
|
||||
@multitable @columnfractions .4 .1 .1
|
||||
@item Codec/format @tab Read @tab Write
|
||||
@item DV @tab X @tab X
|
||||
@item GXF @tab X @tab X
|
||||
@item MOV @tab X @tab
|
||||
@item MPEG1/2 @tab X @tab X
|
||||
@item MXF @tab @tab X
|
||||
@end multitable
|
||||
@chapter Platform Specific information
|
||||
|
||||
@section DOS
|
||||
|
||||
Using a cross-compiler is preferred for various reasons.
|
||||
|
||||
@section OS/2
|
||||
|
||||
For information about compiling FFmpeg on OS/2 see
|
||||
@url{http://www.edm2.com/index.php/FFmpeg}.
|
||||
|
||||
@section Unix-like
|
||||
|
||||
Some parts of FFmpeg cannot be built with version 2.15 of the GNU
|
||||
assembler which is still provided by a few AMD64 distributions. To
|
||||
make sure your compiler really uses the required version of gas
|
||||
after a binutils upgrade, run:
|
||||
|
||||
@example
|
||||
$(gcc -print-prog-name=as) --version
|
||||
@end example
|
||||
|
||||
If not, then you should install a different compiler that has no
|
||||
hard-coded path to gas. In the worst case pass @code{--disable-asm}
|
||||
to configure.
|
||||
|
||||
@subsection BSD
|
||||
|
||||
BSD make will not build FFmpeg, you need to install and use GNU Make
|
||||
(@file{gmake}).
|
||||
|
||||
@subsection (Open)Solaris
|
||||
|
||||
GNU Make is required to build FFmpeg, so you have to invoke (@file{gmake}),
|
||||
standard Solaris Make will not work. When building with a non-c99 front-end
|
||||
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
|
||||
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
|
||||
since the libc is not c99-compliant by default. The probes performed by
|
||||
configure may raise an exception leading to the death of configure itself
|
||||
due to a bug in the system shell. Simply invoke a different shell such as
|
||||
bash directly to work around this:
|
||||
|
||||
@example
|
||||
bash ./configure
|
||||
@end example
|
||||
|
||||
@subsection Darwin (MacOS X, iPhone)
|
||||
|
||||
MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
||||
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
|
||||
assembler functions. Just download the Perl script and put it somewhere
|
||||
in your PATH, FFmpeg's configure will pick it up automatically.
|
||||
|
||||
@section Windows
|
||||
|
||||
To get help and instructions for building FFmpeg under Windows, check out
|
||||
the FFmpeg Windows Help Forum at
|
||||
@url{http://ffmpeg.arrozcru.org/}.
|
||||
|
||||
@subsection Native Windows compilation
|
||||
|
||||
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/}.
|
||||
You can find detailed installation
|
||||
instructions in the download section and the FAQ.
|
||||
|
||||
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
|
||||
packages updated to the latest version. The minimum version for some packages
|
||||
are listed below:
|
||||
|
||||
@itemize
|
||||
@item bash 3.1
|
||||
@item msys-make 3.81-2 (note: not mingw32-make)
|
||||
@item w32api 3.13
|
||||
@item mingw-runtime 3.15
|
||||
@end itemize
|
||||
|
||||
FFmpeg automatically passes @code{-fno-common} to the compiler to work around
|
||||
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
|
||||
|
||||
Notes:
|
||||
|
||||
@itemize
|
||||
|
||||
@item Building natively using MSYS can be sped up by disabling implicit rules
|
||||
in the Makefile by calling @code{make -r} instead of plain @code{make}. This
|
||||
speed up is close to non-existent for normal one-off builds and is only
|
||||
noticeable when running make for a second time (for example in
|
||||
@code{make install}).
|
||||
|
||||
@item In order to compile FFplay, you must have the MinGW development library
|
||||
of SDL. Get it from @url{http://www.libsdl.org}.
|
||||
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
|
||||
the MSYS command line.
|
||||
|
||||
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
||||
you can build libavutil, libavcodec and libavformat as DLLs.
|
||||
|
||||
@end itemize
|
||||
|
||||
@subsection Microsoft Visual C++ compatibility
|
||||
|
||||
As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
|
||||
want to use the libav* libraries in your own applications, you can still
|
||||
compile those applications using MSVC++. But the libav* libraries you link
|
||||
to @emph{must} be built with MinGW. However, you will not be able to debug
|
||||
inside the libav* libraries, since MSVC++ does not recognize the debug
|
||||
symbols generated by GCC.
|
||||
We strongly recommend you to move over from MSVC++ to MinGW tools.
|
||||
|
||||
This description of how to use the FFmpeg libraries with MSVC++ is based on
|
||||
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
|
||||
you might have to modify the procedures slightly.
|
||||
|
||||
@subsubsection Using static libraries
|
||||
|
||||
Assuming you have just built and installed FFmpeg in @file{/usr/local}.
|
||||
|
||||
@enumerate
|
||||
|
||||
@item Create a new console application ("File / New / Project") and then
|
||||
select "Win32 Console Application". On the appropriate page of the
|
||||
Application Wizard, uncheck the "Precompiled headers" option.
|
||||
|
||||
@item Write the source code for your application, or, for testing, just
|
||||
copy the code from an existing sample application into the source file
|
||||
that MSVC++ has already created for you. For example, you can copy
|
||||
@file{libavformat/output-example.c} from the FFmpeg distribution.
|
||||
|
||||
@item Open the "Project / Properties" dialog box. In the "Configuration"
|
||||
combo box, select "All Configurations" so that the changes you make will
|
||||
affect both debug and release builds. In the tree view on the left hand
|
||||
side, select "C/C++ / General", then edit the "Additional Include
|
||||
Directories" setting to contain the path where the FFmpeg includes were
|
||||
installed (i.e. @file{c:\msys\1.0\local\include}).
|
||||
Do not add MinGW's include directory here, or the include files will
|
||||
conflict with MSVC's.
|
||||
|
||||
@item Still in the "Project / Properties" dialog box, select
|
||||
"Linker / General" from the tree view and edit the
|
||||
"Additional Library Directories" setting to contain the @file{lib}
|
||||
directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
|
||||
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
|
||||
and the directory where MinGW's GCC libs are installed
|
||||
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
|
||||
"Linker / Input" from the tree view, and add the files @file{libavformat.a},
|
||||
@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a},
|
||||
@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a})
|
||||
to the end of "Additional Dependencies".
|
||||
|
||||
@item Now, select "C/C++ / Code Generation" from the tree view. Select
|
||||
"Debug" in the "Configuration" combo box. Make sure that "Runtime
|
||||
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
||||
the "Configuration" combo box and make sure that "Runtime Library" is
|
||||
set to "Multi-threaded DLL".
|
||||
|
||||
@item Click "OK" to close the "Project / Properties" dialog box.
|
||||
|
||||
@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
|
||||
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
|
||||
and install it in MSVC++'s include directory
|
||||
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
|
||||
|
||||
@item MSVC++ also does not understand the @code{inline} keyword used by
|
||||
FFmpeg, so you must add this line before @code{#include}ing libav*:
|
||||
@example
|
||||
#define inline _inline
|
||||
@end example
|
||||
|
||||
@item Build your application, everything should work.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@subsubsection Using shared libraries
|
||||
|
||||
This is how to create DLL and LIB files that are compatible with MSVC++:
|
||||
|
||||
@enumerate
|
||||
|
||||
@item Add a call to @file{vcvars32.bat} (which sets up the environment
|
||||
variables for the Visual C++ tools) as the first line of @file{msys.bat}.
|
||||
The standard location for @file{vcvars32.bat} is
|
||||
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
|
||||
and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
|
||||
If this corresponds to your setup, add the following line as the first line
|
||||
of @file{msys.bat}:
|
||||
|
||||
@example
|
||||
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
||||
@end example
|
||||
|
||||
Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
|
||||
and run @file{c:\msys\1.0\msys.bat} from there.
|
||||
|
||||
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
|
||||
from @file{Microsoft (R) Library Manager}, this means your environment
|
||||
variables are set up correctly, the @file{Microsoft (R) Library Manager}
|
||||
is on the path and will be used by FFmpeg to create
|
||||
MSVC++-compatible import libraries.
|
||||
|
||||
@item Build FFmpeg with
|
||||
|
||||
@example
|
||||
./configure --enable-shared
|
||||
make
|
||||
make install
|
||||
@end example
|
||||
|
||||
Your install path (@file{/usr/local/} by default) should now have the
|
||||
necessary DLL and LIB files under the @file{bin} directory.
|
||||
|
||||
@end enumerate
|
||||
|
||||
To use those files with MSVC++, do the same as you would do with
|
||||
the static libraries, as described above. But in Step 4,
|
||||
you should only need to add the directory where the LIB files are installed
|
||||
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
|
||||
installed in the @file{bin} directory. And instead of adding the static
|
||||
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
|
||||
(@file{avcodec.lib}, @file{avformat.lib}, and
|
||||
@file{avutil.lib}). Note that you should not use the GCC import
|
||||
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
||||
reference errors. There should be no need for @file{libmingwex.a},
|
||||
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
||||
statically linked into the DLLs. The @file{bin} directory contains a bunch
|
||||
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
|
||||
dllexport/dllimport interface. Such data will be exported properly while
|
||||
building, but to use them in your MSVC++ code you will have to edit the
|
||||
appropriate headers and mark the data as dllimport. For example, in
|
||||
libavutil/pixdesc.h you should have:
|
||||
@example
|
||||
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
|
||||
@end example
|
||||
|
||||
Note that using import libraries created by dlltool requires
|
||||
the linker optimization option to be set to
|
||||
"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
|
||||
the resulting binaries will fail during runtime. This isn't
|
||||
required when using import libraries generated by lib.exe.
|
||||
This issue is reported upstream at
|
||||
@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
|
||||
|
||||
@subsection Cross compilation for Windows with Linux
|
||||
|
||||
You must use the MinGW cross compilation tools available at
|
||||
@url{http://www.mingw.org/}.
|
||||
|
||||
Then configure FFmpeg with the following options:
|
||||
@example
|
||||
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
|
||||
@end example
|
||||
(you can change the cross-prefix according to the prefix chosen for the
|
||||
MinGW tools).
|
||||
|
||||
Then you can easily test FFmpeg with Wine
|
||||
(@url{http://www.winehq.com/}).
|
||||
|
||||
@subsection Compilation under Cygwin
|
||||
|
||||
Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
|
||||
llrint() in its C library.
|
||||
|
||||
Install your Cygwin with all the "Base" packages, plus the
|
||||
following "Devel" ones:
|
||||
@example
|
||||
binutils, gcc4-core, make, git, mingw-runtime, texi2html
|
||||
@end example
|
||||
|
||||
And the following "Utils" one:
|
||||
@example
|
||||
diffutils
|
||||
@end example
|
||||
|
||||
Then run
|
||||
|
||||
@example
|
||||
./configure
|
||||
@end example
|
||||
|
||||
to make a static build.
|
||||
|
||||
The current @code{gcc4-core} package is buggy and needs this flag to build
|
||||
shared libraries:
|
||||
|
||||
@example
|
||||
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
|
||||
@end example
|
||||
|
||||
If you want to build FFmpeg with additional libraries, download Cygwin
|
||||
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
|
||||
@example
|
||||
libogg-devel, libvorbis-devel
|
||||
@end example
|
||||
|
||||
These library packages are only available from Cygwin Ports
|
||||
(@url{http://sourceware.org/cygwinports/}) :
|
||||
|
||||
@example
|
||||
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-devel, libgsm-devel,
|
||||
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
|
||||
libxvidcore-devel
|
||||
@end example
|
||||
|
||||
The recommendation for libnut and x264 is to build them from source by
|
||||
yourself, as they evolve too quickly for Cygwin Ports to be up to date.
|
||||
|
||||
Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
|
||||
of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports.
|
||||
|
||||
@subsection Crosscompilation for Windows under Cygwin
|
||||
|
||||
With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
|
||||
|
||||
Just install your Cygwin as explained before, plus these additional
|
||||
"Devel" packages:
|
||||
@example
|
||||
gcc-mingw-core, mingw-runtime, mingw-zlib
|
||||
@end example
|
||||
|
||||
and add some special flags to your configure invocation.
|
||||
|
||||
For a static build run
|
||||
@example
|
||||
./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||
@end example
|
||||
|
||||
and for a build with shared libraries
|
||||
@example
|
||||
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||
@end example
|
||||
|
||||
@bye
|
||||
|
@@ -1,344 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle Using git to develop FFmpeg
|
||||
|
||||
@titlepage
|
||||
@center @titlefont{Using git to develop FFmpeg}
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Introduction
|
||||
|
||||
This document aims in giving some quick references on a set of useful git
|
||||
commands. You should always use the extensive and detailed documentation
|
||||
provided directly by git:
|
||||
|
||||
@example
|
||||
git --help
|
||||
man git
|
||||
@end example
|
||||
|
||||
shows you the available subcommands,
|
||||
|
||||
@example
|
||||
git <command> --help
|
||||
man git-<command>
|
||||
@end example
|
||||
|
||||
shows information about the subcommand <command>.
|
||||
|
||||
Additional information could be found on the
|
||||
@url{http://gitref.org, Git Reference} website
|
||||
|
||||
For more information about the Git project, visit the
|
||||
|
||||
@url{http://git-scm.com/, Git website}
|
||||
|
||||
Consult these resources whenever you have problems, they are quite exhaustive.
|
||||
|
||||
What follows now is a basic introduction to Git and some FFmpeg-specific
|
||||
guidelines to ease the contribution to the project
|
||||
|
||||
@chapter Basics Usage
|
||||
|
||||
@section Get GIT
|
||||
|
||||
You can get git from @url{http://git-scm.com/}
|
||||
Most distribution and operating system provide a package for it.
|
||||
|
||||
|
||||
@section Cloning the source tree
|
||||
|
||||
@example
|
||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
||||
@end example
|
||||
|
||||
This will put the FFmpeg sources into the directory @var{<target>}.
|
||||
|
||||
@example
|
||||
git clone git@@source.ffmpeg.org:ffmpeg <target>
|
||||
@end example
|
||||
|
||||
This will put the FFmpeg sources into the directory @var{<target>} and let
|
||||
you push back your changes to the remote repository.
|
||||
|
||||
|
||||
@section Updating the source tree to the latest revision
|
||||
|
||||
@example
|
||||
git pull (--rebase)
|
||||
@end example
|
||||
|
||||
pulls in the latest changes from the tracked branch. The tracked branch
|
||||
can be remote. By default the master branch tracks the branch master in
|
||||
the remote origin.
|
||||
|
||||
@float IMPORTANT
|
||||
@command{--rebase} (see below) is recommended.
|
||||
@end float
|
||||
|
||||
@section Rebasing your local branches
|
||||
|
||||
@example
|
||||
git pull --rebase
|
||||
@end example
|
||||
|
||||
fetches the changes from the main repository and replays your local commits
|
||||
over it. This is required to keep all your local changes at the top of
|
||||
FFmpeg's master tree. The master tree will reject pushes with merge commits.
|
||||
|
||||
|
||||
@section Adding/removing files/directories
|
||||
|
||||
@example
|
||||
git add [-A] <filename/dirname>
|
||||
git rm [-r] <filename/dirname>
|
||||
@end example
|
||||
|
||||
GIT needs to get notified of all changes you make to your working
|
||||
directory that makes files appear or disappear.
|
||||
Line moves across files are automatically tracked.
|
||||
|
||||
|
||||
@section Showing modifications
|
||||
|
||||
@example
|
||||
git diff <filename(s)>
|
||||
@end example
|
||||
|
||||
will show all local modifications in your working directory as unified diff.
|
||||
|
||||
|
||||
@section Inspecting the changelog
|
||||
|
||||
@example
|
||||
git log <filename(s)>
|
||||
@end example
|
||||
|
||||
You may also use the graphical tools like gitview or gitk or the web
|
||||
interface available at http://source.ffmpeg.org/
|
||||
|
||||
@section Checking source tree status
|
||||
|
||||
@example
|
||||
git status
|
||||
@end example
|
||||
|
||||
detects all the changes you made and lists what actions will be taken in case
|
||||
of a commit (additions, modifications, deletions, etc.).
|
||||
|
||||
|
||||
@section Committing
|
||||
|
||||
@example
|
||||
git diff --check
|
||||
@end example
|
||||
|
||||
to double check your changes before committing them to avoid trouble later
|
||||
on. All experienced developers do this on each and every commit, no matter
|
||||
how small.
|
||||
Every one of them has been saved from looking like a fool by this many times.
|
||||
It's very easy for stray debug output or cosmetic modifications to slip in,
|
||||
please avoid problems through this extra level of scrutiny.
|
||||
|
||||
For cosmetics-only commits you should get (almost) empty output from
|
||||
|
||||
@example
|
||||
git diff -w -b <filename(s)>
|
||||
@end example
|
||||
|
||||
Also check the output of
|
||||
|
||||
@example
|
||||
git status
|
||||
@end example
|
||||
|
||||
to make sure you don't have untracked files or deletions.
|
||||
|
||||
@example
|
||||
git add [-i|-p|-A] <filenames/dirnames>
|
||||
@end example
|
||||
|
||||
Make sure you have told git your name and email address
|
||||
|
||||
@example
|
||||
git config --global user.name "My Name"
|
||||
git config --global user.email my@@email.invalid
|
||||
@end example
|
||||
|
||||
Use @var{--global} to set the global configuration for all your git checkouts.
|
||||
|
||||
Git will select the changes to the files for commit. Optionally you can use
|
||||
the interactive or the patch mode to select hunk by hunk what should be
|
||||
added to the commit.
|
||||
|
||||
|
||||
@example
|
||||
git commit
|
||||
@end example
|
||||
|
||||
Git will commit the selected changes to your current local branch.
|
||||
|
||||
You will be prompted for a log message in an editor, which is either
|
||||
set in your personal configuration file through
|
||||
|
||||
@example
|
||||
git config --global core.editor
|
||||
@end example
|
||||
|
||||
or set by one of the following environment variables:
|
||||
@var{GIT_EDITOR}, @var{VISUAL} or @var{EDITOR}.
|
||||
|
||||
Log messages should be concise but descriptive. Explain why you made a change,
|
||||
what you did will be obvious from the changes themselves most of the time.
|
||||
Saying just "bug fix" or "10l" is bad. Remember that people of varying skill
|
||||
levels look at and educate themselves while reading through your code. Don't
|
||||
include filenames in log messages, Git provides that information.
|
||||
|
||||
Possibly make the commit message have a terse, descriptive first line, an
|
||||
empty line and then a full description. The first line will be used to name
|
||||
the patch by git format-patch.
|
||||
|
||||
@section Preparing a patchset
|
||||
|
||||
@example
|
||||
git format-patch <commit> [-o directory]
|
||||
@end example
|
||||
|
||||
will generate a set of patches for each commit between @var{<commit>} and
|
||||
current @var{HEAD}. E.g.
|
||||
|
||||
@example
|
||||
git format-patch origin/master
|
||||
@end example
|
||||
|
||||
will generate patches for all commits on current branch which are not
|
||||
present in upstream.
|
||||
A useful shortcut is also
|
||||
|
||||
@example
|
||||
git format-patch -n
|
||||
@end example
|
||||
|
||||
which will generate patches from last @var{n} commits.
|
||||
By default the patches are created in the current directory.
|
||||
|
||||
@section Sending patches for review
|
||||
|
||||
@example
|
||||
git send-email <commit list|directory>
|
||||
@end example
|
||||
|
||||
will send the patches created by @command{git format-patch} or directly
|
||||
generates them. All the email fields can be configured in the global/local
|
||||
configuration or overridden by command line.
|
||||
Note that this tool must often be installed separately (e.g. @var{git-email}
|
||||
package on Debian-based distros).
|
||||
|
||||
|
||||
@section Renaming/moving/copying files or contents of files
|
||||
|
||||
Git automatically tracks such changes, making those normal commits.
|
||||
|
||||
@example
|
||||
mv/cp path/file otherpath/otherfile
|
||||
git add [-A] .
|
||||
git commit
|
||||
@end example
|
||||
|
||||
|
||||
@chapter FFmpeg specific
|
||||
|
||||
@section Reverting broken commits
|
||||
|
||||
@example
|
||||
git reset <commit>
|
||||
@end example
|
||||
|
||||
@command{git reset} will uncommit the changes till @var{<commit>} rewriting
|
||||
the current branch history.
|
||||
|
||||
@example
|
||||
git commit --amend
|
||||
@end example
|
||||
|
||||
allows to amend the last commit details quickly.
|
||||
|
||||
@example
|
||||
git rebase -i origin/master
|
||||
@end example
|
||||
|
||||
will replay local commits over the main repository allowing to edit, merge
|
||||
or remove some of them in the process.
|
||||
|
||||
@float NOTE
|
||||
@command{git reset}, @command{git commit --amend} and @command{git rebase}
|
||||
rewrite history, so you should use them ONLY on your local or topic branches.
|
||||
The main repository will reject those changes.
|
||||
@end float
|
||||
|
||||
@example
|
||||
git revert <commit>
|
||||
@end example
|
||||
|
||||
@command{git revert} will generate a revert commit. This will not make the
|
||||
faulty commit disappear from the history.
|
||||
|
||||
@section Pushing changes to remote trees
|
||||
|
||||
@example
|
||||
git push
|
||||
@end example
|
||||
|
||||
Will push the changes to the default remote (@var{origin}).
|
||||
Git will prevent you from pushing changes if the local and remote trees are
|
||||
out of sync. Refer to and to sync the local tree.
|
||||
|
||||
@example
|
||||
git remote add <name> <url>
|
||||
@end example
|
||||
|
||||
Will add additional remote with a name reference, it is useful if you want
|
||||
to push your local branch for review on a remote host.
|
||||
|
||||
@example
|
||||
git push <remote> <refspec>
|
||||
@end example
|
||||
|
||||
Will push the changes to the @var{<remote>} repository.
|
||||
Omitting @var{<refspec>} makes @command{git push} update all the remote
|
||||
branches matching the local ones.
|
||||
|
||||
@section Finding a specific svn revision
|
||||
|
||||
Since version 1.7.1 git supports @var{:/foo} syntax for specifying commits
|
||||
based on a regular expression. see man gitrevisions
|
||||
|
||||
@example
|
||||
git show :/'as revision 23456'
|
||||
@end example
|
||||
|
||||
will show the svn changeset @var{r23456}. With older git versions searching in
|
||||
the @command{git log} output is the easiest option (especially if a pager with
|
||||
search capabilities is used).
|
||||
This commit can be checked out with
|
||||
|
||||
@example
|
||||
git checkout -b svn_23456 :/'as revision 23456'
|
||||
@end example
|
||||
|
||||
or for git < 1.7.1 with
|
||||
|
||||
@example
|
||||
git checkout -b svn_23456 $SHA1
|
||||
@end example
|
||||
|
||||
where @var{$SHA1} is the commit hash from the @command{git log} output.
|
||||
|
||||
@chapter Server Issues
|
||||
|
||||
Contact the project admins @email{root@@ffmpeg.org} if you have technical
|
||||
problems with the GIT server.
|
@@ -39,17 +39,16 @@ I. BASICS:
|
||||
|
||||
0. Get GIT:
|
||||
|
||||
Most distributions have a git package, if not
|
||||
You can get git from http://git-scm.com/
|
||||
|
||||
|
||||
1. Cloning the source tree:
|
||||
|
||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
||||
git clone git://git.videolan.org/ffmpeg <target>
|
||||
|
||||
This will put the FFmpeg sources into the directory <target>.
|
||||
|
||||
git clone git@source.ffmpeg.org:ffmpeg <target>
|
||||
git clone git@git.videolan.org:ffmpeg <target>
|
||||
|
||||
This will put the FFmpeg sources into the directory <target> and let
|
||||
you push back your changes to the remote repository.
|
||||
@@ -98,7 +97,7 @@ I. BASICS:
|
||||
git log <filename(s)>
|
||||
|
||||
You may also use the graphical tools like gitview or gitk or the web
|
||||
interface available at http://source.ffmpeg.org
|
||||
interface available at http://git.videolan.org
|
||||
|
||||
6. Checking source tree status:
|
||||
|
||||
@@ -206,19 +205,8 @@ I. BASICS:
|
||||
|
||||
git format-patch <commit> [-o directory]
|
||||
|
||||
will generate a set of patches for each commit between <commit> and
|
||||
current HEAD. E.g.
|
||||
|
||||
git format-patch origin/master
|
||||
|
||||
will generate patches for all commits on current branch which are not
|
||||
present in upstream.
|
||||
A useful shortcut is also
|
||||
|
||||
git format-patch -n
|
||||
|
||||
which will generate patches from last n commits.
|
||||
By default the patches are created in the current directory.
|
||||
will generate a set of patches out of the current branch starting from
|
||||
commit. By default the patches are created in the current directory.
|
||||
|
||||
11. Sending patches for review
|
||||
|
||||
@@ -227,8 +215,6 @@ I. BASICS:
|
||||
will send the patches created by git format-patch or directly generates
|
||||
them. All the email fields can be configured in the global/local
|
||||
configuration or overridden by command line.
|
||||
Note that this tool must often be installed separately (e.g. git-email
|
||||
package on Debian-based distros).
|
||||
|
||||
12. Pushing changes to remote trees
|
||||
|
||||
|
416
doc/indevs.texi
416
doc/indevs.texi
@@ -42,7 +42,7 @@ specify card number or identifier, device number and subdevice number
|
||||
To see the list of cards currently recognized by your system check the
|
||||
files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
|
||||
|
||||
For example to capture with @command{ffmpeg} from an ALSA device with
|
||||
For example to capture with @file{ffmpeg} from an ALSA device with
|
||||
card id 0, you may run the command:
|
||||
@example
|
||||
ffmpeg -f alsa -i hw:0 alsaout.wav
|
||||
@@ -55,101 +55,6 @@ For more information see:
|
||||
|
||||
BSD video input device.
|
||||
|
||||
@section dshow
|
||||
|
||||
Windows DirectShow input device.
|
||||
|
||||
DirectShow support is enabled when FFmpeg is built with mingw-w64.
|
||||
Currently only audio and video devices are supported.
|
||||
|
||||
Multiple devices may be opened as separate inputs, but they may also be
|
||||
opened on the same input, which should improve synchronism between them.
|
||||
|
||||
The input name should be in the format:
|
||||
|
||||
@example
|
||||
@var{TYPE}=@var{NAME}[:@var{TYPE}=@var{NAME}]
|
||||
@end example
|
||||
|
||||
where @var{TYPE} can be either @var{audio} or @var{video},
|
||||
and @var{NAME} is the device's name.
|
||||
|
||||
@subsection Options
|
||||
|
||||
If no options are specified, the device's defaults are used.
|
||||
If the device does not support the requested options, it will
|
||||
fail to open.
|
||||
|
||||
@table @option
|
||||
|
||||
@item video_size
|
||||
Set the video size in the captured video.
|
||||
|
||||
@item framerate
|
||||
Set the framerate in the captured video.
|
||||
|
||||
@item sample_rate
|
||||
Set the sample rate (in Hz) of the captured audio.
|
||||
|
||||
@item sample_size
|
||||
Set the sample size (in bits) of the captured audio.
|
||||
|
||||
@item channels
|
||||
Set the number of channels in the captured audio.
|
||||
|
||||
@item list_devices
|
||||
If set to @option{true}, print a list of devices and exit.
|
||||
|
||||
@item list_options
|
||||
If set to @option{true}, print a list of selected device's options
|
||||
and exit.
|
||||
|
||||
@item video_device_number
|
||||
Set video device number for devices with same name (starts at 0,
|
||||
defaults to 0).
|
||||
|
||||
@item audio_device_number
|
||||
Set audio device number for devices with same name (starts at 0,
|
||||
defaults to 0).
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
||||
@itemize
|
||||
|
||||
@item
|
||||
Print the list of DirectShow supported devices and exit:
|
||||
@example
|
||||
$ ffmpeg -list_devices true -f dshow -i dummy
|
||||
@end example
|
||||
|
||||
@item
|
||||
Open video device @var{Camera}:
|
||||
@example
|
||||
$ ffmpeg -f dshow -i video="Camera"
|
||||
@end example
|
||||
|
||||
@item
|
||||
Open second video device with name @var{Camera}:
|
||||
@example
|
||||
$ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
|
||||
@end example
|
||||
|
||||
@item
|
||||
Open video device @var{Camera} and audio device @var{Microphone}:
|
||||
@example
|
||||
$ ffmpeg -f dshow -i video="Camera":audio="Microphone"
|
||||
@end example
|
||||
|
||||
@item
|
||||
Print the list of supported options in selected device and exit:
|
||||
@example
|
||||
$ ffmpeg -list_options true -f dshow -i video="Camera"
|
||||
@end example
|
||||
|
||||
@end itemize
|
||||
|
||||
@section dv1394
|
||||
|
||||
Linux DV 1394 input device.
|
||||
@@ -167,14 +72,14 @@ For more detailed information read the file
|
||||
Documentation/fb/framebuffer.txt included in the Linux source tree.
|
||||
|
||||
To record from the framebuffer device @file{/dev/fb0} with
|
||||
@command{ffmpeg}:
|
||||
@file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
|
||||
@end example
|
||||
|
||||
You can take a single screenshot image with the command:
|
||||
@example
|
||||
ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
||||
ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
||||
@end example
|
||||
|
||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
||||
@@ -196,15 +101,15 @@ device.
|
||||
Once you have created one or more JACK readable clients, you need to
|
||||
connect them to one or more JACK writable clients.
|
||||
|
||||
To connect or disconnect JACK clients you can use the @command{jack_connect}
|
||||
and @command{jack_disconnect} programs, or do it through a graphical interface,
|
||||
for example with @command{qjackctl}.
|
||||
To connect or disconnect JACK clients you can use the
|
||||
@file{jack_connect} and @file{jack_disconnect} programs, or do it
|
||||
through a graphical interface, for example with @file{qjackctl}.
|
||||
|
||||
To list the JACK clients and their properties you can invoke the command
|
||||
@command{jack_lsp}.
|
||||
@file{jack_lsp}.
|
||||
|
||||
Follows an example which shows how to capture a JACK readable client
|
||||
with @command{ffmpeg}.
|
||||
with @file{ffmpeg}.
|
||||
@example
|
||||
# Create a JACK writable client with name "ffmpeg".
|
||||
$ ffmpeg -f jack -i ffmpeg -y out.wav
|
||||
@@ -228,165 +133,10 @@ $ jack_connect metro:120_bpm ffmpeg:input_1
|
||||
For more information read:
|
||||
@url{http://jackaudio.org/}
|
||||
|
||||
@section lavfi
|
||||
|
||||
Libavfilter input virtual device.
|
||||
|
||||
This input device reads data from the open output pads of a libavfilter
|
||||
filtergraph.
|
||||
|
||||
For each filtergraph open output, the input device will create a
|
||||
corresponding stream which is mapped to the generated output. Currently
|
||||
only video data is supported. The filtergraph is specified through the
|
||||
option @option{graph}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item graph
|
||||
Specify the filtergraph to use as input. Each video open output must be
|
||||
labelled by a unique string of the form "out@var{N}", where @var{N} is a
|
||||
number starting from 0 corresponding to the mapped input stream
|
||||
generated by the device.
|
||||
The first unlabelled output is automatically assigned to the "out0"
|
||||
label, but all the others need to be specified explicitly.
|
||||
|
||||
If not specified defaults to the filename specified for the input
|
||||
device.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
||||
@itemize
|
||||
@item
|
||||
Create a color video stream and play it back with @command{ffplay}:
|
||||
@example
|
||||
ffplay -f lavfi -graph "color=pink [out0]" dummy
|
||||
@end example
|
||||
|
||||
@item
|
||||
As the previous example, but use filename for specifying the graph
|
||||
description, and omit the "out0" label:
|
||||
@example
|
||||
ffplay -f lavfi color=pink
|
||||
@end example
|
||||
|
||||
@item
|
||||
Create three different video test filtered sources and play them:
|
||||
@example
|
||||
ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read an audio stream from a file using the amovie source and play it
|
||||
back with @command{ffplay}:
|
||||
@example
|
||||
ffplay -f lavfi "amovie=test.wav"
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read an audio stream and a video stream and play it back with
|
||||
@command{ffplay}:
|
||||
@example
|
||||
ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
|
||||
@end example
|
||||
|
||||
@end itemize
|
||||
|
||||
@section libdc1394
|
||||
|
||||
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 @command{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
|
||||
|
||||
Open Sound System input device.
|
||||
@@ -395,7 +145,7 @@ The filename to provide to the input device is the device node
|
||||
representing the OSS input device, and is usually set to
|
||||
@file{/dev/dsp}.
|
||||
|
||||
For example to grab from @file{/dev/dsp} using @command{ffmpeg} use the
|
||||
For example to grab from @file{/dev/dsp} using @file{ffmpeg} use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
||||
@@ -404,89 +154,6 @@ ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
||||
For more information about OSS see:
|
||||
@url{http://manuals.opensound.com/usersguide/dsp.html}
|
||||
|
||||
@section pulse
|
||||
|
||||
pulseaudio input device.
|
||||
|
||||
To enable this input device during configuration you need libpulse-simple
|
||||
installed in your system.
|
||||
|
||||
The filename to provide to the input device is a source device or the
|
||||
string "default"
|
||||
|
||||
To list the pulse source devices and their properties you can invoke
|
||||
the command @command{pactl list sources}.
|
||||
|
||||
@example
|
||||
ffmpeg -f pulse -i default /tmp/pulse.wav
|
||||
@end example
|
||||
|
||||
@subsection @var{server} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-server @var{server name}
|
||||
@end example
|
||||
|
||||
Connects to a specific server.
|
||||
|
||||
@subsection @var{name} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-name @var{application name}
|
||||
@end example
|
||||
|
||||
Specify the application name pulse will use when showing active clients,
|
||||
by default it is the LIBAVFORMAT_IDENT string
|
||||
|
||||
@subsection @var{stream_name} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-stream_name @var{stream name}
|
||||
@end example
|
||||
|
||||
Specify the stream name pulse will use when showing active streams,
|
||||
by default it is "record"
|
||||
|
||||
@subsection @var{sample_rate} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-sample_rate @var{samplerate}
|
||||
@end example
|
||||
|
||||
Specify the samplerate in Hz, by default 48kHz is used.
|
||||
|
||||
@subsection @var{channels} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-channels @var{N}
|
||||
@end example
|
||||
|
||||
Specify the channels in use, by default 2 (stereo) is set.
|
||||
|
||||
@subsection @var{frame_size} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-frame_size @var{bytes}
|
||||
@end example
|
||||
|
||||
Specify the number of byte per frame, by default it is set to 1024.
|
||||
|
||||
@subsection @var{fragment_size} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-fragment_size @var{bytes}
|
||||
@end example
|
||||
|
||||
Specify the minimal buffering fragment in pulseaudio, it will affect the
|
||||
audio latency. By default it is unset.
|
||||
|
||||
@section sndio
|
||||
|
||||
sndio input device.
|
||||
@@ -498,7 +165,7 @@ The filename to provide to the input device is the device node
|
||||
representing the sndio input device, and is usually set to
|
||||
@file{/dev/audio0}.
|
||||
|
||||
For example to grab from @file{/dev/audio0} using @command{ffmpeg} use the
|
||||
For example to grab from @file{/dev/audio0} using @file{ffmpeg} use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
|
||||
@@ -516,20 +183,17 @@ the device.
|
||||
|
||||
Video4Linux and Video4Linux2 devices only support a limited set of
|
||||
@var{width}x@var{height} sizes and framerates. You can check which are
|
||||
supported for example with the command @command{dov4l} for Video4Linux
|
||||
devices and using @command{-list_formats all} for Video4Linux2 devices.
|
||||
supported for example with the command @file{dov4l} for Video4Linux
|
||||
devices and the command @file{v4l-info} for Video4Linux2 devices.
|
||||
|
||||
If the size for the device is set to 0x0, the input device will
|
||||
try to auto-detect the size to use.
|
||||
try to autodetect the size to use.
|
||||
Only for the video4linux2 device, if the frame rate is set to 0/0 the
|
||||
input device will use the frame rate value already set in the driver.
|
||||
|
||||
Video4Linux support is deprecated since Linux 2.6.30, and will be
|
||||
dropped in later versions.
|
||||
|
||||
Note that if FFmpeg is build with v4l-utils support ("--enable-libv4l2"
|
||||
option), it will always be used.
|
||||
|
||||
Follow some usage examples of the video4linux devices with the ff*
|
||||
tools.
|
||||
@example
|
||||
@@ -537,18 +201,15 @@ tools.
|
||||
# to the default of 25/1.
|
||||
ffplay -s 320x240 -f video4linux /dev/video0
|
||||
|
||||
# Grab and show the input of a video4linux2 device, auto-adjust size.
|
||||
# Grab and show the input of a video4linux2 device, autoadjust size.
|
||||
ffplay -f video4linux2 /dev/video0
|
||||
|
||||
# Grab and record the input of a video4linux2 device, auto-adjust size,
|
||||
# Grab and record the input of a video4linux2 device, autoadjust size,
|
||||
# frame rate value defaults to 0/0 so it is read from the video4linux2
|
||||
# driver.
|
||||
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
|
||||
@end example
|
||||
|
||||
"v4l" and "v4l2" can be used as aliases for the respective "video4linux" and
|
||||
"video4linux2".
|
||||
|
||||
@section vfwcap
|
||||
|
||||
VfW (Video for Windows) capture input device.
|
||||
@@ -570,7 +231,7 @@ The filename passed as input has the syntax:
|
||||
|
||||
@var{hostname}:@var{display_number}.@var{screen_number} specifies the
|
||||
X11 display name of the screen to grab from. @var{hostname} can be
|
||||
omitted, and defaults to "localhost". The environment variable
|
||||
ommitted, and defaults to "localhost". The environment variable
|
||||
@env{DISPLAY} contains the default display name.
|
||||
|
||||
@var{x_offset} and @var{y_offset} specify the offsets of the grabbed
|
||||
@@ -579,54 +240,15 @@ default to 0.
|
||||
|
||||
Check the X11 documentation (e.g. man X) for more detailed information.
|
||||
|
||||
Use the @command{dpyinfo} program for getting basic information about the
|
||||
Use the @file{dpyinfo} program for getting basic information about the
|
||||
properties of your X11 display (e.g. grep for "name" or "dimensions").
|
||||
|
||||
For example to grab from @file{:0.0} using @command{ffmpeg}:
|
||||
For example to grab from @file{:0.0} using @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||
|
||||
# Grab at position 10,20.
|
||||
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
|
||||
ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
|
||||
@end example
|
||||
|
||||
@c man end INPUT DEVICES
|
||||
|
@@ -5,42 +5,32 @@ NOTE: This is a draft.
|
||||
|
||||
Overview:
|
||||
---------
|
||||
|
||||
FFmpeg uses Trac for tracking issues, new issues and changes to
|
||||
existing issues can be done through a web interface.
|
||||
|
||||
Issues can be different kinds of things we want to keep track of
|
||||
but that do not belong into the source tree itself. This includes
|
||||
bug reports, patches, feature requests and license violations. We
|
||||
might add more items to this list in the future, so feel free to
|
||||
propose a new `type of issue' on the ffmpeg-devel mailing list if
|
||||
you feel it is worth tracking.
|
||||
|
||||
It is possible to subscribe to individual issues by adding yourself to the
|
||||
Cc list or to subscribe to the ffmpeg-trac mailing list which receives
|
||||
a mail for every change to every issue.
|
||||
nosy list or to subscribe to the ffmpeg-issues mailing list which receives
|
||||
a mail for every change to every issue. Replies to such mails will also
|
||||
be properly added to the respective issue.
|
||||
(the above does all work already after light testing)
|
||||
|
||||
The subscription URL for the ffmpeg-trac list is:
|
||||
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
||||
The URL of the webinterface of the tracker is:
|
||||
http(s)://trac.ffmpeg.org
|
||||
http(s)://ffmpeg.org/trac/ffmpeg
|
||||
|
||||
NOTE: issue = (bug report || patch || feature request)
|
||||
|
||||
Type:
|
||||
-----
|
||||
bug / defect
|
||||
bug
|
||||
An error, flaw, mistake, failure, or fault in FFmpeg or libav* that
|
||||
prevents it from behaving as intended.
|
||||
|
||||
feature request / enhancement
|
||||
feature request
|
||||
Request of support for encoding or decoding of a new codec, container
|
||||
or variant.
|
||||
Request of support for more, less or plain different output or behavior
|
||||
where the current implementation cannot be considered wrong.
|
||||
|
||||
license violation
|
||||
ticket to keep track of (L)GPL violations of ffmpeg by others
|
||||
|
||||
patch
|
||||
A patch as generated by diff which conforms to the patch submission and
|
||||
development policy.
|
||||
@@ -61,8 +51,6 @@ important
|
||||
the separation to normal is somewhat fuzzy.
|
||||
For feature requests this priority would be used for things many people
|
||||
want.
|
||||
Regressions also should be marked as important, regressions are bugs that
|
||||
don't exist in a past revision or another branch.
|
||||
|
||||
normal
|
||||
|
||||
@@ -92,17 +80,6 @@ closed
|
||||
final state
|
||||
|
||||
|
||||
Analyzed flag:
|
||||
--------------
|
||||
Bugs which have been analyzed and where it is understood what causes them
|
||||
and which exact chain of events triggers them. This analysis should be
|
||||
available as a message in the bug report.
|
||||
Note, do not change the status to analyzed without also providing a clear
|
||||
and understandable analysis.
|
||||
This state implicates that the bug either has been reproduced or that
|
||||
reproduction is not needed as the bug is already understood.
|
||||
|
||||
|
||||
Type/Status/Substatus:
|
||||
----------
|
||||
*/new/new
|
||||
@@ -130,6 +107,24 @@ Type/Status/Substatus:
|
||||
Issues for which some information has been requested by the developers,
|
||||
but which has not been provided by anyone within reasonable time.
|
||||
|
||||
bug/open/reproduced
|
||||
Bugs which have been reproduced.
|
||||
|
||||
bug/open/analyzed
|
||||
Bugs which have been analyzed and where it is understood what causes them
|
||||
and which exact chain of events triggers them. This analysis should be
|
||||
available as a message in the bug report.
|
||||
Note, do not change the status to analyzed without also providing a clear
|
||||
and understandable analysis.
|
||||
This state implicates that the bug either has been reproduced or that
|
||||
reproduction is not needed as the bug is already understood.
|
||||
|
||||
bug/open/needs_more_info
|
||||
Bug reports which are incomplete and or where more information is needed
|
||||
from the submitter or another person who can provide it.
|
||||
This state implicates that the bug has not been analyzed or reproduced.
|
||||
Note, the idea behind needs_more_info is to offload work from the
|
||||
developers to the users whenever possible.
|
||||
|
||||
bug/closed/fixed
|
||||
Bugs which have to the best of our knowledge been fixed.
|
||||
@@ -163,6 +158,10 @@ patch/closed/applied
|
||||
patch/closed/rejected
|
||||
Patches which have been rejected.
|
||||
|
||||
feature_request/open/needs_more_info
|
||||
Feature requests where it is not clear what exactly is wanted
|
||||
(these also could be closed as invalid ...).
|
||||
|
||||
feature_request/closed/implemented
|
||||
Feature requests which have been implemented.
|
||||
|
||||
@@ -174,10 +173,12 @@ Note, please do not use type-status-substatus combinations other than the
|
||||
above without asking on ffmpeg-dev first!
|
||||
|
||||
Note2, if you provide the requested info do not forget to remove the
|
||||
needs_more_info substatus.
|
||||
needs_more_info substate.
|
||||
|
||||
Component:
|
||||
----------
|
||||
Topic:
|
||||
------
|
||||
A topic is a tag you should add to your issue in order to make grouping them
|
||||
easier.
|
||||
|
||||
avcodec
|
||||
issues in libavcodec/*
|
||||
@@ -197,9 +198,6 @@ ffmpeg
|
||||
ffplay
|
||||
issues in or related to ffplay.c
|
||||
|
||||
ffprobe
|
||||
issues in or related to ffprobe.c
|
||||
|
||||
ffserver
|
||||
issues in or related to ffserver.c
|
||||
|
||||
@@ -207,7 +205,7 @@ build system
|
||||
issues in or related to configure/Makefile
|
||||
|
||||
regression
|
||||
bugs which were not present in a past revision
|
||||
bugs which were working in a past revision
|
||||
|
||||
trac
|
||||
roundup
|
||||
issues related to our issue tracker
|
||||
|
@@ -14,8 +14,20 @@
|
||||
Libavfilter is the filtering API of FFmpeg. It is the substitute of the
|
||||
now deprecated 'vhooks' and started as a Google Summer of Code project.
|
||||
|
||||
Audio filtering integration into the main FFmpeg repository is a work in
|
||||
progress, so audio API and ABI should not be considered stable yet.
|
||||
Integrating libavfilter into the main FFmpeg repository is a work in
|
||||
progress. If you wish to try the unfinished development code of
|
||||
libavfilter then check it out from the libavfilter repository into
|
||||
some directory of your choice by:
|
||||
|
||||
@example
|
||||
svn checkout svn://svn.ffmpeg.org/soc/libavfilter
|
||||
@end example
|
||||
|
||||
And then read the README file in the top directory to learn how to
|
||||
integrate it into ffmpeg and ffplay.
|
||||
|
||||
But note that there may still be serious bugs in the code and its API
|
||||
and ABI should not be considered stable yet!
|
||||
|
||||
@chapter Tutorial
|
||||
|
||||
@@ -36,20 +48,21 @@ and the vflip filter before merging it back with the other stream by
|
||||
overlaying it on top. You can use the following command to achieve this:
|
||||
|
||||
@example
|
||||
ffmpeg -i input -vf "[in] split [T1], fifo, [T2] overlay=0:H/2 [out]; [T1] fifo, crop=iw:ih/2:0:ih/2, vflip [T2]" output
|
||||
./ffmpeg -i in.avi -s 240x320 -vf "[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2]
|
||||
@end example
|
||||
|
||||
The result will be that in output the top half of the video is mirrored
|
||||
where input_video.avi has a vertical resolution of 480 pixels. The
|
||||
result will be that in output the top half of the video is mirrored
|
||||
onto the bottom half.
|
||||
|
||||
Video filters are loaded using the @var{-vf} option passed to
|
||||
@command{ffmpeg} or to @command{ffplay}. Filters in the same linear
|
||||
chain are separated by commas. In our example, @var{split, fifo,
|
||||
overlay} are in one linear chain, and @var{fifo, crop, vflip} are in
|
||||
another. The points where the linear chains join are labeled by names
|
||||
enclosed in square brackets. In our example, that is @var{[T1]} and
|
||||
@var{[T2]}. The magic labels @var{[in]} and @var{[out]} are the points
|
||||
where video is input and output.
|
||||
ffmpeg or to ffplay. Filters in the same linear chain are separated by
|
||||
commas. In our example, @var{split, fifo, overlay} are in one linear
|
||||
chain, and @var{fifo, crop, vflip} are in another. The points where
|
||||
the linear chains join are labeled by names enclosed in square
|
||||
brackets. In our example, that is @var{[T1]} and @var{[T2]}. The magic
|
||||
labels @var{[in]} and @var{[out]} are the points where video is input
|
||||
and output.
|
||||
|
||||
Some filters take in input a list of parameters: they are specified
|
||||
after the filter name and an equal sign, and are separated each other
|
||||
|
@@ -43,15 +43,15 @@ You can print the CRC to stdout with the command:
|
||||
ffmpeg -i INPUT -f crc -
|
||||
@end example
|
||||
|
||||
You can select the output format of each frame with @command{ffmpeg} by
|
||||
You can select the output format of each frame with @file{ffmpeg} by
|
||||
specifying the audio and video codec and format. For example to
|
||||
compute the CRC of the input audio converted to PCM unsigned 8-bit
|
||||
and the input video converted to MPEG-2 video, use the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc -
|
||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
|
||||
@end example
|
||||
|
||||
See also the @ref{framecrc} muxer.
|
||||
See also the @code{framecrc} muxer (@pxref{framecrc}).
|
||||
|
||||
@anchor{framecrc}
|
||||
@section framecrc
|
||||
@@ -79,18 +79,17 @@ You can print the CRC of each decoded frame to stdout with the command:
|
||||
ffmpeg -i INPUT -f framecrc -
|
||||
@end example
|
||||
|
||||
You can select the output format of each frame with @command{ffmpeg} by
|
||||
You can select the output format of each frame with @file{ffmpeg} by
|
||||
specifying the audio and video codec and format. For example, to
|
||||
compute the CRC of each decoded input audio frame converted to PCM
|
||||
unsigned 8-bit and of each decoded input video frame converted to
|
||||
MPEG-2 video, use the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc -
|
||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
|
||||
@end example
|
||||
|
||||
See also the @ref{crc} muxer.
|
||||
See also the @code{crc} muxer (@pxref{crc}).
|
||||
|
||||
@anchor{image2}
|
||||
@section image2
|
||||
|
||||
Image file muxer.
|
||||
@@ -120,26 +119,26 @@ The pattern "img%%-%d.jpg" will specify a sequence of filenames of the
|
||||
form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg},
|
||||
etc.
|
||||
|
||||
The following example shows how to use @command{ffmpeg} for creating a
|
||||
The following example shows how to use @file{ffmpeg} for creating a
|
||||
sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ...,
|
||||
taking one image every second from the input video:
|
||||
@example
|
||||
ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg'
|
||||
ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
|
||||
@end example
|
||||
|
||||
Note that with @command{ffmpeg}, if the format is not specified with the
|
||||
Note that with @file{ffmpeg}, if the format is not specified with the
|
||||
@code{-f} option and the output filename specifies an image file
|
||||
format, the image2 muxer is automatically selected, so the previous
|
||||
command can be written as:
|
||||
@example
|
||||
ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg'
|
||||
ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
|
||||
@end example
|
||||
|
||||
Note also that the pattern must not necessarily contain "%d" or
|
||||
"%0@var{N}d", for example to create a single image file
|
||||
@file{img.jpeg} from the input video you can employ the command:
|
||||
@example
|
||||
ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
|
||||
ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
|
||||
@end example
|
||||
|
||||
The image muxer supports the .Y.U.V image file format. This format is
|
||||
@@ -148,18 +147,6 @@ each of the YUV420P components. To read or write this image file format,
|
||||
specify the name of the '.Y' file. The muxer will automatically open the
|
||||
'.U' and '.V' files as required.
|
||||
|
||||
@section mov
|
||||
|
||||
MOV / MP4 muxer
|
||||
|
||||
The muxer options are:
|
||||
|
||||
@table @option
|
||||
@item -moov_size @var{bytes}
|
||||
Reserves space for the moov atom at the beginning of the file instead of placing the
|
||||
moov atom at the end. If the space reserved is insufficient, muxing will fail.
|
||||
@end table
|
||||
|
||||
@section mpegts
|
||||
|
||||
MPEG transport stream muxer.
|
||||
@@ -190,7 +177,7 @@ and @code{service_name}. If they are not set the default for
|
||||
@code{service_name} is "Service01".
|
||||
|
||||
@example
|
||||
ffmpeg -i file.mpg -c copy \
|
||||
ffmpeg -i file.mpg -acodec copy -vcodec copy \
|
||||
-mpegts_original_network_id 0x1122 \
|
||||
-mpegts_transport_stream_id 0x3344 \
|
||||
-mpegts_service_id 0x5566 \
|
||||
@@ -208,14 +195,14 @@ Null muxer.
|
||||
This muxer does not generate any output file, it is mainly useful for
|
||||
testing or benchmarking purposes.
|
||||
|
||||
For example to benchmark decoding with @command{ffmpeg} you can use the
|
||||
For example to benchmark decoding with @file{ffmpeg} you can use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -benchmark -i INPUT -f null out.null
|
||||
@end example
|
||||
|
||||
Note that the above command does not read or write the @file{out.null}
|
||||
file, but specifying the output file is required by the @command{ffmpeg}
|
||||
file, but specifying the output file is required by the @file{ffmpeg}
|
||||
syntax.
|
||||
|
||||
Alternatively you can write the command as:
|
||||
@@ -283,38 +270,7 @@ Both eyes laced in one Block, Right-eye view is first
|
||||
|
||||
For example a 3D WebM clip can be created using the following command line:
|
||||
@example
|
||||
ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
||||
ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
||||
@end example
|
||||
|
||||
@section segment
|
||||
|
||||
Basic stream segmenter.
|
||||
|
||||
The segmenter muxer outputs streams to a number of separate files of nearly
|
||||
fixed duration. Output filename pattern can be set in a fashion similar to
|
||||
@ref{image2}.
|
||||
|
||||
Every segment starts with a video keyframe, if a video stream is present.
|
||||
The segment muxer works best with a single constant frame rate video.
|
||||
|
||||
Optionally it can generate a flat list of the created segments, one segment
|
||||
per line.
|
||||
|
||||
@table @option
|
||||
@item segment_format @var{format}
|
||||
Override the inner container format, by default it is guessed by the filename
|
||||
extension.
|
||||
@item segment_time @var{t}
|
||||
Set segment duration to @var{t} seconds.
|
||||
@item segment_list @var{name}
|
||||
Generate also a listfile named @var{name}.
|
||||
@item segment_list_size @var{size}
|
||||
Overwrite the listfile once it reaches @var{size} entries.
|
||||
@end table
|
||||
|
||||
@example
|
||||
ffmpeg -i in.mkv -c copy -map 0 -f segment -list out.list out%03d.nut
|
||||
@end example
|
||||
|
||||
|
||||
@c man end MUXERS
|
||||
|
@@ -28,7 +28,7 @@ OSS (Open Sound System) output device.
|
||||
|
||||
@section sdl
|
||||
|
||||
SDL (Simple DirectMedia Layer) output device.
|
||||
SDL (Simple Directmedia Layer) output device.
|
||||
|
||||
This output devices allows to show a video stream in an SDL
|
||||
window. Only one SDL window is allowed per application, so you can
|
||||
@@ -60,7 +60,7 @@ If not specified it defaults to the size of the input video.
|
||||
|
||||
@subsection Examples
|
||||
|
||||
The following command shows the @command{ffmpeg} output is an
|
||||
The following command shows the @file{ffmpeg} output is an
|
||||
SDL window, forcing its size to the qcif format:
|
||||
@example
|
||||
ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
|
||||
|
@@ -1,390 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle Platform Specific information
|
||||
@titlepage
|
||||
@center @titlefont{Platform Specific information}
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Unix-like
|
||||
|
||||
Some parts of FFmpeg cannot be built with version 2.15 of the GNU
|
||||
assembler which is still provided by a few AMD64 distributions. To
|
||||
make sure your compiler really uses the required version of gas
|
||||
after a binutils upgrade, run:
|
||||
|
||||
@example
|
||||
$(gcc -print-prog-name=as) --version
|
||||
@end example
|
||||
|
||||
If not, then you should install a different compiler that has no
|
||||
hard-coded path to gas. In the worst case pass @code{--disable-asm}
|
||||
to configure.
|
||||
|
||||
@section BSD
|
||||
|
||||
BSD make will not build FFmpeg, you need to install and use GNU Make
|
||||
(@file{gmake}).
|
||||
|
||||
@section (Open)Solaris
|
||||
|
||||
GNU Make is required to build FFmpeg, so you have to invoke (@file{gmake}),
|
||||
standard Solaris Make will not work. When building with a non-c99 front-end
|
||||
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
|
||||
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
|
||||
since the libc is not c99-compliant by default. The probes performed by
|
||||
configure may raise an exception leading to the death of configure itself
|
||||
due to a bug in the system shell. Simply invoke a different shell such as
|
||||
bash directly to work around this:
|
||||
|
||||
@example
|
||||
bash ./configure
|
||||
@end example
|
||||
|
||||
@anchor{Darwin}
|
||||
@section Darwin (Mac OS X, iPhone)
|
||||
|
||||
The toolchain provided with Xcode is sufficient to build the basic
|
||||
unacelerated code.
|
||||
|
||||
Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
||||
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
|
||||
assembler functions. Just download the Perl script and put it somewhere
|
||||
in your PATH, FFmpeg's configure will pick it up automatically.
|
||||
|
||||
Mac OS X on amd64 and x86 requires @command{yasm} to build most of the
|
||||
optimized assembler functions. @uref{http://www.finkproject.org/, Fink},
|
||||
@uref{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml, Gentoo Prefix},
|
||||
@uref{http://mxcl.github.com/homebrew/, Homebrew}
|
||||
or @uref{http://www.macports.org, MacPorts} can easily provide it.
|
||||
|
||||
|
||||
@chapter DOS
|
||||
|
||||
Using a cross-compiler is preferred for various reasons.
|
||||
@url{http://www.delorie.com/howto/djgpp/linux-x-djgpp.html}
|
||||
|
||||
|
||||
@chapter OS/2
|
||||
|
||||
For information about compiling FFmpeg on OS/2 see
|
||||
@url{http://www.edm2.com/index.php/FFmpeg}.
|
||||
|
||||
|
||||
@chapter Windows
|
||||
|
||||
To get help and instructions for building FFmpeg under Windows, check out
|
||||
the FFmpeg Windows Help Forum at
|
||||
@url{http://ffmpeg.arrozcru.org/}.
|
||||
|
||||
@section Native Windows compilation
|
||||
|
||||
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/}.
|
||||
You can find detailed installation instructions in the download
|
||||
section and the FAQ.
|
||||
|
||||
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
|
||||
packages updated to the latest version. The minimum version for some packages
|
||||
are listed below:
|
||||
|
||||
@itemize
|
||||
@item bash 3.1
|
||||
@item msys-make 3.81-2 (note: not mingw32-make)
|
||||
@item w32api 3.13
|
||||
@item mingw-runtime 3.15
|
||||
@end itemize
|
||||
|
||||
FFmpeg automatically passes @code{-fno-common} to the compiler to work around
|
||||
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
|
||||
|
||||
Notes:
|
||||
|
||||
@itemize
|
||||
|
||||
@item Building natively using MSYS can be sped up by disabling implicit rules
|
||||
in the Makefile by calling @code{make -r} instead of plain @code{make}. This
|
||||
speed up is close to non-existent for normal one-off builds and is only
|
||||
noticeable when running make for a second time (for example in
|
||||
@code{make install}).
|
||||
|
||||
@item In order to compile FFplay, you must have the MinGW development library
|
||||
of @uref{http://www.libsdl.org/, SDL}.
|
||||
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
|
||||
the MSYS command line.
|
||||
|
||||
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
||||
you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
|
||||
libavformat) as DLLs.
|
||||
|
||||
@end itemize
|
||||
|
||||
@section Microsoft Visual C++ compatibility
|
||||
|
||||
As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
|
||||
want to use the libav* libraries in your own applications, you can still
|
||||
compile those applications using MSVC++. But the libav* libraries you link
|
||||
to @emph{must} be built with MinGW. However, you will not be able to debug
|
||||
inside the libav* libraries, since MSVC++ does not recognize the debug
|
||||
symbols generated by GCC.
|
||||
We strongly recommend you to move over from MSVC++ to MinGW tools.
|
||||
|
||||
This description of how to use the FFmpeg libraries with MSVC++ is based on
|
||||
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
|
||||
you might have to modify the procedures slightly.
|
||||
|
||||
@subsection Using static libraries
|
||||
|
||||
Assuming you have just built and installed FFmpeg in @file{/usr/local}.
|
||||
|
||||
@enumerate
|
||||
|
||||
@item Create a new console application ("File / New / Project") and then
|
||||
select "Win32 Console Application". On the appropriate page of the
|
||||
Application Wizard, uncheck the "Precompiled headers" option.
|
||||
|
||||
@item Write the source code for your application, or, for testing, just
|
||||
copy the code from an existing sample application into the source file
|
||||
that MSVC++ has already created for you. For example, you can copy
|
||||
@file{libavformat/output-example.c} from the FFmpeg distribution.
|
||||
|
||||
@item Open the "Project / Properties" dialog box. In the "Configuration"
|
||||
combo box, select "All Configurations" so that the changes you make will
|
||||
affect both debug and release builds. In the tree view on the left hand
|
||||
side, select "C/C++ / General", then edit the "Additional Include
|
||||
Directories" setting to contain the path where the FFmpeg includes were
|
||||
installed (i.e. @file{c:\msys\1.0\local\include}).
|
||||
Do not add MinGW's include directory here, or the include files will
|
||||
conflict with MSVC's.
|
||||
|
||||
@item Still in the "Project / Properties" dialog box, select
|
||||
"Linker / General" from the tree view and edit the
|
||||
"Additional Library Directories" setting to contain the @file{lib}
|
||||
directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
|
||||
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
|
||||
and the directory where MinGW's GCC libs are installed
|
||||
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
|
||||
"Linker / Input" from the tree view, and add the files @file{libavformat.a},
|
||||
@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a},
|
||||
@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a})
|
||||
to the end of "Additional Dependencies".
|
||||
|
||||
@item Now, select "C/C++ / Code Generation" from the tree view. Select
|
||||
"Debug" in the "Configuration" combo box. Make sure that "Runtime
|
||||
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
||||
the "Configuration" combo box and make sure that "Runtime Library" is
|
||||
set to "Multi-threaded DLL".
|
||||
|
||||
@item Click "OK" to close the "Project / Properties" dialog box.
|
||||
|
||||
@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
|
||||
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
|
||||
and install it in MSVC++'s include directory
|
||||
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
|
||||
|
||||
@item MSVC++ also does not understand the @code{inline} keyword used by
|
||||
FFmpeg, so you must add this line before @code{#include}ing libav*:
|
||||
@example
|
||||
#define inline _inline
|
||||
@end example
|
||||
|
||||
@item Build your application, everything should work.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@subsection Using shared libraries
|
||||
|
||||
This is how to create DLL and LIB files that are compatible with MSVC++:
|
||||
|
||||
@enumerate
|
||||
|
||||
@item Add a call to @file{vcvars32.bat} (which sets up the environment
|
||||
variables for the Visual C++ tools) as the first line of @file{msys.bat}.
|
||||
The standard location for @file{vcvars32.bat} is
|
||||
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
|
||||
and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
|
||||
If this corresponds to your setup, add the following line as the first line
|
||||
of @file{msys.bat}:
|
||||
|
||||
@example
|
||||
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
||||
@end example
|
||||
|
||||
Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
|
||||
and run @file{c:\msys\1.0\msys.bat} from there.
|
||||
|
||||
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
|
||||
from @file{Microsoft (R) Library Manager}, this means your environment
|
||||
variables are set up correctly, the @file{Microsoft (R) Library Manager}
|
||||
is on the path and will be used by FFmpeg to create
|
||||
MSVC++-compatible import libraries.
|
||||
|
||||
@item Build FFmpeg with
|
||||
|
||||
@example
|
||||
./configure --enable-shared
|
||||
make
|
||||
make install
|
||||
@end example
|
||||
|
||||
Your install path (@file{/usr/local/} by default) should now have the
|
||||
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
|
||||
the static libraries, as described above. But in Step 4,
|
||||
you should only need to add the directory where the LIB files are installed
|
||||
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
|
||||
installed in the @file{bin} directory. And instead of adding the static
|
||||
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
|
||||
(@file{avcodec.lib}, @file{avformat.lib}, and
|
||||
@file{avutil.lib}). Note that you should not use the GCC import
|
||||
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
||||
reference errors. There should be no need for @file{libmingwex.a},
|
||||
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
||||
statically linked into the DLLs.
|
||||
|
||||
FFmpeg headers do not declare global data for Windows DLLs through the usual
|
||||
dllexport/dllimport interface. Such data will be exported properly while
|
||||
building, but to use them in your MSVC++ code you will have to edit the
|
||||
appropriate headers and mark the data as dllimport. For example, in
|
||||
libavutil/pixdesc.h you should have:
|
||||
@example
|
||||
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
|
||||
@end example
|
||||
|
||||
Note that using import libraries created by dlltool requires
|
||||
the linker optimization option to be set to
|
||||
"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
|
||||
the resulting binaries will fail during runtime. This isn't
|
||||
required when using import libraries generated by lib.exe.
|
||||
This issue is reported upstream at
|
||||
@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}
|
||||
@section Cross compilation for Windows with Linux
|
||||
|
||||
You must use the MinGW cross compilation tools available at
|
||||
@url{http://www.mingw.org/}.
|
||||
|
||||
Then configure FFmpeg with the following options:
|
||||
@example
|
||||
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
|
||||
@end example
|
||||
(you can change the cross-prefix according to the prefix chosen for the
|
||||
MinGW tools).
|
||||
|
||||
Then you can easily test FFmpeg with @uref{http://www.winehq.com/, Wine}.
|
||||
|
||||
@section Compilation under Cygwin
|
||||
|
||||
Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
|
||||
llrint() in its C library.
|
||||
|
||||
Install your Cygwin with all the "Base" packages, plus the
|
||||
following "Devel" ones:
|
||||
@example
|
||||
binutils, gcc4-core, make, git, mingw-runtime, texi2html
|
||||
@end example
|
||||
|
||||
And the following "Utils" one:
|
||||
@example
|
||||
diffutils
|
||||
@end example
|
||||
|
||||
Then run
|
||||
|
||||
@example
|
||||
./configure
|
||||
@end example
|
||||
|
||||
to make a static build.
|
||||
|
||||
The current @code{gcc4-core} package is buggy and needs this flag to build
|
||||
shared libraries:
|
||||
|
||||
@example
|
||||
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
|
||||
@end example
|
||||
|
||||
If you want to build FFmpeg with additional libraries, download Cygwin
|
||||
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
|
||||
@example
|
||||
libogg-devel, libvorbis-devel
|
||||
@end example
|
||||
|
||||
These library packages are only available from
|
||||
@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
|
||||
|
||||
@example
|
||||
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-devel, libgsm-devel,
|
||||
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
|
||||
libxvidcore-devel
|
||||
@end example
|
||||
|
||||
The recommendation for libnut and x264 is to build them from source by
|
||||
yourself, as they evolve too quickly for Cygwin Ports to be up to date.
|
||||
|
||||
Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
|
||||
of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports.
|
||||
|
||||
@section Crosscompilation for Windows under Cygwin
|
||||
|
||||
With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
|
||||
|
||||
Just install your Cygwin as explained before, plus these additional
|
||||
"Devel" packages:
|
||||
@example
|
||||
gcc-mingw-core, mingw-runtime, mingw-zlib
|
||||
@end example
|
||||
|
||||
and add some special flags to your configure invocation.
|
||||
|
||||
For a static build run
|
||||
@example
|
||||
./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||
@end example
|
||||
|
||||
and for a build with shared libraries
|
||||
@example
|
||||
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||
@end example
|
||||
|
||||
@bye
|
@@ -52,7 +52,7 @@ resource to be concatenated, each one possibly specifying a distinct
|
||||
protocol.
|
||||
|
||||
For example to read a sequence of files @file{split1.mpeg},
|
||||
@file{split2.mpeg}, @file{split3.mpeg} with @command{ffplay} use the
|
||||
@file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the
|
||||
command:
|
||||
@example
|
||||
ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
||||
@@ -67,7 +67,7 @@ File access protocol.
|
||||
|
||||
Allow to read from or read to a file.
|
||||
|
||||
For example to read from a file @file{input.mpeg} with @command{ffmpeg}
|
||||
For example to read from a file @file{input.mpeg} with @file{ffmpeg}
|
||||
use the command:
|
||||
@example
|
||||
ffmpeg -i file:input.mpeg output.mpeg
|
||||
@@ -134,14 +134,14 @@ pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number}
|
||||
is not specified, by default the stdout file descriptor will be used
|
||||
for writing, stdin for reading.
|
||||
|
||||
For example to read from stdin with @command{ffmpeg}:
|
||||
For example to read from stdin with @file{ffmpeg}:
|
||||
@example
|
||||
cat test.wav | ffmpeg -i pipe:0
|
||||
# ...this is the same as...
|
||||
cat test.wav | ffmpeg -i pipe:
|
||||
@end example
|
||||
|
||||
For writing to stdout with @command{ffmpeg}:
|
||||
For writing to stdout with @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
||||
# ...this is the same as...
|
||||
@@ -155,8 +155,8 @@ be seekable, so they will fail with the pipe output protocol.
|
||||
|
||||
Real-Time Messaging Protocol.
|
||||
|
||||
The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
|
||||
content across a TCP/IP network.
|
||||
The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
|
||||
dia content across a TCP/IP network.
|
||||
|
||||
The required syntax is:
|
||||
@example
|
||||
@@ -183,7 +183,7 @@ application specified in @var{app}, may be prefixed by "mp4:".
|
||||
|
||||
@end table
|
||||
|
||||
For example to read with @command{ffplay} a multimedia resource named
|
||||
For example to read with @file{ffplay} a multimedia resource named
|
||||
"sample" from the application "vod" from an RTMP server "myserver":
|
||||
@example
|
||||
ffplay rtmp://myserver/vod/sample
|
||||
@@ -195,7 +195,7 @@ Real-Time Messaging Protocol and its variants supported through
|
||||
librtmp.
|
||||
|
||||
Requires the presence of the librtmp headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
configuration. You need to explicitely configure the build with
|
||||
"--enable-librtmp". If enabled this will replace the native RTMP
|
||||
protocol.
|
||||
|
||||
@@ -219,12 +219,12 @@ meaning as specified for the RTMP native protocol.
|
||||
See the librtmp manual page (man 3 librtmp) for more information.
|
||||
|
||||
For example, to stream a file in real-time to an RTMP server using
|
||||
@command{ffmpeg}:
|
||||
@file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
|
||||
@end example
|
||||
|
||||
To play the same stream using @command{ffplay}:
|
||||
To play the same stream using @file{ffplay}:
|
||||
@example
|
||||
ffplay "rtmp://myserver/live/mystream live=1"
|
||||
@end example
|
||||
@@ -242,19 +242,16 @@ data transferred over RDT).
|
||||
|
||||
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
|
||||
@uref{http://github.com/revmischa/rtsp-server, RTSP server}).
|
||||
RTSP server, @url{http://github.com/revmischa/rtsp-server}).
|
||||
|
||||
The required syntax for a RTSP url is:
|
||||
@example
|
||||
rtsp://@var{hostname}[:@var{port}]/@var{path}
|
||||
rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}]
|
||||
@end example
|
||||
|
||||
The following options (set on the @command{ffmpeg}/@command{ffplay} command
|
||||
line, or set in code via @code{AVOption}s or in @code{avformat_open_input}),
|
||||
@var{options} is a @code{&}-separated list. The following options
|
||||
are supported:
|
||||
|
||||
Flags for @code{rtsp_transport}:
|
||||
|
||||
@table @option
|
||||
|
||||
@item udp
|
||||
@@ -264,31 +261,27 @@ Use UDP as lower transport protocol.
|
||||
Use TCP (interleaving within the RTSP control channel) as lower
|
||||
transport protocol.
|
||||
|
||||
@item udp_multicast
|
||||
@item multicast
|
||||
Use UDP multicast as lower transport protocol.
|
||||
|
||||
@item http
|
||||
Use HTTP tunneling as lower transport protocol, which is useful for
|
||||
passing proxies.
|
||||
|
||||
@item filter_src
|
||||
Accept packets only from negotiated peer address and port.
|
||||
@end table
|
||||
|
||||
Multiple lower transport protocols may be specified, in that case they are
|
||||
tried one at a time (if the setup of one fails, the next one is tried).
|
||||
For the muxer, only the @code{tcp} and @code{udp} options are supported.
|
||||
|
||||
Flags for @code{rtsp_flags}:
|
||||
|
||||
@table @option
|
||||
@item filter_src
|
||||
Accept packets only from negotiated peer address and port.
|
||||
@end table
|
||||
|
||||
When receiving data over UDP, the demuxer tries to reorder received packets
|
||||
(since they may arrive out of order, or packets may get lost totally). In
|
||||
order for this to be enabled, a maximum delay must be specified in the
|
||||
@code{max_delay} field of AVFormatContext.
|
||||
|
||||
When watching multi-bitrate Real-RTSP streams with @command{ffplay}, the
|
||||
When watching multi-bitrate Real-RTSP streams with @file{ffplay}, the
|
||||
streams to display can be chosen with @code{-vst} @var{n} and
|
||||
@code{-ast} @var{n} for video and audio respectively, and can be switched
|
||||
on the fly by pressing @code{v} and @code{a}.
|
||||
@@ -298,13 +291,13 @@ Example command lines:
|
||||
To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
|
||||
|
||||
@example
|
||||
ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
|
||||
ffplay -max_delay 500000 rtsp://server/video.mp4?udp
|
||||
@end example
|
||||
|
||||
To watch a stream tunneled over HTTP:
|
||||
|
||||
@example
|
||||
ffplay -rtsp_transport http rtsp://server/video.mp4
|
||||
ffplay rtsp://server/video.mp4?http
|
||||
@end example
|
||||
|
||||
To send a stream in realtime to a RTSP server, for others to watch:
|
||||
@@ -365,13 +358,13 @@ To broadcast a stream on the local subnet, for watching in VLC:
|
||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
|
||||
@end example
|
||||
|
||||
Similarly, for watching in @command{ffplay}:
|
||||
Similarly, for watching in ffplay:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255
|
||||
@end example
|
||||
|
||||
And for watching in @command{ffplay}, over IPv6:
|
||||
And for watching in ffplay, over IPv6:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
|
||||
@@ -446,11 +439,6 @@ set the UDP buffer size in bytes
|
||||
@item localport=@var{port}
|
||||
override the local UDP port to bind with
|
||||
|
||||
@item localaddr=@var{addr}
|
||||
Choose the local IP address. This is useful e.g. if sending multicast
|
||||
and the host has multiple interfaces, where the user can choose
|
||||
which interface to send on by specifying the IP address of that interface.
|
||||
|
||||
@item pkt_size=@var{size}
|
||||
set the size in bytes of UDP packets
|
||||
|
||||
@@ -472,7 +460,7 @@ For receiving, this gives the benefit of only receiving packets from
|
||||
the specified peer address/port.
|
||||
@end table
|
||||
|
||||
Some usage examples of the udp protocol with @command{ffmpeg} follow.
|
||||
Some usage examples of the udp protocol with @file{ffmpeg} follow.
|
||||
|
||||
To stream over UDP to a remote endpoint:
|
||||
@example
|
||||
|
@@ -18,7 +18,7 @@ essential that changes to their codebase are publicly visible, clean and
|
||||
easy reviewable that again leads us to:
|
||||
* use of a revision control system like git
|
||||
* separation of cosmetic from non-cosmetic changes (this is almost entirely
|
||||
ignored by mentors and students in soc 2006 which might lead to a surprise
|
||||
ignored by mentors and students in soc 2006 which might lead to a suprise
|
||||
when the code will be reviewed at the end before a possible inclusion in
|
||||
FFmpeg, individual changes were generally not reviewable due to cosmetics).
|
||||
* frequent commits, so that comments can be provided early
|
||||
|
@@ -1,46 +0,0 @@
|
||||
The official guide to swresample for confused developers.
|
||||
=========================================================
|
||||
|
||||
Current (simplified) Architecture:
|
||||
---------------------------------
|
||||
Input
|
||||
v
|
||||
__________________/|\___________
|
||||
/ | \
|
||||
/ input sample format convert v
|
||||
/ | ___________/
|
||||
| |/
|
||||
| v
|
||||
| ___________/|\___________ _____________
|
||||
| / | \ | |
|
||||
| Rematrix | resample <---->| Buffers |
|
||||
| \___________ | ___________/ |_____________|
|
||||
v \|/
|
||||
Special Converter v
|
||||
v ___________/|\___________ _____________
|
||||
| / | \ | |
|
||||
| Rematrix | resample <---->| Buffers |
|
||||
| \___________ | ___________/ |_____________|
|
||||
| \|/
|
||||
| v
|
||||
| |\___________
|
||||
\ | \
|
||||
\ output sample format convert v
|
||||
\_________________ | ___________/
|
||||
\|/
|
||||
v
|
||||
Output
|
||||
|
||||
Planar/Packed convertion is done when needed during sample format convertion
|
||||
Every step can be skiped without memcpy when its not needed.
|
||||
Either Resampling and Rematrixing can be performed first depending on which
|
||||
way its faster.
|
||||
The Buffers are needed for resampling due to resamplng being a process that
|
||||
requires future and past data, it thus also introduces inevitably a delay when
|
||||
used.
|
||||
Internally 32bit float and 16bit int is supported currently, other formats can
|
||||
easily be added
|
||||
Externally all sample formats in packed and planar configuration are supported
|
||||
Its also trivial to add special converters for common cases
|
||||
If only sample format and or packed/planar convertion is needed it
|
||||
is performed from input to output directly in a single pass with no intermediates.
|
156
doc/t2h.init
156
doc/t2h.init
@@ -1,161 +1,15 @@
|
||||
# no horiz rules between sections
|
||||
$end_section = \&FFmpeg_end_section;
|
||||
sub FFmpeg_end_section($$)
|
||||
$end_section = \&FFMPEG_end_section;
|
||||
sub FFMPEG_end_section($$)
|
||||
{
|
||||
}
|
||||
|
||||
$EXTRA_HEAD =
|
||||
'<link rel="icon" href="favicon.png" type="image/png" />
|
||||
<link rel="stylesheet" type="text/css" href="default.css" />
|
||||
';
|
||||
|
||||
$CSS_LINES = <<EOT;
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter { text-decoration: none }
|
||||
a { color: #2D6198; }
|
||||
a:visited { color: #884488; }
|
||||
h1 a, h2 a, h3 a { text-decoration: inherit; color: inherit; }
|
||||
p { margin-left: 1em; margin-right: 1em; }
|
||||
table { margin-left: 2em; }
|
||||
pre { margin-left: 2em; }
|
||||
#footer { text-align: center; }
|
||||
#body { margin-left: 1em; margin-right: 1em; }
|
||||
body { background-color: #313131; margin: 0; }
|
||||
|
||||
#container {
|
||||
background-color: white;
|
||||
color: #202020;
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background-color: #7BB37B;
|
||||
border: 1px solid #6A996A;
|
||||
color: #151515;
|
||||
font-size: 1.2em;
|
||||
padding-bottom: 0.2em;
|
||||
padding-left: 0.4em;
|
||||
padding-top: 0.2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #313131;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #313131;
|
||||
font-size: 0.8em;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
|
||||
.note {
|
||||
margin: 1em;
|
||||
border: 1px solid #bbc9d8;
|
||||
background-color: #dde1e1;
|
||||
}
|
||||
|
||||
.important {
|
||||
margin: 1em;
|
||||
border: 1px solid #d26767;
|
||||
background-color: #f8e1e1;
|
||||
}
|
||||
|
||||
-->
|
||||
</style>
|
||||
EOT
|
||||
|
||||
my $FFMPEG_NAVBAR = $ENV{"FFMPEG_NAVBAR"} || '';
|
||||
|
||||
$AFTER_BODY_OPEN =
|
||||
'<div id="container">' .
|
||||
"\n$FFMPEG_NAVBAR\n" .
|
||||
'<div id="body">';
|
||||
|
||||
$PRE_BODY_CLOSE = '</div></div>';
|
||||
|
||||
$SMALL_RULE = '';
|
||||
$BODYTEXT = '';
|
||||
|
||||
$print_page_foot = \&FFmpeg_print_page_foot;
|
||||
sub FFmpeg_print_page_foot($$)
|
||||
$print_page_foot = \&FFMPEG_print_page_foot;
|
||||
sub FFMPEG_print_page_foot($$)
|
||||
{
|
||||
my $fh = shift;
|
||||
print $fh '<div id="footer">' . "\n";
|
||||
print $fh "$SMALL_RULE\n";
|
||||
T2H_DEFAULT_print_page_foot($fh);
|
||||
print $fh "</div>\n";
|
||||
}
|
||||
|
||||
$float = \&FFmpeg_float;
|
||||
|
||||
sub FFmpeg_float($$$$)
|
||||
{
|
||||
my $text = shift;
|
||||
my $float = shift;
|
||||
my $caption = shift;
|
||||
my $shortcaption = shift;
|
||||
|
||||
my $label = '';
|
||||
if (exists($float->{'id'}))
|
||||
{
|
||||
$label = &$anchor($float->{'id'});
|
||||
}
|
||||
my $class = '';
|
||||
my $subject = '';
|
||||
|
||||
if ($caption =~ /NOTE/)
|
||||
{
|
||||
$class = "note";
|
||||
}
|
||||
elsif ($caption =~ /IMPORTANT/)
|
||||
{
|
||||
$class = "important";
|
||||
}
|
||||
|
||||
return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
|
||||
}
|
||||
|
||||
$print_page_head = \&FFmpeg_print_page_head;
|
||||
sub FFmpeg_print_page_head($$)
|
||||
{
|
||||
my $fh = shift;
|
||||
my $longtitle = "$Texi2HTML::THISDOC{'title_no_texi'}";
|
||||
$longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
|
||||
my $description = $DOCUMENT_DESCRIPTION;
|
||||
$description = $longtitle if (!defined($description));
|
||||
$description = "<meta name=\"description\" content=\"$description\">" if
|
||||
($description ne '');
|
||||
$description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
|
||||
my $encoding = '';
|
||||
$encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
|
||||
$longtitle =~ s/Documentation.*//g;
|
||||
$longtitle = "FFmpeg documentation : " . $longtitle;
|
||||
|
||||
print $fh <<EOT;
|
||||
$DOCTYPE
|
||||
<html>
|
||||
$Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
|
||||
<!--
|
||||
$Texi2HTML::THISDOC{program_authors}
|
||||
-->
|
||||
<head>
|
||||
<title>$longtitle</title>
|
||||
|
||||
$description
|
||||
<meta name="keywords" content="$longtitle">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
|
||||
$encoding
|
||||
$CSS_LINES
|
||||
$EXTRA_HEAD
|
||||
</head>
|
||||
|
||||
<body $BODYTEXT>
|
||||
$AFTER_BODY_OPEN
|
||||
EOT
|
||||
}
|
||||
|
||||
# no navigation elements
|
||||
|
@@ -352,7 +352,6 @@ sub postprocess
|
||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||
s/\@ref\{([^\}]*)\}/$1/g;
|
||||
s/\@noindent\s*//g;
|
||||
s/\@refill//g;
|
||||
s/\@gol//g;
|
||||
|
4
ffpresets/libx264-baseline.ffpreset
Normal file
4
ffpresets/libx264-baseline.ffpreset
Normal file
@@ -0,0 +1,4 @@
|
||||
coder=0
|
||||
bf=0
|
||||
flags2=-wpred-dct8x8
|
||||
wpredp=0
|
7
ffpresets/libx264-ipod320.ffpreset
Normal file
7
ffpresets/libx264-ipod320.ffpreset
Normal file
@@ -0,0 +1,7 @@
|
||||
coder=0
|
||||
bf=0
|
||||
flags2=-wpred-dct8x8
|
||||
level=13
|
||||
maxrate=768000
|
||||
bufsize=3000000
|
||||
wpredp=0
|
8
ffpresets/libx264-ipod640.ffpreset
Normal file
8
ffpresets/libx264-ipod640.ffpreset
Normal file
@@ -0,0 +1,8 @@
|
||||
coder=0
|
||||
bf=0
|
||||
refs=1
|
||||
flags2=-wpred-dct8x8
|
||||
level=30
|
||||
maxrate=10000000
|
||||
bufsize=10000000
|
||||
wpredp=0
|
20
ffpresets/libx264-lossless_fast.ffpreset
Normal file
20
ffpresets/libx264-lossless_fast.ffpreset
Normal file
@@ -0,0 +1,20 @@
|
||||
coder=0
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8+parti4x4+partp8x8-partp4x4-partb8x8
|
||||
me_method=hex
|
||||
subq=3
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
cqp=0
|
||||
wpredp=0
|
21
ffpresets/libx264-lossless_max.ffpreset
Normal file
21
ffpresets/libx264-lossless_max.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=esa
|
||||
subq=8
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
refs=16
|
||||
directpred=1
|
||||
flags2=+mixed_refs+dct8x8+fastpskip
|
||||
cqp=0
|
||||
wpredp=2
|
20
ffpresets/libx264-lossless_medium.ffpreset
Normal file
20
ffpresets/libx264-lossless_medium.ffpreset
Normal file
@@ -0,0 +1,20 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=hex
|
||||
subq=5
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
cqp=0
|
||||
wpredp=2
|
21
ffpresets/libx264-lossless_slow.ffpreset
Normal file
21
ffpresets/libx264-lossless_slow.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=umh
|
||||
subq=6
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
refs=2
|
||||
directpred=1
|
||||
flags2=+dct8x8+fastpskip
|
||||
cqp=0
|
||||
wpredp=2
|
21
ffpresets/libx264-lossless_slower.ffpreset
Normal file
21
ffpresets/libx264-lossless_slower.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=umh
|
||||
subq=8
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
refs=4
|
||||
directpred=1
|
||||
flags2=+mixed_refs+dct8x8+fastpskip
|
||||
cqp=0
|
||||
wpredp=2
|
19
ffpresets/libx264-lossless_ultrafast.ffpreset
Normal file
19
ffpresets/libx264-lossless_ultrafast.ffpreset
Normal file
@@ -0,0 +1,19 @@
|
||||
coder=0
|
||||
flags=+loop+cgop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
|
||||
me_method=dia
|
||||
subq=0
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
cqp=0
|
360
ffserver.c
360
ffserver.c
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* G.729, G729 Annex D decoders
|
||||
* Copyright (c) 2008 Vladimir Voroshilov
|
||||
* Multiple format streaming server
|
||||
* copyright (c) 2002 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
@@ -18,12 +18,11 @@
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#ifndef AVCODEC_G729_H
|
||||
#define AVCODEC_G729_H
|
||||
#ifndef FFMPEG_FFSERVER_H
|
||||
#define FFMPEG_FFSERVER_H
|
||||
|
||||
/**
|
||||
* subframe size
|
||||
*/
|
||||
#define SUBFRAME_SIZE 40
|
||||
/* interface between ffserver and modules */
|
||||
|
||||
#endif // AVCODEC_G729_H
|
||||
void ffserver_module_init(void);
|
||||
|
||||
#endif /* FFMPEG_FFSERVER_H */
|
134
libavcodec/4xm.c
134
libavcodec/4xm.c
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/avassert.h"
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "get_bits.h"
|
||||
@@ -133,8 +132,10 @@ typedef struct FourXContext{
|
||||
AVFrame current_picture, last_picture;
|
||||
GetBitContext pre_gb; ///< ac/dc prefix
|
||||
GetBitContext gb;
|
||||
GetByteContext g;
|
||||
GetByteContext g2;
|
||||
const uint8_t *bytestream;
|
||||
const uint8_t *bytestream_end;
|
||||
const uint16_t *wordstream;
|
||||
const uint16_t *wordstream_end;
|
||||
int mv[256];
|
||||
VLC pre_vlc;
|
||||
int last_dc;
|
||||
@@ -329,11 +330,11 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
||||
assert(code>=0 && code<=6);
|
||||
|
||||
if(code == 0){
|
||||
if (f->g.buffer_end - f->g.buffer < 1){
|
||||
if (f->bytestream_end - f->bytestream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||
return;
|
||||
}
|
||||
src += f->mv[ *f->g.buffer++ ];
|
||||
src += f->mv[ *f->bytestream++ ];
|
||||
if(start > src || src > end){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
return;
|
||||
@@ -348,47 +349,39 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
||||
decode_p_block(f, dst , src , log2w, log2h, stride);
|
||||
decode_p_block(f, dst + (1<<log2w), src + (1<<log2w), log2w, log2h, stride);
|
||||
}else if(code == 3 && f->version<2){
|
||||
if (start > src || src > end) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
return;
|
||||
}
|
||||
mcdc(dst, src, log2w, h, stride, 1, 0);
|
||||
}else if(code == 4){
|
||||
if (f->g.buffer_end - f->g.buffer < 1){
|
||||
if (f->bytestream_end - f->bytestream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||
return;
|
||||
}
|
||||
src += f->mv[ *f->g.buffer++ ];
|
||||
src += f->mv[ *f->bytestream++ ];
|
||||
if(start > src || src > end){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
return;
|
||||
}
|
||||
if (f->g2.buffer_end - f->g2.buffer < 1){
|
||||
if (f->wordstream_end - f->wordstream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
return;
|
||||
}
|
||||
mcdc(dst, src, log2w, h, stride, 1, bytestream2_get_le16(&f->g2));
|
||||
mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));
|
||||
}else if(code == 5){
|
||||
if (f->g2.buffer_end - f->g2.buffer < 1){
|
||||
if (f->wordstream_end - f->wordstream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
return;
|
||||
}
|
||||
if (start > src || src > end) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
return;
|
||||
}
|
||||
mcdc(dst, src, log2w, h, stride, 0, bytestream2_get_le16(&f->g2));
|
||||
mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
|
||||
}else if(code == 6){
|
||||
if (f->g2.buffer_end - f->g2.buffer < 2){
|
||||
if (f->wordstream_end - f->wordstream < 2){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
return;
|
||||
}
|
||||
if(log2w){
|
||||
dst[0] = bytestream2_get_le16(&f->g2);
|
||||
dst[1] = bytestream2_get_le16(&f->g2);
|
||||
dst[0] = av_le2ne16(*f->wordstream++);
|
||||
dst[1] = av_le2ne16(*f->wordstream++);
|
||||
}else{
|
||||
dst[0 ] = bytestream2_get_le16(&f->g2);
|
||||
dst[stride] = bytestream2_get_le16(&f->g2);
|
||||
dst[0 ] = av_le2ne16(*f->wordstream++);
|
||||
dst[stride] = av_le2ne16(*f->wordstream++);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,7 +393,7 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
uint16_t *src= (uint16_t*)f->last_picture.data[0];
|
||||
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
||||
const int stride= f->current_picture.linesize[0]>>1;
|
||||
unsigned int bitstream_size, bytestream_size, wordstream_size, extra, bytestream_offset, wordstream_offset;
|
||||
unsigned int bitstream_size, bytestream_size, wordstream_size, extra;
|
||||
|
||||
if(f->version>1){
|
||||
extra=20;
|
||||
@@ -432,10 +425,10 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
memset((uint8_t*)f->bitstream_buffer + bitstream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size);
|
||||
|
||||
wordstream_offset = extra + bitstream_size;
|
||||
bytestream_offset = extra + bitstream_size + wordstream_size;
|
||||
bytestream2_init(&f->g2, buf + wordstream_offset, length - wordstream_offset);
|
||||
bytestream2_init(&f->g, buf + bytestream_offset, length - bytestream_offset);
|
||||
f->wordstream= (const uint16_t*)(buf + extra + bitstream_size);
|
||||
f->wordstream_end= f->wordstream + wordstream_size/2;
|
||||
f->bytestream= buf + extra + bitstream_size + wordstream_size;
|
||||
f->bytestream_end = f->bytestream + bytestream_size;
|
||||
|
||||
init_mv(f);
|
||||
|
||||
@@ -447,6 +440,15 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
dst += 8*stride;
|
||||
}
|
||||
|
||||
if( bitstream_size != (get_bits_count(&f->gb)+31)/32*4
|
||||
|| (((const char*)f->wordstream - (const char*)buf + 2)&~2) != extra + bitstream_size + wordstream_size
|
||||
|| (((const char*)f->bytestream - (const char*)buf + 3)&~3) != extra + bitstream_size + wordstream_size + bytestream_size)
|
||||
av_log(f->avctx, AV_LOG_ERROR, " %d %td %td bytes left\n",
|
||||
bitstream_size - (get_bits_count(&f->gb)+31)/32*4,
|
||||
-(((const char*)f->bytestream - (const char*)buf + 3)&~3) + (extra + bitstream_size + wordstream_size + bytestream_size),
|
||||
-(((const char*)f->wordstream - (const char*)buf + 2)&~2) + (extra + bitstream_size + wordstream_size)
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -457,11 +459,6 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
static int decode_i_block(FourXContext *f, DCTELEM *block){
|
||||
int code, i, j, level, val;
|
||||
|
||||
if(get_bits_left(&f->gb) < 2){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* DC coef */
|
||||
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
|
||||
if (val>>4){
|
||||
@@ -652,17 +649,9 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
int x, y, x2, y2;
|
||||
const int width= f->avctx->width;
|
||||
const int height= f->avctx->height;
|
||||
const int mbs = (FFALIGN(width, 16) >> 4) * (FFALIGN(height, 16) >> 4);
|
||||
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
||||
const int stride= f->current_picture.linesize[0]>>1;
|
||||
const uint8_t *buf_end = buf + length;
|
||||
GetByteContext g3;
|
||||
|
||||
if(length < mbs * 8) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
bytestream2_init(&g3, buf, length);
|
||||
|
||||
for(y=0; y<height; y+=16){
|
||||
for(x=0; x<width; x+=16){
|
||||
@@ -671,16 +660,16 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
return -1;
|
||||
memset(color, 0, sizeof(color));
|
||||
//warning following is purely guessed ...
|
||||
color[0]= bytestream2_get_le16u(&g3);
|
||||
color[1]= bytestream2_get_le16u(&g3);
|
||||
color[0]= bytestream_get_le16(&buf);
|
||||
color[1]= bytestream_get_le16(&buf);
|
||||
|
||||
if(color[0]&0x8000) av_log(f->avctx, AV_LOG_ERROR, "unk bit 1\n");
|
||||
if(color[1]&0x8000) av_log(f->avctx, AV_LOG_ERROR, "unk bit 2\n");
|
||||
if(color[0]&0x8000) av_log(NULL, AV_LOG_ERROR, "unk bit 1\n");
|
||||
if(color[1]&0x8000) av_log(NULL, AV_LOG_ERROR, "unk bit 2\n");
|
||||
|
||||
color[2]= mix(color[0], color[1]);
|
||||
color[3]= mix(color[1], color[0]);
|
||||
|
||||
bits= bytestream2_get_le32u(&g3);
|
||||
bits= bytestream_get_le32(&buf);
|
||||
for(y2=0; y2<16; y2++){
|
||||
for(x2=0; x2<16; x2++){
|
||||
int index= 2*(x2>>2) + 8*(y2>>2);
|
||||
@@ -689,7 +678,7 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
}
|
||||
dst+=16;
|
||||
}
|
||||
dst += 16 * stride - x;
|
||||
dst += 16*stride - width;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -699,13 +688,12 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
int x, y;
|
||||
const int width= f->avctx->width;
|
||||
const int height= f->avctx->height;
|
||||
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
||||
const int stride= f->current_picture.linesize[0]>>1;
|
||||
const unsigned int bitstream_size= AV_RL32(buf);
|
||||
unsigned int prestream_size;
|
||||
const uint8_t *prestream;
|
||||
|
||||
if (bitstream_size > (1 << 26))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (length < bitstream_size + 12) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -714,19 +702,15 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
prestream_size = 4 * AV_RL32(buf + bitstream_size + 4);
|
||||
prestream = buf + bitstream_size + 12;
|
||||
|
||||
if(prestream_size + bitstream_size + 12 != length
|
||||
|| prestream_size > (1<<26)){
|
||||
if (prestream_size > (1<<26) ||
|
||||
prestream_size != length - (bitstream_size + 12)){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n", prestream_size, bitstream_size, length);
|
||||
return -1;
|
||||
}
|
||||
|
||||
prestream = read_huffman_tables(f, prestream, prestream_size);
|
||||
if (!prestream) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
av_assert0(prestream <= buf + length);
|
||||
prestream= read_huffman_tables(f, prestream, buf + length - prestream);
|
||||
if (!prestream)
|
||||
return -1;
|
||||
|
||||
init_get_bits(&f->gb, buf + 4, 8*bitstream_size);
|
||||
|
||||
@@ -748,6 +732,7 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
|
||||
idct_put(f, x, y);
|
||||
}
|
||||
dst += 16*stride;
|
||||
}
|
||||
|
||||
if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256)
|
||||
@@ -821,9 +806,6 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n", id, avctx->frame_number);
|
||||
}
|
||||
|
||||
if (f->version <= 1)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
cfrm->size= cfrm->id= 0;
|
||||
frame_4cc= AV_RL32("pfrm");
|
||||
}else
|
||||
@@ -842,7 +824,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management
|
||||
|
||||
p->reference= 3;
|
||||
p->reference= 1;
|
||||
if (avctx->reget_buffer(avctx, p) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
|
||||
return -1;
|
||||
@@ -850,7 +832,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
if(frame_4cc == AV_RL32("ifr2")){
|
||||
p->pict_type= AV_PICTURE_TYPE_I;
|
||||
if(decode_i2_frame(f, buf-4, frame_size + 4) < 0) {
|
||||
if(decode_i2_frame(f, buf-4, frame_size+4) < 0){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "decode i2 frame failed\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -862,12 +844,11 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
}
|
||||
}else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
|
||||
if(!f->last_picture.data[0]){
|
||||
f->last_picture.reference= 3;
|
||||
f->last_picture.reference= 1;
|
||||
if(avctx->get_buffer(avctx, &f->last_picture) < 0){
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return -1;
|
||||
}
|
||||
memset(f->last_picture.data[0], 0, avctx->height * FFABS(f->last_picture.linesize[0]));
|
||||
}
|
||||
|
||||
p->pict_type= AV_PICTURE_TYPE_P;
|
||||
@@ -935,7 +916,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
|
||||
av_freep(&f->cfrm[i].data);
|
||||
f->cfrm[i].allocated_size= 0;
|
||||
}
|
||||
ff_free_vlc(&f->pre_vlc);
|
||||
free_vlc(&f->pre_vlc);
|
||||
if(f->current_picture.data[0])
|
||||
avctx->release_buffer(avctx, &f->current_picture);
|
||||
if(f->last_picture.data[0])
|
||||
@@ -945,14 +926,15 @@ static av_cold int decode_end(AVCodecContext *avctx){
|
||||
}
|
||||
|
||||
AVCodec ff_fourxm_decoder = {
|
||||
.name = "4xm",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_4XM,
|
||||
.priv_data_size = sizeof(FourXContext),
|
||||
.init = decode_init,
|
||||
.close = decode_end,
|
||||
.decode = decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
"4xm",
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_ID_4XM,
|
||||
sizeof(FourXContext),
|
||||
decode_init,
|
||||
NULL,
|
||||
decode_end,
|
||||
decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||
};
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
*
|
||||
* Supports: PAL8 (RGB 8bpp, paletted)
|
||||
* : BGR24 (RGB 24bpp) (can also output it as RGB32)
|
||||
* : RGB32 (RGB 32bpp, 4th plane is alpha)
|
||||
* : RGB32 (RGB 32bpp, 4th plane is probably alpha and it's ignored)
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -50,8 +50,6 @@ typedef struct EightBpsContext {
|
||||
|
||||
unsigned char planes;
|
||||
unsigned char planemap[4];
|
||||
|
||||
uint32_t pal[256];
|
||||
} EightBpsContext;
|
||||
|
||||
|
||||
@@ -71,6 +69,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
unsigned int dlen, p, row;
|
||||
const unsigned char *lp, *dp;
|
||||
unsigned char count;
|
||||
unsigned int px_inc;
|
||||
unsigned int planes = c->planes;
|
||||
unsigned char *planemap = c->planemap;
|
||||
|
||||
@@ -87,6 +86,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
/* Set data pointer after line lengths */
|
||||
dp = encoded + planes * (height << 1);
|
||||
|
||||
/* Ignore alpha plane, don't know what to do with it */
|
||||
if (planes == 4)
|
||||
planes--;
|
||||
|
||||
px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGB32);
|
||||
|
||||
for (p = 0; p < planes; p++) {
|
||||
/* Lines length pointer for this plane */
|
||||
lp = encoded + p * (height << 1);
|
||||
@@ -102,20 +107,20 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
if ((count = *dp++) <= 127) {
|
||||
count++;
|
||||
dlen -= count + 1;
|
||||
if (pixptr + count * planes > pixptr_end)
|
||||
if (pixptr + count * px_inc > pixptr_end)
|
||||
break;
|
||||
if(dp + count > buf+buf_size) return -1;
|
||||
while(count--) {
|
||||
*pixptr = *dp++;
|
||||
pixptr += planes;
|
||||
pixptr += px_inc;
|
||||
}
|
||||
} else {
|
||||
count = 257 - count;
|
||||
if (pixptr + count * planes > pixptr_end)
|
||||
if (pixptr + count * px_inc > pixptr_end)
|
||||
break;
|
||||
while(count--) {
|
||||
*pixptr = *dp;
|
||||
pixptr += planes;
|
||||
pixptr += px_inc;
|
||||
}
|
||||
dp++;
|
||||
dlen -= 2;
|
||||
@@ -124,16 +129,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
}
|
||||
}
|
||||
|
||||
if (avctx->bits_per_coded_sample <= 8) {
|
||||
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
||||
AV_PKT_DATA_PALETTE,
|
||||
NULL);
|
||||
if (pal) {
|
||||
if (avctx->palctrl) {
|
||||
memcpy (c->pic.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||
if (avctx->palctrl->palette_changed) {
|
||||
c->pic.palette_has_changed = 1;
|
||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
||||
}
|
||||
|
||||
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
||||
avctx->palctrl->palette_changed = 0;
|
||||
} else
|
||||
c->pic.palette_has_changed = 0;
|
||||
}
|
||||
|
||||
*data_size = sizeof(AVFrame);
|
||||
@@ -163,6 +165,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
c->planes = 1;
|
||||
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;
|
||||
case 24:
|
||||
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
||||
@@ -178,12 +184,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
c->planemap[0] = 1; // 1st plane is red
|
||||
c->planemap[1] = 2; // 2nd plane is green
|
||||
c->planemap[2] = 3; // 3rd plane is blue
|
||||
c->planemap[3] = 0; // 4th plane is alpha
|
||||
c->planemap[3] = 0; // 4th plane is alpha???
|
||||
#else
|
||||
c->planemap[0] = 2; // 1st plane is red
|
||||
c->planemap[1] = 1; // 2nd plane is green
|
||||
c->planemap[2] = 0; // 3rd plane is blue
|
||||
c->planemap[3] = 3; // 4th plane is alpha
|
||||
c->planemap[3] = 3; // 4th plane is alpha???
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
@@ -215,13 +221,14 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
||||
|
||||
|
||||
AVCodec ff_eightbps_decoder = {
|
||||
.name = "8bps",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_8BPS,
|
||||
.priv_data_size = sizeof(EightBpsContext),
|
||||
.init = decode_init,
|
||||
.close = decode_end,
|
||||
.decode = decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||
"8bps",
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_ID_8BPS,
|
||||
sizeof(EightBpsContext),
|
||||
decode_init,
|
||||
NULL,
|
||||
decode_end,
|
||||
decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||
};
|
||||
|
@@ -22,8 +22,6 @@
|
||||
/**
|
||||
* @file
|
||||
* 8svx audio decoder
|
||||
* @author Jaikrishnan Menon
|
||||
*
|
||||
* supports: fibonacci delta encoding
|
||||
* : exponential encoding
|
||||
*
|
||||
@@ -41,13 +39,12 @@
|
||||
|
||||
/** decoder context */
|
||||
typedef struct EightSvxContext {
|
||||
AVFrame frame;
|
||||
const int8_t *table;
|
||||
|
||||
/* buffer used to store the whole audio decoded/interleaved chunk,
|
||||
* which is sent with the first packet */
|
||||
uint8_t *samples;
|
||||
int64_t samples_size;
|
||||
size_t samples_size;
|
||||
int samples_idx;
|
||||
} EightSvxContext;
|
||||
|
||||
@@ -100,19 +97,18 @@ static int delta_decode(int8_t *dst, const uint8_t *src, int src_size,
|
||||
return dst-dst0;
|
||||
}
|
||||
|
||||
/** decode a frame */
|
||||
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int *got_frame_ptr, AVPacket *avpkt)
|
||||
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
AVPacket *avpkt)
|
||||
{
|
||||
EightSvxContext *esc = avctx->priv_data;
|
||||
int n, out_data_size, ret;
|
||||
int out_data_size, n;
|
||||
uint8_t *src, *dst;
|
||||
|
||||
/* decode and interleave the first packet */
|
||||
if (!esc->samples && avpkt) {
|
||||
uint8_t *deinterleaved_samples, *p = NULL;
|
||||
uint8_t *deinterleaved_samples;
|
||||
|
||||
esc->samples_size = avctx->codec->id == CODEC_ID_8SVX_RAW || avctx->codec->id ==CODEC_ID_PCM_S8_PLANAR?
|
||||
esc->samples_size = avctx->codec->id == CODEC_ID_8SVX_RAW ?
|
||||
avpkt->size : avctx->channels + (avpkt->size-avctx->channels) * 2;
|
||||
if (!(esc->samples = av_malloc(esc->samples_size)))
|
||||
return AVERROR(ENOMEM);
|
||||
@@ -123,13 +119,8 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int buf_size = avpkt->size;
|
||||
int n = esc->samples_size;
|
||||
|
||||
if (buf_size < 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (!(deinterleaved_samples = av_mallocz(n)))
|
||||
return AVERROR(ENOMEM);
|
||||
p = deinterleaved_samples;
|
||||
|
||||
/* the uncompressed starting value is contained in the first byte */
|
||||
if (avctx->channels == 2) {
|
||||
@@ -146,25 +137,21 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
||||
interleave_stereo(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||
else
|
||||
memcpy(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||
av_freep(&p);
|
||||
}
|
||||
|
||||
/* get output buffer */
|
||||
esc->frame.nb_samples = (FFMIN(MAX_FRAME_SIZE, esc->samples_size - esc->samples_idx) +avctx->channels-1) / avctx->channels;
|
||||
if ((ret = avctx->get_buffer(avctx, &esc->frame)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return ret;
|
||||
/* return single packed with fixed size */
|
||||
out_data_size = FFMIN(MAX_FRAME_SIZE, esc->samples_size - esc->samples_idx);
|
||||
if (*data_size < out_data_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Provided buffer with size %d is too small.\n", *data_size);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
*got_frame_ptr = 1;
|
||||
*(AVFrame *)data = esc->frame;
|
||||
|
||||
dst = esc->frame.data[0];
|
||||
*data_size = out_data_size;
|
||||
dst = data;
|
||||
src = esc->samples + esc->samples_idx;
|
||||
out_data_size = esc->frame.nb_samples * avctx->channels;
|
||||
for (n = out_data_size; n > 0; n--)
|
||||
*dst++ = *src++ + 128;
|
||||
esc->samples_idx += out_data_size;
|
||||
esc->samples_idx += *data_size;
|
||||
|
||||
return avctx->codec->id == CODEC_ID_8SVX_FIB || avctx->codec->id == CODEC_ID_8SVX_EXP ?
|
||||
(avctx->frame_number == 0)*2 + out_data_size / 2 :
|
||||
@@ -175,7 +162,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
EightSvxContext *esc = avctx->priv_data;
|
||||
|
||||
if (avctx->channels < 1 || avctx->channels > 2) {
|
||||
if (avctx->channels > 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -183,7 +170,6 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
||||
switch (avctx->codec->id) {
|
||||
case CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
|
||||
case CODEC_ID_8SVX_EXP: esc->table = exponential; break;
|
||||
case CODEC_ID_PCM_S8_PLANAR:
|
||||
case CODEC_ID_8SVX_RAW: esc->table = NULL; break;
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
|
||||
@@ -191,9 +177,6 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||
|
||||
avcodec_get_frame_defaults(&esc->frame);
|
||||
avctx->coded_frame = &esc->frame;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -216,7 +199,6 @@ AVCodec ff_eightsvx_fib_decoder = {
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||
};
|
||||
|
||||
@@ -228,18 +210,16 @@ AVCodec ff_eightsvx_exp_decoder = {
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||
};
|
||||
|
||||
AVCodec ff_pcm_s8_planar_decoder = {
|
||||
.name = "pcm_s8_planar",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = CODEC_ID_PCM_S8_PLANAR,
|
||||
.priv_data_size = sizeof(EightSvxContext),
|
||||
.init = eightsvx_decode_init,
|
||||
.close = eightsvx_decode_close,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
|
||||
AVCodec ff_eightsvx_raw_decoder = {
|
||||
.name = "8svx_raw",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = CODEC_ID_8SVX_RAW,
|
||||
.priv_data_size = sizeof(EightSvxContext),
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX rawaudio"),
|
||||
};
|
||||
|
@@ -3,7 +3,7 @@ include $(SUBDIR)../config.mak
|
||||
NAME = avcodec
|
||||
FFLIBS = avutil
|
||||
|
||||
HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vda.h vdpau.h version.h xvmc.h
|
||||
HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h
|
||||
|
||||
OBJS = allcodecs.o \
|
||||
audioconvert.o \
|
||||
@@ -15,6 +15,7 @@ OBJS = allcodecs.o \
|
||||
fmtconvert.o \
|
||||
imgconvert.o \
|
||||
jrevdct.o \
|
||||
opt.o \
|
||||
options.o \
|
||||
parser.o \
|
||||
raw.o \
|
||||
@@ -49,7 +50,6 @@ RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o
|
||||
OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes)
|
||||
OBJS-$(CONFIG_SINEWIN) += sinewin.o
|
||||
OBJS-$(CONFIG_VAAPI) += vaapi.o
|
||||
OBJS-$(CONFIG_VDA) += vda.o
|
||||
OBJS-$(CONFIG_VDPAU) += vdpau.o
|
||||
|
||||
# decoders/encoders/hardware accelerators
|
||||
@@ -63,9 +63,9 @@ OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
|
||||
mpeg4audio.o kbdwin.o
|
||||
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
||||
OBJS-$(CONFIG_AC3_DECODER) += ac3dec.o ac3dec_data.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_float.o ac3enc.o ac3tab.o \
|
||||
ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3enc.o ac3tab.o ac3.o
|
||||
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_combined.o ac3enc_fixed.o ac3enc_float.o ac3tab.o ac3.o kbdwin.o ac3enc.o
|
||||
OBJS-$(CONFIG_AC3_FLOAT_ENCODER) += ac3enc_float.o ac3tab.o ac3tab.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3tab.o ac3tab.o ac3.o ac3enc.o
|
||||
OBJS-$(CONFIG_ALAC_DECODER) += alac.o
|
||||
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o
|
||||
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
||||
@@ -91,19 +91,14 @@ OBJS-$(CONFIG_ATRAC1_DECODER) += atrac1.o atrac.o
|
||||
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o atrac.o
|
||||
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
|
||||
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
|
||||
OBJS-$(CONFIG_AVRP_DECODER) += r210dec.o
|
||||
OBJS-$(CONFIG_AVRP_ENCODER) += r210enc.o
|
||||
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
||||
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
||||
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
||||
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkdsp.o
|
||||
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkidct.o
|
||||
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o
|
||||
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o
|
||||
OBJS-$(CONFIG_BINTEXT_DECODER) += bintext.o cga_data.o
|
||||
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
||||
OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o
|
||||
OBJS-$(CONFIG_BMV_VIDEO_DECODER) += bmv.o
|
||||
OBJS-$(CONFIG_BMV_AUDIO_DECODER) += bmv.o
|
||||
OBJS-$(CONFIG_C93_DECODER) += c93.o
|
||||
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
|
||||
mpeg12data.o mpegvideo.o
|
||||
@@ -116,8 +111,6 @@ OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
|
||||
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
|
||||
OBJS-$(CONFIG_DCA_DECODER) += dca.o synth_filter.o dcadsp.o
|
||||
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o
|
||||
OBJS-$(CONFIG_DIRAC_DECODER) += diracdec.o dirac.o diracdsp.o \
|
||||
dirac_arith.o mpeg12data.o dwt.o
|
||||
OBJS-$(CONFIG_DFA_DECODER) += dfa.o
|
||||
OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o
|
||||
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o \
|
||||
@@ -135,10 +128,9 @@ OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o
|
||||
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o
|
||||
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o
|
||||
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
||||
OBJS-$(CONFIG_DXTORY_DECODER) += dxtory.o
|
||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3_data.o
|
||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3dec_data.o
|
||||
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
||||
ac3tab.o ac3.o kbdwin.o eac3_data.o
|
||||
ac3tab.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
||||
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
||||
mpeg12data.o mpegvideo.o \
|
||||
@@ -153,26 +145,19 @@ OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_EIGHTSVX_RAW_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o
|
||||
OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o
|
||||
OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
|
||||
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o
|
||||
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
|
||||
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
||||
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
||||
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
||||
OBJS-$(CONFIG_FLASHSV2_DECODER) += flashsv.o
|
||||
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
||||
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
||||
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
||||
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
|
||||
OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \
|
||||
celp_filters.o celp_math.o
|
||||
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o
|
||||
OBJS-$(CONFIG_G729_DECODER) += g729dec.o lsp.o celp_math.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o
|
||||
OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
|
||||
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
|
||||
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||
@@ -200,22 +185,19 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
||||
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
||||
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
|
||||
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o
|
||||
OBJS-$(CONFIG_IDF_DECODER) += bintext.o cga_data.o
|
||||
OBJS-$(CONFIG_IFF_BYTERUN1_DECODER) += iff.o
|
||||
OBJS-$(CONFIG_IFF_ILBM_DECODER) += iff.o
|
||||
OBJS-$(CONFIG_IMC_DECODER) += imc.o
|
||||
OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o
|
||||
OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o
|
||||
OBJS-$(CONFIG_INDEO4_DECODER) += indeo4.o ivi_common.o ivi_dsp.o
|
||||
OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi_common.o ivi_dsp.o
|
||||
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
|
||||
OBJS-$(CONFIG_JPEG2000_DECODER) += j2kdec.o mqcdec.o mqc.o j2k.o j2k_dwt.o
|
||||
OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
||||
#OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
||||
OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o \
|
||||
mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o
|
||||
@@ -278,7 +260,6 @@ OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||
timecode.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
@@ -287,7 +268,6 @@ OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||
timecode.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
@@ -325,9 +305,6 @@ OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o
|
||||
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
||||
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o
|
||||
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o
|
||||
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc.o
|
||||
OBJS-$(CONFIG_PTX_DECODER) += ptx.o
|
||||
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \
|
||||
celp_filters.o acelp_vectors.o \
|
||||
@@ -340,9 +317,7 @@ OBJS-$(CONFIG_QPEG_DECODER) += qpeg.o
|
||||
OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
|
||||
OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o
|
||||
OBJS-$(CONFIG_R10K_DECODER) += r210dec.o
|
||||
OBJS-$(CONFIG_R10K_ENCODER) += r210enc.o
|
||||
OBJS-$(CONFIG_R210_DECODER) += r210dec.o
|
||||
OBJS-$(CONFIG_R210_ENCODER) += r210enc.o
|
||||
OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o
|
||||
OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o
|
||||
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o
|
||||
@@ -358,9 +333,9 @@ OBJS-$(CONFIG_RV10_DECODER) += rv10.o
|
||||
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o
|
||||
OBJS-$(CONFIG_RV20_DECODER) += rv10.o
|
||||
OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o
|
||||
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o \
|
||||
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o \
|
||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv40dsp.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
||||
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
||||
@@ -373,12 +348,12 @@ OBJS-$(CONFIG_SIPR_DECODER) += sipr.o acelp_pitch_delay.o \
|
||||
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o
|
||||
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o
|
||||
OBJS-$(CONFIG_SMC_DECODER) += smc.o
|
||||
OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o rangecoder.o
|
||||
OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o rangecoder.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
h263.o mpegvideo.o \
|
||||
error_resilience.o ituh263enc.o \
|
||||
mpegvideo_enc.o mpeg12data.o
|
||||
OBJS-$(CONFIG_SNOW_DECODER) += snow.o rangecoder.o
|
||||
OBJS-$(CONFIG_SNOW_ENCODER) += snow.o rangecoder.o motion_est.o \
|
||||
ratecontrol.o h263.o \
|
||||
mpegvideo.o error_resilience.o \
|
||||
ituh263enc.o mpegvideo_enc.o \
|
||||
mpeg12data.o
|
||||
OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
|
||||
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
|
||||
@@ -416,16 +391,10 @@ OBJS-$(CONFIG_TTA_DECODER) += tta.o
|
||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o celp_math.o
|
||||
OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o
|
||||
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
|
||||
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideo.o
|
||||
OBJS-$(CONFIG_V210_DECODER) += v210dec.o
|
||||
OBJS-$(CONFIG_V210_ENCODER) += v210enc.o
|
||||
OBJS-$(CONFIG_V308_DECODER) += v308dec.o
|
||||
OBJS-$(CONFIG_V308_ENCODER) += v308enc.o
|
||||
OBJS-$(CONFIG_V410_DECODER) += v410dec.o
|
||||
OBJS-$(CONFIG_V410_ENCODER) += v410enc.o
|
||||
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
|
||||
OBJS-$(CONFIG_VB_DECODER) += vb.o
|
||||
OBJS-$(CONFIG_VBLE_DECODER) += vble.o
|
||||
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
|
||||
msmpeg4.o msmpeg4data.o \
|
||||
intrax8.o intrax8dsp.o
|
||||
@@ -448,7 +417,6 @@ OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
||||
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
|
||||
OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o
|
||||
OBJS-$(CONFIG_WMALOSSLESS_DECODER) += wmalosslessdec.o wma.o
|
||||
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o
|
||||
OBJS-$(CONFIG_WMAV1_DECODER) += wmadec.o wma.o aactab.o
|
||||
OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o aactab.o
|
||||
@@ -469,17 +437,10 @@ OBJS-$(CONFIG_WS_SND1_DECODER) += ws-snd1.o
|
||||
OBJS-$(CONFIG_XAN_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_XAN_WC3_DECODER) += xan.o
|
||||
OBJS-$(CONFIG_XAN_WC4_DECODER) += xxan.o
|
||||
OBJS-$(CONFIG_XBIN_DECODER) += bintext.o cga_data.o
|
||||
OBJS-$(CONFIG_XL_DECODER) += xl.o
|
||||
OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o
|
||||
OBJS-$(CONFIG_XSUB_ENCODER) += xsubenc.o
|
||||
OBJS-$(CONFIG_XWD_DECODER) += xwddec.o
|
||||
OBJS-$(CONFIG_XWD_ENCODER) += xwdenc.o
|
||||
OBJS-$(CONFIG_Y41P_DECODER) += y41pdec.o
|
||||
OBJS-$(CONFIG_Y41P_ENCODER) += y41penc.o
|
||||
OBJS-$(CONFIG_YOP_DECODER) += yop.o
|
||||
OBJS-$(CONFIG_YUV4_DECODER) += yuv4dec.o
|
||||
OBJS-$(CONFIG_YUV4_ENCODER) += yuv4enc.o
|
||||
OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o
|
||||
OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o
|
||||
OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o
|
||||
@@ -504,7 +465,6 @@ OBJS-$(CONFIG_PCM_MULAW_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S8_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S8_PLANAR_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_PCM_S16BE_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S16BE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S16LE_DECODER) += pcm.o
|
||||
@@ -535,71 +495,66 @@ OBJS-$(CONFIG_PCM_U32BE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_ZORK_ENCODER) += pcm.o
|
||||
|
||||
OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o adx.o
|
||||
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o
|
||||
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o g722dec.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o g722enc.o
|
||||
OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o
|
||||
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o
|
||||
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o
|
||||
OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_APC_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcm.o
|
||||
|
||||
# libavformat dependencies
|
||||
OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_ADX_DEMUXER) += adx.o
|
||||
OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o \
|
||||
ac3tab.o
|
||||
OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_DV_DEMUXER) += dvdata.o
|
||||
OBJS-$(CONFIG_DV_MUXER) += dvdata.o timecode.o
|
||||
OBJS-$(CONFIG_DV_MUXER) += dvdata.o
|
||||
OBJS-$(CONFIG_FLAC_DEMUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLAC_MUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_GXF_DEMUXER) += mpeg12data.o
|
||||
OBJS-$(CONFIG_IFF_DEMUXER) += iff.o
|
||||
OBJS-$(CONFIG_LATM_MUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o vorbis_data.o \
|
||||
flacdec.o flacdata.o flac.o
|
||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
||||
flacdec.o flacdata.o flac.o \
|
||||
mpegaudiodata.o vorbis_data.o
|
||||
OBJS-$(CONFIG_MP3_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o ac3tab.o timecode.o
|
||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_MPEGTS_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MXF_MUXER) += timecode.o
|
||||
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
||||
OBJS-$(CONFIG_OGG_DEMUXER) += flacdec.o flacdata.o flac.o \
|
||||
dirac.o mpeg12data.o vorbis_data.o
|
||||
@@ -626,8 +581,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpeg.o
|
||||
OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o \
|
||||
libschroedinger.o \
|
||||
libdirac_libschro.o
|
||||
@@ -636,9 +590,7 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
||||
libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
||||
OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
|
||||
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
||||
OBJS-$(CONFIG_LIBUTVIDEO_DECODER) += libutvideo.o
|
||||
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
||||
OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbis.o vorbis_data.o
|
||||
@@ -653,7 +605,6 @@ OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
|
||||
aacadtsdec.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
|
||||
aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o
|
||||
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
|
||||
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o
|
||||
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
|
||||
@@ -662,7 +613,6 @@ OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
||||
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
|
||||
OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o \
|
||||
vorbis_data.o
|
||||
OBJS-$(CONFIG_GSM_PARSER) += gsm_parser.o
|
||||
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
||||
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
||||
@@ -684,8 +634,6 @@ OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o
|
||||
OBJS-$(CONFIG_RV30_PARSER) += rv34_parser.o
|
||||
OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o
|
||||
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \
|
||||
msmpeg4.o msmpeg4data.o mpeg4video.o \
|
||||
h263.o mpegvideo.o error_resilience.o
|
||||
@@ -711,8 +659,7 @@ OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
|
||||
|
||||
# thread libraries
|
||||
OBJS-$(HAVE_PTHREADS) += pthread.o
|
||||
OBJS-$(HAVE_W32THREADS) += pthread.o
|
||||
OBJS-$(HAVE_OS2THREADS) += pthread.o
|
||||
OBJS-$(HAVE_W32THREADS) += w32thread.o
|
||||
|
||||
OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
|
||||
|
||||
@@ -722,6 +669,8 @@ OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
|
||||
# well.
|
||||
OBJS-$(!CONFIG_SMALL) += inverse.o
|
||||
|
||||
-include $(SUBDIR)$(ARCH)/Makefile
|
||||
|
||||
SKIPHEADERS += %_tablegen.h \
|
||||
%_tables.h \
|
||||
aac_tablegen_decl.h \
|
||||
@@ -732,12 +681,10 @@ SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
|
||||
SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h
|
||||
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
|
||||
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VDA) += vda_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
||||
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
|
||||
SKIPHEADERS-$(HAVE_W32THREADS) += w32pthreads.h
|
||||
|
||||
TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder snowenc
|
||||
TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder snow
|
||||
TESTPROGS-$(HAVE_MMX) += motion
|
||||
TESTOBJS = dctref.o
|
||||
|
||||
@@ -749,6 +696,8 @@ DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
|
||||
|
||||
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
||||
|
||||
include $(SUBDIR)../subdir.mak
|
||||
|
||||
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
||||
|
||||
TRIG_TABLES = cos cos_fixed sin
|
||||
@@ -783,10 +732,3 @@ $(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables.h
|
||||
$(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
|
||||
$(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
|
||||
endif
|
||||
|
||||
CODEC_NAMES_SH := $(SRC_PATH)/$(SUBDIR)codec_names.sh
|
||||
AVCODEC_H := $(SRC_PATH)/$(SUBDIR)avcodec.h
|
||||
$(SUBDIR)codec_names.h: $(CODEC_NAMES_SH) config.h $(AVCODEC_H)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -E $(AVCODEC_H) | \
|
||||
$(CODEC_NAMES_SH) config.h $@
|
||||
$(SUBDIR)utils.o: $(SUBDIR)codec_names.h
|
||||
|
@@ -84,7 +84,6 @@ enum BandType {
|
||||
#define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10)
|
||||
|
||||
enum ChannelPosition {
|
||||
AAC_CHANNEL_OFF = 0,
|
||||
AAC_CHANNEL_FRONT = 1,
|
||||
AAC_CHANNEL_SIDE = 2,
|
||||
AAC_CHANNEL_BACK = 3,
|
||||
@@ -105,11 +104,11 @@ enum CouplingPoint {
|
||||
* Output configuration status
|
||||
*/
|
||||
enum OCStatus {
|
||||
OC_NONE, ///< Output unconfigured
|
||||
OC_TRIAL_PCE, ///< Output configuration under trial specified by an inband PCE
|
||||
OC_TRIAL_FRAME, ///< Output configuration under trial specified by a frame header
|
||||
OC_GLOBAL_HDR, ///< Output configuration set in a global header but not yet locked
|
||||
OC_LOCKED, ///< Output configuration locked in place
|
||||
OC_NONE, //< Output unconfigured
|
||||
OC_TRIAL_PCE, //< Output configuration under trial specified by an inband PCE
|
||||
OC_TRIAL_FRAME, //< Output configuration under trial specified by a frame header
|
||||
OC_GLOBAL_HDR, //< Output configuration set in a global header but not yet locked
|
||||
OC_LOCKED, //< Output configuration locked in place
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -252,7 +251,6 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
AVCodecContext *avctx;
|
||||
AVFrame frame;
|
||||
|
||||
MPEG4AudioConfig m4ac;
|
||||
|
||||
@@ -301,7 +299,6 @@ typedef struct {
|
||||
DECLARE_ALIGNED(32, float, temp)[128];
|
||||
|
||||
enum OCStatus output_configured;
|
||||
int warned_num_aac_frames;
|
||||
} AACContext;
|
||||
|
||||
#endif /* AVCODEC_AAC_H */
|
||||
|
@@ -48,7 +48,7 @@ typedef struct AACAC3ParseContext {
|
||||
int sample_rate;
|
||||
int bit_rate;
|
||||
int samples;
|
||||
uint64_t channel_layout;
|
||||
int64_t channel_layout;
|
||||
int service_type;
|
||||
|
||||
int remaining_size;
|
||||
|
@@ -55,7 +55,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
||||
if (show_bits(&gb, 12) != 0xfff)
|
||||
return 0;
|
||||
|
||||
if (avpriv_aac_parse_header(&gb, &hdr) < 0) {
|
||||
if (ff_aac_parse_header(&gb, &hdr) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error parsing ADTS frame header!\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
||||
return -1;
|
||||
}
|
||||
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
||||
pce_size = avpriv_copy_pce_data(&pb, &gb)/8;
|
||||
pce_size = ff_copy_pce_data(&pb, &gb)/8;
|
||||
flush_put_bits(&pb);
|
||||
buf_size -= get_bits_count(&gb)/8;
|
||||
buf += get_bits_count(&gb)/8;
|
||||
|
@@ -40,7 +40,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
tmp.u64 = av_be2ne64(state);
|
||||
init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
|
||||
|
||||
if ((size = avpriv_aac_parse_header(&bits, &hdr)) < 0)
|
||||
if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
|
||||
return 0;
|
||||
*need_next_header = 0;
|
||||
*new_frame_start = 1;
|
||||
@@ -61,9 +61,9 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
|
||||
|
||||
|
||||
AVCodecParser ff_aac_parser = {
|
||||
.codec_ids = { CODEC_ID_AAC },
|
||||
.priv_data_size = sizeof(AACAC3ParseContext),
|
||||
.parser_init = aac_parse_init,
|
||||
.parser_parse = ff_aac_ac3_parse,
|
||||
.parser_close = ff_parse_close,
|
||||
{ CODEC_ID_AAC },
|
||||
sizeof(AACAC3ParseContext),
|
||||
aac_parse_init,
|
||||
ff_aac_ac3_parse,
|
||||
ff_parse_close,
|
||||
};
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "get_bits.h"
|
||||
#include "mpeg4audio.h"
|
||||
|
||||
int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||
{
|
||||
int size, rdb, ch, sr;
|
||||
int aot, crc_abs;
|
||||
@@ -39,7 +39,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||
crc_abs = get_bits1(gbc); /* protection_absent */
|
||||
aot = get_bits(gbc, 2); /* profile_objecttype */
|
||||
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
||||
if(!avpriv_mpeg4audio_sample_rates[sr])
|
||||
if(!ff_mpeg4audio_sample_rates[sr])
|
||||
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
||||
skip_bits1(gbc); /* private_bit */
|
||||
ch = get_bits(gbc, 3); /* channel_configuration */
|
||||
@@ -62,7 +62,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||
hdr->crc_absent = crc_abs;
|
||||
hdr->num_aac_frames = rdb + 1;
|
||||
hdr->sampling_index = sr;
|
||||
hdr->sample_rate = avpriv_mpeg4audio_sample_rates[sr];
|
||||
hdr->sample_rate = ff_mpeg4audio_sample_rates[sr];
|
||||
hdr->samples = (rdb + 1) * 1024;
|
||||
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
||||
|
||||
|
@@ -49,6 +49,6 @@ typedef struct {
|
||||
* -2 if the version element is invalid, -3 if the sample rate
|
||||
* element is invalid, or -4 if the bit rate element is invalid.
|
||||
*/
|
||||
int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
||||
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
||||
|
||||
#endif /* AVCODEC_AACADTSDEC_H */
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include "libavutil/libm.h" // brought forward to work around cygwin header breakage
|
||||
|
||||
#include <float.h>
|
||||
#include "libavutil/mathematics.h"
|
||||
#include <math.h>
|
||||
#include "avcodec.h"
|
||||
#include "put_bits.h"
|
||||
#include "aac.h"
|
||||
@@ -110,15 +110,14 @@ static av_always_inline float quantize_and_encode_band_cost_template(
|
||||
int *bits, int BT_ZERO, int BT_UNSIGNED,
|
||||
int BT_PAIR, int BT_ESC)
|
||||
{
|
||||
const int q_idx = POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512;
|
||||
const float Q = ff_aac_pow2sf_tab [q_idx];
|
||||
const float Q34 = ff_aac_pow34sf_tab[q_idx];
|
||||
const float IQ = ff_aac_pow2sf_tab [POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512];
|
||||
const float IQ = ff_aac_pow2sf_tab[POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512];
|
||||
const float Q = ff_aac_pow2sf_tab[POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512];
|
||||
const float CLIPPED_ESCAPE = 165140.0f*IQ;
|
||||
int i, j;
|
||||
float cost = 0;
|
||||
const int dim = BT_PAIR ? 2 : 4;
|
||||
int resbits = 0;
|
||||
const float Q34 = sqrtf(Q * sqrtf(Q));
|
||||
const int range = aac_cb_range[cb];
|
||||
const int maxval = aac_cb_maxval[cb];
|
||||
int off;
|
||||
@@ -347,7 +346,7 @@ static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce
|
||||
float cost_stay_here, cost_get_here;
|
||||
float rd = 0.0f;
|
||||
for (w = 0; w < group_len; w++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(win+w)*16+swb];
|
||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(win+w)*16+swb];
|
||||
rd += quantize_band_cost(s, sce->coeffs + start + w*128,
|
||||
s->scoefs + start + w*128, size,
|
||||
sce->sf_idx[(win+w)*16+swb], cb,
|
||||
@@ -421,7 +420,7 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
|
||||
const int run_esc = (1 << run_bits) - 1;
|
||||
int idx, ppos, count;
|
||||
int stackrun[120], stackcb[120], stack_len;
|
||||
float next_minbits = INFINITY;
|
||||
float next_minrd = INFINITY;
|
||||
int next_mincb = 0;
|
||||
|
||||
abs_pow34_v(s->scoefs, sce->coeffs, 1024);
|
||||
@@ -434,32 +433,16 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
|
||||
for (swb = 0; swb < max_sfb; swb++) {
|
||||
size = sce->ics.swb_sizes[swb];
|
||||
if (sce->zeroes[win*16 + swb]) {
|
||||
float cost_stay_here = path[swb][0].cost;
|
||||
float cost_get_here = next_minbits + run_bits + 4;
|
||||
if ( run_value_bits[sce->ics.num_windows == 8][path[swb][0].run]
|
||||
!= 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_minbits = 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;
|
||||
for (cb = 0; cb < 12; cb++) {
|
||||
path[swb+1][cb].prev_idx = cb;
|
||||
path[swb+1][cb].cost = path[swb][cb].cost;
|
||||
path[swb+1][cb].run = path[swb][cb].run + 1;
|
||||
}
|
||||
} else {
|
||||
float minbits = next_minbits;
|
||||
float minrd = next_minrd;
|
||||
int mincb = next_mincb;
|
||||
int startcb = sce->band_type[win*16+swb];
|
||||
next_minbits = INFINITY;
|
||||
next_minrd = INFINITY;
|
||||
next_mincb = 0;
|
||||
for (cb = 0; cb < startcb; cb++) {
|
||||
path[swb+1][cb].cost = 61450;
|
||||
@@ -468,15 +451,15 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
|
||||
}
|
||||
for (cb = startcb; cb < 12; cb++) {
|
||||
float cost_stay_here, cost_get_here;
|
||||
float bits = 0.0f;
|
||||
float rd = 0.0f;
|
||||
for (w = 0; w < group_len; w++) {
|
||||
bits += quantize_band_cost(s, sce->coeffs + start + w*128,
|
||||
s->scoefs + start + w*128, size,
|
||||
sce->sf_idx[(win+w)*16+swb], cb,
|
||||
0, INFINITY, NULL);
|
||||
rd += quantize_band_cost(s, sce->coeffs + start + w*128,
|
||||
s->scoefs + start + w*128, size,
|
||||
sce->sf_idx[(win+w)*16+swb], cb,
|
||||
0, INFINITY, NULL);
|
||||
}
|
||||
cost_stay_here = path[swb][cb].cost + bits;
|
||||
cost_get_here = minbits + bits + run_bits + 4;
|
||||
cost_stay_here = path[swb][cb].cost + rd;
|
||||
cost_get_here = minrd + rd + run_bits + 4;
|
||||
if ( run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run]
|
||||
!= run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run+1])
|
||||
cost_stay_here += run_bits;
|
||||
@@ -489,8 +472,8 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
|
||||
path[swb+1][cb].cost = cost_stay_here;
|
||||
path[swb+1][cb].run = path[swb][cb].run + 1;
|
||||
}
|
||||
if (path[swb+1][cb].cost < next_minbits) {
|
||||
next_minbits = path[swb+1][cb].cost;
|
||||
if (path[swb+1][cb].cost < next_minrd) {
|
||||
next_minrd = path[swb+1][cb].cost;
|
||||
next_mincb = cb;
|
||||
}
|
||||
}
|
||||
@@ -627,7 +610,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
|
||||
qmin = INT_MAX;
|
||||
qmax = 0.0f;
|
||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
||||
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
||||
sce->zeroes[(w+w2)*16+g] = 1;
|
||||
continue;
|
||||
@@ -656,7 +639,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
|
||||
float dist = 0;
|
||||
int cb = find_min_book(maxval, sce->sf_idx[w*16+g]);
|
||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+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);
|
||||
}
|
||||
@@ -713,7 +696,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
|
||||
const float lambda)
|
||||
{
|
||||
int start = 0, i, w, w2, g;
|
||||
int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels * (lambda / 120.f);
|
||||
int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels;
|
||||
float dists[128], uplims[128];
|
||||
float maxvals[128];
|
||||
int fflag, minscaler;
|
||||
@@ -729,7 +712,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
|
||||
int nz = 0;
|
||||
float uplim = 0.0f;
|
||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
||||
uplim += band->threshold;
|
||||
if (band->energy <= band->threshold || band->threshold == 0.0f) {
|
||||
sce->zeroes[(w+w2)*16+g] = 1;
|
||||
@@ -1029,7 +1012,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 (g = 0; g < sce->ics.num_swb; g++) {
|
||||
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g];
|
||||
if (band->energy <= band->threshold) {
|
||||
sce->sf_idx[(w+w2)*16+g] = 218;
|
||||
sce->zeroes[(w+w2)*16+g] = 1;
|
||||
@@ -1067,8 +1050,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]) {
|
||||
float dist1 = 0.0f, dist2 = 0.0f;
|
||||
for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) {
|
||||
FFPsyBand *band0 = &s->psy.ch[s->cur_channel+0].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band1 = &s->psy.ch[s->cur_channel+1].psy_bands[(w+w2)*16+g];
|
||||
FFPsyBand *band0 = &s->psy.psy_bands[(s->cur_channel+0)*PSY_MAX_BANDS+(w+w2)*16+g];
|
||||
FFPsyBand *band1 = &s->psy.psy_bands[(s->cur_channel+1)*PSY_MAX_BANDS+(w+w2)*16+g];
|
||||
float minthr = FFMIN(band0->threshold, band1->threshold);
|
||||
float maxthr = FFMAX(band0->threshold, band1->threshold);
|
||||
for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
|
||||
@@ -1113,7 +1096,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
|
||||
}
|
||||
}
|
||||
|
||||
AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
|
||||
AACCoefficientsEncoder ff_aac_coders[] = {
|
||||
{
|
||||
search_for_quantizers_faac,
|
||||
encode_window_bands_info,
|
||||
|
@@ -98,7 +98,6 @@
|
||||
#include "aacsbr.h"
|
||||
#include "mpeg4audio.h"
|
||||
#include "aacadtsdec.h"
|
||||
#include "libavutil/intfloat.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
@@ -109,6 +108,11 @@
|
||||
# include "arm/aac.h"
|
||||
#endif
|
||||
|
||||
union float754 {
|
||||
float f;
|
||||
uint32_t i;
|
||||
};
|
||||
|
||||
static VLC vlc_scalefactors;
|
||||
static VLC vlc_spectral[11];
|
||||
|
||||
@@ -163,19 +167,6 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
|
||||
}
|
||||
}
|
||||
|
||||
static int count_channels(enum ChannelPosition che_pos[4][MAX_ELEM_ID])
|
||||
{
|
||||
int i, type, sum = 0;
|
||||
for (i = 0; i < MAX_ELEM_ID; i++) {
|
||||
for (type = 0; type < 4; type++) {
|
||||
sum += (1 + (type == TYPE_CPE)) *
|
||||
(che_pos[type][i] != AAC_CHANNEL_OFF &&
|
||||
che_pos[type][i] != AAC_CHANNEL_CC);
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for the channel element in the current channel position configuration.
|
||||
* If it exists, make sure the appropriate element is allocated and map the
|
||||
@@ -192,14 +183,10 @@ static av_cold int che_configure(AACContext *ac,
|
||||
enum ChannelPosition che_pos[4][MAX_ELEM_ID],
|
||||
int type, int id, int *channels)
|
||||
{
|
||||
if (*channels >= MAX_CHANNELS)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (che_pos[type][id]) {
|
||||
if (!ac->che[type][id]) {
|
||||
if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
||||
return AVERROR(ENOMEM);
|
||||
ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr);
|
||||
}
|
||||
if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
||||
return AVERROR(ENOMEM);
|
||||
ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr);
|
||||
if (type != TYPE_CCE) {
|
||||
ac->output_data[(*channels)++] = ac->che[type][id]->ch[0].ret;
|
||||
if (type == TYPE_CPE ||
|
||||
@@ -273,23 +260,6 @@ static av_cold int output_configure(AACContext *ac,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void flush(AVCodecContext *avctx)
|
||||
{
|
||||
AACContext *ac= avctx->priv_data;
|
||||
int type, i, j;
|
||||
|
||||
for (type = 3; type >= 0; type--) {
|
||||
for (i = 0; i < MAX_ELEM_ID; i++) {
|
||||
ChannelElement *che = ac->che[type][i];
|
||||
if (che) {
|
||||
for (j = 0; j <= 1; j++) {
|
||||
memset(che->ch[j].saved, 0, sizeof(che->ch[j].saved));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode an array of 4 bit element IDs, optionally interleaved with a stereo/mono switching bit.
|
||||
*
|
||||
@@ -452,12 +422,6 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
if ((ret = set_default_channel_config(avctx, new_che_pos, channel_config)))
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (count_channels(new_che_pos) > 1) {
|
||||
m4ac->ps = 0;
|
||||
} else if (m4ac->sbr == 1 && m4ac->ps == -1)
|
||||
m4ac->ps = 1;
|
||||
|
||||
if (ac && (ret = output_configure(ac, ac->che_pos, new_che_pos, channel_config, OC_GLOBAL_HDR)))
|
||||
return ret;
|
||||
|
||||
@@ -488,17 +452,15 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
* @param ac pointer to AACContext, may be null
|
||||
* @param avctx pointer to AVCCodecContext, used for logging
|
||||
* @param m4ac pointer to MPEG4AudioConfig, used for parsing
|
||||
* @param data pointer to buffer holding an audio specific config
|
||||
* @param bit_size size of audio specific config or data in bits
|
||||
* @param sync_extension look for an appended sync extension
|
||||
* @param data pointer to AVCodecContext extradata
|
||||
* @param data_size size of AVCCodecContext extradata
|
||||
*
|
||||
* @return Returns error status or number of consumed bits. <0 - error
|
||||
*/
|
||||
static int decode_audio_specific_config(AACContext *ac,
|
||||
AVCodecContext *avctx,
|
||||
MPEG4AudioConfig *m4ac,
|
||||
const uint8_t *data, int bit_size,
|
||||
int sync_extension)
|
||||
const uint8_t *data, int data_size)
|
||||
{
|
||||
GetBitContext gb;
|
||||
int i;
|
||||
@@ -508,14 +470,16 @@ static int decode_audio_specific_config(AACContext *ac,
|
||||
av_dlog(avctx, "%02x ", avctx->extradata[i]);
|
||||
av_dlog(avctx, "\n");
|
||||
|
||||
init_get_bits(&gb, data, bit_size);
|
||||
init_get_bits(&gb, data, data_size * 8);
|
||||
|
||||
if ((i = avpriv_mpeg4audio_get_config(m4ac, data, bit_size, sync_extension)) < 0)
|
||||
if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
|
||||
return -1;
|
||||
if (m4ac->sampling_index > 12) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", m4ac->sampling_index);
|
||||
return -1;
|
||||
}
|
||||
if (m4ac->sbr == 1 && m4ac->ps == -1)
|
||||
m4ac->ps = 1;
|
||||
|
||||
skip_bits_long(&gb, i);
|
||||
|
||||
@@ -568,22 +532,6 @@ static void reset_all_predictors(PredictorState *ps)
|
||||
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)
|
||||
{
|
||||
int i;
|
||||
@@ -608,33 +556,8 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
if (avctx->extradata_size > 0) {
|
||||
if (decode_audio_specific_config(ac, ac->avctx, &ac->m4ac,
|
||||
avctx->extradata,
|
||||
avctx->extradata_size*8, 1) < 0)
|
||||
avctx->extradata_size) < 0)
|
||||
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;
|
||||
ac->m4ac.sbr = -1;
|
||||
ac->m4ac.ps = -1;
|
||||
|
||||
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) {
|
||||
int ret = set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config);
|
||||
if (!ret)
|
||||
output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR);
|
||||
else if (avctx->err_recognition & AV_EF_EXPLODE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) {
|
||||
@@ -682,9 +605,6 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
|
||||
cbrt_tableinit();
|
||||
|
||||
avcodec_get_frame_defaults(&ac->frame);
|
||||
avctx->coded_frame = &ac->frame;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -741,13 +661,16 @@ static void decode_ltp(AACContext *ac, LongTermPrediction *ltp,
|
||||
|
||||
/**
|
||||
* Decode Individual Channel Stream info; reference: table 4.6.
|
||||
*
|
||||
* @param common_window Channels have independent [0], or shared [1], Individual Channel Stream information.
|
||||
*/
|
||||
static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
|
||||
GetBitContext *gb)
|
||||
GetBitContext *gb, int common_window)
|
||||
{
|
||||
if (get_bits1(gb)) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
memset(ics, 0, sizeof(IndividualChannelStream));
|
||||
return -1;
|
||||
}
|
||||
ics->window_sequence[1] = ics->window_sequence[0];
|
||||
ics->window_sequence[0] = get_bits(gb, 2);
|
||||
@@ -782,11 +705,13 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
|
||||
if (ics->predictor_present) {
|
||||
if (ac->m4ac.object_type == AOT_AAC_MAIN) {
|
||||
if (decode_prediction(ac, ics, gb)) {
|
||||
return AVERROR_INVALIDDATA;
|
||||
memset(ics, 0, sizeof(IndividualChannelStream));
|
||||
return -1;
|
||||
}
|
||||
} else if (ac->m4ac.object_type == AOT_AAC_LC) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "Prediction is not allowed in AAC-LC.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
memset(ics, 0, sizeof(IndividualChannelStream));
|
||||
return -1;
|
||||
} else {
|
||||
if ((ics->ltp.present = get_bits(gb, 1)))
|
||||
decode_ltp(ac, &ics->ltp, gb, ics->max_sfb);
|
||||
@@ -798,7 +723,8 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"Number of scalefactor bands in group (%d) exceeds limit (%d).\n",
|
||||
ics->max_sfb, ics->num_swb);
|
||||
return AVERROR_INVALIDDATA;
|
||||
memset(ics, 0, sizeof(IndividualChannelStream));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -828,20 +754,19 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120],
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "invalid band type\n");
|
||||
return -1;
|
||||
}
|
||||
do {
|
||||
sect_len_incr = get_bits(gb, bits);
|
||||
while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1)
|
||||
sect_end += sect_len_incr;
|
||||
if (get_bits_left(gb) < 0) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, overread_err);
|
||||
return -1;
|
||||
}
|
||||
if (sect_end > ics->max_sfb) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"Number of bands (%d) exceeds limit (%d).\n",
|
||||
sect_end, ics->max_sfb);
|
||||
return -1;
|
||||
}
|
||||
} while (sect_len_incr == (1 << bits) - 1);
|
||||
sect_end += sect_len_incr;
|
||||
if (get_bits_left(gb) < 0) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, overread_err);
|
||||
return -1;
|
||||
}
|
||||
if (sect_end > ics->max_sfb) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"Number of bands (%d) exceeds limit (%d).\n",
|
||||
sect_end, ics->max_sfb);
|
||||
return -1;
|
||||
}
|
||||
for (; k < sect_end; k++) {
|
||||
band_type [idx] = sect_band_type;
|
||||
band_type_run_end[idx++] = sect_end;
|
||||
@@ -1033,7 +958,7 @@ static inline float *VMUL4(float *dst, const float *v, unsigned idx,
|
||||
static inline float *VMUL2S(float *dst, const float *v, unsigned idx,
|
||||
unsigned sign, const float *scale)
|
||||
{
|
||||
union av_intfloat32 s0, s1;
|
||||
union float754 s0, s1;
|
||||
|
||||
s0.f = s1.f = *scale;
|
||||
s0.i ^= sign >> 1 << 31;
|
||||
@@ -1051,8 +976,8 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx,
|
||||
unsigned sign, const float *scale)
|
||||
{
|
||||
unsigned nz = idx >> 12;
|
||||
union av_intfloat32 s = { .f = *scale };
|
||||
union av_intfloat32 t;
|
||||
union float754 s = { .f = *scale };
|
||||
union float754 t;
|
||||
|
||||
t.i = s.i ^ (sign & 1U<<31);
|
||||
*dst++ = v[idx & 3] * t.f;
|
||||
@@ -1301,7 +1226,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024],
|
||||
|
||||
static av_always_inline float flt16_round(float pf)
|
||||
{
|
||||
union av_intfloat32 tmp;
|
||||
union float754 tmp;
|
||||
tmp.f = pf;
|
||||
tmp.i = (tmp.i + 0x00008000U) & 0xFFFF0000U;
|
||||
return tmp.f;
|
||||
@@ -1309,7 +1234,7 @@ static av_always_inline float flt16_round(float pf)
|
||||
|
||||
static av_always_inline float flt16_even(float pf)
|
||||
{
|
||||
union av_intfloat32 tmp;
|
||||
union float754 tmp;
|
||||
tmp.f = pf;
|
||||
tmp.i = (tmp.i + 0x00007FFFU + (tmp.i & 0x00010000U >> 16)) & 0xFFFF0000U;
|
||||
return tmp.f;
|
||||
@@ -1317,7 +1242,7 @@ static av_always_inline float flt16_even(float pf)
|
||||
|
||||
static av_always_inline float flt16_trunc(float pf)
|
||||
{
|
||||
union av_intfloat32 pun;
|
||||
union float754 pun;
|
||||
pun.f = pf;
|
||||
pun.i &= 0xFFFF0000U;
|
||||
return pun.f;
|
||||
@@ -1404,8 +1329,8 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
|
||||
global_gain = get_bits(gb, 8);
|
||||
|
||||
if (!common_window && !scale_flag) {
|
||||
if (decode_ics_info(ac, ics, gb) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (decode_ics_info(ac, ics, gb, 0) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (decode_band_types(ac, sce->band_type, sce->band_type_run_end, gb, ics) < 0)
|
||||
@@ -1521,8 +1446,8 @@ static int decode_cpe(AACContext *ac, GetBitContext *gb, ChannelElement *cpe)
|
||||
|
||||
common_window = get_bits1(gb);
|
||||
if (common_window) {
|
||||
if (decode_ics_info(ac, &cpe->ch[0].ics, gb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1))
|
||||
return -1;
|
||||
i = cpe->ch[1].ics.use_kb_window[0];
|
||||
cpe->ch[1].ics = cpe->ch[0].ics;
|
||||
cpe->ch[1].ics.use_kb_window[1] = i;
|
||||
@@ -1768,7 +1693,7 @@ static void apply_tns(float coef[1024], TemporalNoiseShaping *tns,
|
||||
int w, filt, m, i;
|
||||
int bottom, top, order, start, end, size, inc;
|
||||
float lpc[TNS_MAX_ORDER];
|
||||
float tmp[TNS_MAX_ORDER + 1];
|
||||
float tmp[TNS_MAX_ORDER];
|
||||
|
||||
for (w = 0; w < ics->num_windows; w++) {
|
||||
bottom = ics->num_swb;
|
||||
@@ -2111,49 +2036,46 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
||||
int size;
|
||||
AACADTSHeaderInfo hdr_info;
|
||||
|
||||
size = avpriv_aac_parse_header(gb, &hdr_info);
|
||||
size = ff_aac_parse_header(gb, &hdr_info);
|
||||
if (size > 0) {
|
||||
if (hdr_info.chan_config) {
|
||||
if (ac->output_configured != OC_LOCKED && hdr_info.chan_config) {
|
||||
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID];
|
||||
memset(new_che_pos, 0, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0]));
|
||||
ac->m4ac.chan_config = hdr_info.chan_config;
|
||||
if (set_default_channel_config(ac->avctx, new_che_pos, hdr_info.chan_config))
|
||||
return -7;
|
||||
if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config,
|
||||
FFMAX(ac->output_configured, OC_TRIAL_FRAME)))
|
||||
if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config, OC_TRIAL_FRAME))
|
||||
return -7;
|
||||
} else if (ac->output_configured != OC_LOCKED) {
|
||||
ac->m4ac.chan_config = 0;
|
||||
ac->output_configured = OC_NONE;
|
||||
}
|
||||
if (ac->output_configured != OC_LOCKED) {
|
||||
ac->m4ac.sbr = -1;
|
||||
ac->m4ac.ps = -1;
|
||||
ac->m4ac.sample_rate = hdr_info.sample_rate;
|
||||
ac->m4ac.sampling_index = hdr_info.sampling_index;
|
||||
ac->m4ac.object_type = hdr_info.object_type;
|
||||
}
|
||||
ac->m4ac.sample_rate = hdr_info.sample_rate;
|
||||
ac->m4ac.sampling_index = hdr_info.sampling_index;
|
||||
ac->m4ac.object_type = hdr_info.object_type;
|
||||
if (!ac->avctx->sample_rate)
|
||||
ac->avctx->sample_rate = hdr_info.sample_rate;
|
||||
if (!ac->warned_num_aac_frames && hdr_info.num_aac_frames != 1) {
|
||||
// This is 2 for "VLB " audio in NSV files.
|
||||
// See samples/nsv/vlb_audio.
|
||||
if (hdr_info.num_aac_frames == 1) {
|
||||
if (!hdr_info.crc_absent)
|
||||
skip_bits(gb, 16);
|
||||
} else {
|
||||
av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame is", 0);
|
||||
ac->warned_num_aac_frames = 1;
|
||||
return -1;
|
||||
}
|
||||
if (!hdr_info.crc_absent)
|
||||
skip_bits(gb, 16);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
int *got_frame_ptr, GetBitContext *gb)
|
||||
int *data_size, GetBitContext *gb)
|
||||
{
|
||||
AACContext *ac = avctx->priv_data;
|
||||
ChannelElement *che = NULL, *che_prev = NULL;
|
||||
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
|
||||
int err, elem_id;
|
||||
int err, elem_id, data_size_tmp;
|
||||
int samples = 0, multiplier, audio_found = 0;
|
||||
|
||||
if (show_bits(gb, 12) == 0xfff) {
|
||||
@@ -2173,15 +2095,6 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
elem_id = get_bits(gb, 4);
|
||||
|
||||
if (elem_type < TYPE_DSE) {
|
||||
if (!ac->tags_mapped && elem_type == TYPE_CPE && ac->m4ac.chan_config==1) {
|
||||
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID]= {0};
|
||||
ac->m4ac.chan_config=2;
|
||||
|
||||
if (set_default_channel_config(ac->avctx, new_che_pos, 2)<0)
|
||||
return -1;
|
||||
if (output_configure(ac, ac->che_pos, new_che_pos, 2, OC_TRIAL_FRAME)<0)
|
||||
return -1;
|
||||
}
|
||||
if (!(che=get_che(ac, elem_type, elem_id))) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
|
||||
elem_type, elem_id);
|
||||
@@ -2221,11 +2134,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
if ((err = decode_pce(avctx, &ac->m4ac, new_che_pos, gb)))
|
||||
break;
|
||||
if (ac->output_configured > OC_TRIAL_PCE)
|
||||
av_log(avctx, AV_LOG_INFO,
|
||||
"Evaluating a further program_config_element.\n");
|
||||
err = output_configure(ac, ac->che_pos, new_che_pos, 0, OC_TRIAL_PCE);
|
||||
if (!err)
|
||||
ac->m4ac.chan_config = 0;
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Not evaluating a further program_config_element as this construct is dubious at best.\n");
|
||||
else
|
||||
err = output_configure(ac, ac->che_pos, new_che_pos, 0, OC_TRIAL_PCE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2267,26 +2179,24 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
avctx->frame_size = samples;
|
||||
}
|
||||
|
||||
if (samples) {
|
||||
/* get output buffer */
|
||||
ac->frame.nb_samples = samples;
|
||||
if ((err = avctx->get_buffer(avctx, &ac->frame)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return err;
|
||||
}
|
||||
data_size_tmp = samples * avctx->channels *
|
||||
av_get_bytes_per_sample(avctx->sample_fmt);
|
||||
if (*data_size < data_size_tmp) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Output buffer too small (%d) or trying to output too many samples (%d) for this frame.\n",
|
||||
*data_size, data_size_tmp);
|
||||
return -1;
|
||||
}
|
||||
*data_size = data_size_tmp;
|
||||
|
||||
if (samples) {
|
||||
if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT)
|
||||
ac->fmt_conv.float_interleave((float *)ac->frame.data[0],
|
||||
(const float **)ac->output_data,
|
||||
ac->fmt_conv.float_interleave(data, (const float **)ac->output_data,
|
||||
samples, avctx->channels);
|
||||
else
|
||||
ac->fmt_conv.float_to_int16_interleave((int16_t *)ac->frame.data[0],
|
||||
(const float **)ac->output_data,
|
||||
ac->fmt_conv.float_to_int16_interleave(data, (const float **)ac->output_data,
|
||||
samples, avctx->channels);
|
||||
|
||||
*(AVFrame *)data = ac->frame;
|
||||
}
|
||||
*got_frame_ptr = !!samples;
|
||||
|
||||
if (ac->output_configured && audio_found)
|
||||
ac->output_configured = OC_LOCKED;
|
||||
@@ -2295,37 +2205,18 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
static int aac_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int *got_frame_ptr, AVPacket *avpkt)
|
||||
int *data_size, AVPacket *avpkt)
|
||||
{
|
||||
AACContext *ac = avctx->priv_data;
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
GetBitContext gb;
|
||||
int buf_consumed;
|
||||
int buf_offset;
|
||||
int err;
|
||||
int new_extradata_size;
|
||||
const uint8_t *new_extradata = av_packet_get_side_data(avpkt,
|
||||
AV_PKT_DATA_NEW_EXTRADATA,
|
||||
&new_extradata_size);
|
||||
|
||||
if (new_extradata) {
|
||||
av_free(avctx->extradata);
|
||||
avctx->extradata = av_mallocz(new_extradata_size +
|
||||
FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!avctx->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
avctx->extradata_size = new_extradata_size;
|
||||
memcpy(avctx->extradata, new_extradata, new_extradata_size);
|
||||
if (decode_audio_specific_config(ac, ac->avctx, &ac->m4ac,
|
||||
avctx->extradata,
|
||||
avctx->extradata_size*8, 1) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
init_get_bits(&gb, buf, buf_size * 8);
|
||||
|
||||
if ((err = aac_decode_frame_int(avctx, data, got_frame_ptr, &gb)) < 0)
|
||||
if ((err = aac_decode_frame_int(avctx, data, data_size, &gb)) < 0)
|
||||
return err;
|
||||
|
||||
buf_consumed = (get_bits_count(&gb) + 7) >> 3;
|
||||
@@ -2376,44 +2267,29 @@ static inline uint32_t latm_get_value(GetBitContext *b)
|
||||
}
|
||||
|
||||
static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
|
||||
GetBitContext *gb, int asclen)
|
||||
GetBitContext *gb)
|
||||
{
|
||||
AACContext *ac = &latmctx->aac_ctx;
|
||||
AVCodecContext *avctx = ac->avctx;
|
||||
MPEG4AudioConfig m4ac = {0};
|
||||
int config_start_bit = get_bits_count(gb);
|
||||
int sync_extension = 0;
|
||||
int bits_consumed, esize;
|
||||
|
||||
if (asclen) {
|
||||
sync_extension = 1;
|
||||
asclen = FFMIN(asclen, get_bits_left(gb));
|
||||
} else
|
||||
asclen = get_bits_left(gb);
|
||||
AVCodecContext *avctx = latmctx->aac_ctx.avctx;
|
||||
MPEG4AudioConfig m4ac;
|
||||
int config_start_bit = get_bits_count(gb);
|
||||
int bits_consumed, esize;
|
||||
|
||||
if (config_start_bit % 8) {
|
||||
av_log_missing_feature(latmctx->aac_ctx.avctx, "audio specific "
|
||||
"config not byte aligned.\n", 1);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (asclen <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
bits_consumed = decode_audio_specific_config(NULL, avctx, &m4ac,
|
||||
} else {
|
||||
bits_consumed =
|
||||
decode_audio_specific_config(NULL, avctx, &m4ac,
|
||||
gb->buffer + (config_start_bit / 8),
|
||||
asclen, sync_extension);
|
||||
get_bits_left(gb) / 8);
|
||||
|
||||
if (bits_consumed < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (ac->m4ac.sample_rate != m4ac.sample_rate ||
|
||||
ac->m4ac.chan_config != m4ac.chan_config) {
|
||||
|
||||
av_log(avctx, AV_LOG_INFO, "audio config changed\n");
|
||||
latmctx->initialized = 0;
|
||||
if (bits_consumed < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
esize = (bits_consumed+7) / 8;
|
||||
|
||||
if (avctx->extradata_size < esize) {
|
||||
if (avctx->extradata_size <= esize) {
|
||||
av_free(avctx->extradata);
|
||||
avctx->extradata = av_malloc(esize + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!avctx->extradata)
|
||||
@@ -2423,8 +2299,9 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
|
||||
avctx->extradata_size = esize;
|
||||
memcpy(avctx->extradata, gb->buffer + (config_start_bit/8), esize);
|
||||
memset(avctx->extradata+esize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
skip_bits_long(gb, bits_consumed);
|
||||
}
|
||||
skip_bits_long(gb, bits_consumed);
|
||||
|
||||
return bits_consumed;
|
||||
}
|
||||
@@ -2463,11 +2340,11 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
|
||||
|
||||
// for all but first stream: use_same_config = get_bits(gb, 1);
|
||||
if (!audio_mux_version) {
|
||||
if ((ret = latm_decode_audio_specific_config(latmctx, gb, 0)) < 0)
|
||||
if ((ret = latm_decode_audio_specific_config(latmctx, gb)) < 0)
|
||||
return ret;
|
||||
} else {
|
||||
int ascLen = latm_get_value(gb);
|
||||
if ((ret = latm_decode_audio_specific_config(latmctx, gb, ascLen)) < 0)
|
||||
if ((ret = latm_decode_audio_specific_config(latmctx, gb)) < 0)
|
||||
return ret;
|
||||
ascLen -= ret;
|
||||
skip_bits_long(gb, ascLen);
|
||||
@@ -2561,13 +2438,16 @@ static int read_audio_mux_element(struct LATMContext *latmctx,
|
||||
}
|
||||
|
||||
|
||||
static int latm_decode_frame(AVCodecContext *avctx, void *out,
|
||||
int *got_frame_ptr, AVPacket *avpkt)
|
||||
static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
|
||||
AVPacket *avpkt)
|
||||
{
|
||||
struct LATMContext *latmctx = avctx->priv_data;
|
||||
int muxlength, err;
|
||||
GetBitContext gb;
|
||||
|
||||
if (avpkt->size == 0)
|
||||
return 0;
|
||||
|
||||
init_get_bits(&gb, avpkt->data, avpkt->size * 8);
|
||||
|
||||
// check for LOAS sync word
|
||||
@@ -2584,12 +2464,11 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out,
|
||||
|
||||
if (!latmctx->initialized) {
|
||||
if (!avctx->extradata) {
|
||||
*got_frame_ptr = 0;
|
||||
*out_size = 0;
|
||||
return avpkt->size;
|
||||
} else {
|
||||
if ((err = decode_audio_specific_config(
|
||||
&latmctx->aac_ctx, avctx, &latmctx->aac_ctx.m4ac,
|
||||
avctx->extradata, avctx->extradata_size*8, 1)) < 0)
|
||||
aac_decode_close(avctx);
|
||||
if ((err = aac_decode_init(avctx)) < 0)
|
||||
return err;
|
||||
latmctx->initialized = 1;
|
||||
}
|
||||
@@ -2602,7 +2481,7 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if ((err = aac_decode_frame_int(avctx, out, got_frame_ptr, &gb)) < 0)
|
||||
if ((err = aac_decode_frame_int(avctx, out, out_size, &gb)) < 0)
|
||||
return err;
|
||||
|
||||
return muxlength;
|
||||
@@ -2611,28 +2490,33 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out,
|
||||
av_cold static int latm_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
struct LATMContext *latmctx = avctx->priv_data;
|
||||
int ret = aac_decode_init(avctx);
|
||||
int ret;
|
||||
|
||||
if (avctx->extradata_size > 0)
|
||||
ret = aac_decode_init(avctx);
|
||||
|
||||
if (avctx->extradata_size > 0) {
|
||||
latmctx->initialized = !ret;
|
||||
} else {
|
||||
latmctx->initialized = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
AVCodec ff_aac_decoder = {
|
||||
.name = "aac",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = CODEC_ID_AAC,
|
||||
.priv_data_size = sizeof(AACContext),
|
||||
.init = aac_decode_init,
|
||||
.close = aac_decode_close,
|
||||
.decode = aac_decode_frame,
|
||||
"aac",
|
||||
AVMEDIA_TYPE_AUDIO,
|
||||
CODEC_ID_AAC,
|
||||
sizeof(AACContext),
|
||||
aac_decode_init,
|
||||
NULL,
|
||||
aac_decode_close,
|
||||
aac_decode_frame,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||
},
|
||||
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
|
||||
.channel_layouts = aac_channel_layout,
|
||||
};
|
||||
|
||||
@@ -2653,7 +2537,5 @@ AVCodec ff_aac_latm_decoder = {
|
||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
|
||||
},
|
||||
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
|
||||
.channel_layouts = aac_channel_layout,
|
||||
.flush = flush,
|
||||
};
|
||||
|
@@ -90,7 +90,7 @@ static const uint8_t aac_channel_layout_map[7][5][2] = {
|
||||
{ { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, },
|
||||
};
|
||||
|
||||
static const uint64_t aac_channel_layout[8] = {
|
||||
static const int64_t aac_channel_layout[8] = {
|
||||
AV_CH_LAYOUT_MONO,
|
||||
AV_CH_LAYOUT_STEREO,
|
||||
AV_CH_LAYOUT_SURROUND,
|
||||
|
@@ -46,14 +46,6 @@
|
||||
|
||||
#define AAC_MAX_CHANNELS 6
|
||||
|
||||
#define ERROR_IF(cond, ...) \
|
||||
if (cond) { \
|
||||
av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \
|
||||
return AVERROR(EINVAL); \
|
||||
}
|
||||
|
||||
float ff_aac_pow34sf_tab[428];
|
||||
|
||||
static const uint8_t swb_size_1024_96[] = {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
|
||||
12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
|
||||
@@ -143,10 +135,7 @@ static const uint8_t aac_chan_configs[6][5] = {
|
||||
{4, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_LFE}, // 6 channels - front center + stereo + back stereo + LFE
|
||||
};
|
||||
|
||||
/**
|
||||
* Table to remap channels from Libav's default order to AAC order.
|
||||
*/
|
||||
static const uint8_t aac_chan_maps[AAC_MAX_CHANNELS][AAC_MAX_CHANNELS] = {
|
||||
static const uint8_t channel_maps[][AAC_MAX_CHANNELS] = {
|
||||
{ 0 },
|
||||
{ 0, 1 },
|
||||
{ 2, 0, 1 },
|
||||
@@ -167,7 +156,7 @@ static void put_audio_specific_config(AVCodecContext *avctx)
|
||||
init_put_bits(&pb, avctx->extradata, avctx->extradata_size*8);
|
||||
put_bits(&pb, 5, 2); //object type - AAC-LC
|
||||
put_bits(&pb, 4, s->samplerate_index); //sample rate index
|
||||
put_bits(&pb, 4, s->channels);
|
||||
put_bits(&pb, 4, avctx->channels);
|
||||
//GASpecificConfig
|
||||
put_bits(&pb, 1, 0); //frame length - 1024 samples
|
||||
put_bits(&pb, 1, 0); //does not depend on core coder
|
||||
@@ -180,80 +169,113 @@ static void put_audio_specific_config(AVCodecContext *avctx)
|
||||
flush_put_bits(&pb);
|
||||
}
|
||||
|
||||
#define WINDOW_FUNC(type) \
|
||||
static void apply_ ##type ##_window(DSPContext *dsp, SingleChannelElement *sce, const float *audio)
|
||||
|
||||
WINDOW_FUNC(only_long)
|
||||
{
|
||||
const float *lwindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
|
||||
const float *pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
|
||||
float *out = sce->ret;
|
||||
|
||||
dsp->vector_fmul (out, audio, lwindow, 1024);
|
||||
dsp->vector_fmul_reverse(out + 1024, audio + 1024, pwindow, 1024);
|
||||
}
|
||||
|
||||
WINDOW_FUNC(long_start)
|
||||
{
|
||||
const float *lwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
|
||||
const float *swindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
float *out = sce->ret;
|
||||
|
||||
dsp->vector_fmul(out, audio, lwindow, 1024);
|
||||
memcpy(out + 1024, audio + 1024, sizeof(out[0]) * 448);
|
||||
dsp->vector_fmul_reverse(out + 1024 + 448, audio + 1024 + 448, swindow, 128);
|
||||
memset(out + 1024 + 576, 0, sizeof(out[0]) * 448);
|
||||
}
|
||||
|
||||
WINDOW_FUNC(long_stop)
|
||||
{
|
||||
const float *lwindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
|
||||
const float *swindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
float *out = sce->ret;
|
||||
|
||||
memset(out, 0, sizeof(out[0]) * 448);
|
||||
dsp->vector_fmul(out + 448, audio + 448, swindow, 128);
|
||||
memcpy(out + 576, audio + 576, sizeof(out[0]) * 448);
|
||||
dsp->vector_fmul_reverse(out + 1024, audio + 1024, lwindow, 1024);
|
||||
}
|
||||
|
||||
WINDOW_FUNC(eight_short)
|
||||
{
|
||||
const float *swindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
const float *pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
const float *in = audio + 448;
|
||||
float *out = sce->ret;
|
||||
|
||||
for (int w = 0; w < 8; w++) {
|
||||
dsp->vector_fmul (out, in, w ? pwindow : swindow, 128);
|
||||
out += 128;
|
||||
in += 128;
|
||||
dsp->vector_fmul_reverse(out, in, swindow, 128);
|
||||
out += 128;
|
||||
}
|
||||
}
|
||||
|
||||
static void (*const apply_window[4])(DSPContext *dsp, SingleChannelElement *sce, const float *audio) = {
|
||||
[ONLY_LONG_SEQUENCE] = apply_only_long_window,
|
||||
[LONG_START_SEQUENCE] = apply_long_start_window,
|
||||
[EIGHT_SHORT_SEQUENCE] = apply_eight_short_window,
|
||||
[LONG_STOP_SEQUENCE] = apply_long_stop_window
|
||||
};
|
||||
|
||||
static void apply_window_and_mdct(AACEncContext *s, SingleChannelElement *sce,
|
||||
float *audio)
|
||||
static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
AACEncContext *s = avctx->priv_data;
|
||||
int i;
|
||||
const uint8_t *sizes[2];
|
||||
int lengths[2];
|
||||
|
||||
avctx->frame_size = 1024;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (avctx->sample_rate == ff_mpeg4audio_sample_rates[i])
|
||||
break;
|
||||
if (i == 16) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n", avctx->sample_rate);
|
||||
return -1;
|
||||
}
|
||||
if (avctx->channels > AAC_MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n", avctx->channels);
|
||||
return -1;
|
||||
}
|
||||
if (avctx->profile != FF_PROFILE_UNKNOWN && avctx->profile != FF_PROFILE_AAC_LOW) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unsupported profile %d\n", avctx->profile);
|
||||
return -1;
|
||||
}
|
||||
if (1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * avctx->channels) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many bits per frame requested\n");
|
||||
return -1;
|
||||
}
|
||||
s->samplerate_index = i;
|
||||
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
ff_mdct_init(&s->mdct1024, 11, 0, 1.0);
|
||||
ff_mdct_init(&s->mdct128, 8, 0, 1.0);
|
||||
// window init
|
||||
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
|
||||
ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
|
||||
ff_init_ff_sine_windows(10);
|
||||
ff_init_ff_sine_windows(7);
|
||||
|
||||
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]);
|
||||
avctx->extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
avctx->extradata_size = 5;
|
||||
put_audio_specific_config(avctx);
|
||||
|
||||
sizes[0] = swb_size_1024[i];
|
||||
sizes[1] = swb_size_128[i];
|
||||
lengths[0] = ff_aac_num_swb_1024[i];
|
||||
lengths[1] = ff_aac_num_swb_128[i];
|
||||
ff_psy_init(&s->psy, avctx, 2, sizes, lengths);
|
||||
s->psypp = ff_psy_preprocess_init(avctx);
|
||||
s->coder = &ff_aac_coders[2];
|
||||
|
||||
s->lambda = avctx->global_quality ? avctx->global_quality : 120;
|
||||
|
||||
ff_aac_tableinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void apply_window_and_mdct(AVCodecContext *avctx, AACEncContext *s,
|
||||
SingleChannelElement *sce, short *audio)
|
||||
{
|
||||
int i, k;
|
||||
const int chans = avctx->channels;
|
||||
const float * lwindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
|
||||
const float * swindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
const float * pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
float *output = sce->ret;
|
||||
|
||||
apply_window[sce->ics.window_sequence[0]](&s->dsp, sce, audio);
|
||||
|
||||
if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE)
|
||||
if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) {
|
||||
memcpy(output, sce->saved, sizeof(float)*1024);
|
||||
if (sce->ics.window_sequence[0] == LONG_STOP_SEQUENCE) {
|
||||
memset(output, 0, sizeof(output[0]) * 448);
|
||||
for (i = 448; i < 576; i++)
|
||||
output[i] = sce->saved[i] * pwindow[i - 448];
|
||||
for (i = 576; i < 704; i++)
|
||||
output[i] = sce->saved[i];
|
||||
}
|
||||
if (sce->ics.window_sequence[0] != LONG_START_SEQUENCE) {
|
||||
for (i = 0; i < 1024; i++) {
|
||||
output[i+1024] = audio[i * chans] * lwindow[1024 - i - 1];
|
||||
sce->saved[i] = audio[i * chans] * lwindow[i];
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 448; i++)
|
||||
output[i+1024] = audio[i * chans];
|
||||
for (; i < 576; i++)
|
||||
output[i+1024] = audio[i * chans] * swindow[576 - i - 1];
|
||||
memset(output+1024+576, 0, sizeof(output[0]) * 448);
|
||||
for (i = 0; i < 1024; i++)
|
||||
sce->saved[i] = audio[i * chans];
|
||||
}
|
||||
s->mdct1024.mdct_calc(&s->mdct1024, sce->coeffs, output);
|
||||
else
|
||||
for (i = 0; i < 1024; i += 128)
|
||||
s->mdct128.mdct_calc(&s->mdct128, sce->coeffs + i, output + i*2);
|
||||
memcpy(audio, audio + 1024, sizeof(audio[0]) * 1024);
|
||||
} else {
|
||||
for (k = 0; k < 1024; k += 128) {
|
||||
for (i = 448 + k; i < 448 + k + 256; i++)
|
||||
output[i - 448 - k] = (i < 1024)
|
||||
? sce->saved[i]
|
||||
: audio[(i-1024)*chans];
|
||||
s->dsp.vector_fmul (output, output, k ? swindow : pwindow, 128);
|
||||
s->dsp.vector_fmul_reverse(output+128, output+128, swindow, 128);
|
||||
s->mdct128.mdct_calc(&s->mdct128, sce->coeffs + k, output);
|
||||
}
|
||||
for (i = 0; i < 1024; i++)
|
||||
sce->saved[i] = audio[i * chans];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,7 +372,7 @@ static void adjust_frame_information(AACEncContext *apc, ChannelElement *cpe, in
|
||||
if (msc == 0 || ics0->max_sfb == 0)
|
||||
cpe->ms_mode = 0;
|
||||
else
|
||||
cpe->ms_mode = msc < ics0->max_sfb * ics0->num_windows ? 1 : 2;
|
||||
cpe->ms_mode = msc < ics0->max_sfb ? 1 : 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,75 +484,70 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s,
|
||||
put_bits(&s->pb, 3, TYPE_FIL);
|
||||
put_bits(&s->pb, 4, FFMIN(namelen, 15));
|
||||
if (namelen >= 15)
|
||||
put_bits(&s->pb, 8, namelen - 14);
|
||||
put_bits(&s->pb, 8, namelen - 16);
|
||||
put_bits(&s->pb, 4, 0); //extension type - filler
|
||||
padbits = -put_bits_count(&s->pb) & 7;
|
||||
avpriv_align_put_bits(&s->pb);
|
||||
padbits = 8 - (put_bits_count(&s->pb) & 7);
|
||||
align_put_bits(&s->pb);
|
||||
for (i = 0; i < namelen - 2; i++)
|
||||
put_bits(&s->pb, 8, name[i]);
|
||||
put_bits(&s->pb, 12 - padbits, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Deinterleave input samples.
|
||||
* Channels are reordered from Libav's default order to AAC order.
|
||||
*/
|
||||
static void deinterleave_input_samples(AACEncContext *s,
|
||||
const float *samples)
|
||||
{
|
||||
int ch, i;
|
||||
const int sinc = s->channels;
|
||||
const uint8_t *channel_map = aac_chan_maps[sinc - 1];
|
||||
|
||||
/* deinterleave and remap input samples */
|
||||
for (ch = 0; ch < sinc; ch++) {
|
||||
const float *sptr = samples + channel_map[ch];
|
||||
|
||||
/* copy last 1024 samples of previous frame to the start of the current frame */
|
||||
memcpy(&s->planar_samples[ch][1024], &s->planar_samples[ch][2048], 1024 * sizeof(s->planar_samples[0][0]));
|
||||
|
||||
/* deinterleave */
|
||||
for (i = 2048; i < 3072; i++) {
|
||||
s->planar_samples[ch][i] = *sptr;
|
||||
sptr += sinc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int aac_encode_frame(AVCodecContext *avctx,
|
||||
uint8_t *frame, int buf_size, void *data)
|
||||
{
|
||||
AACEncContext *s = avctx->priv_data;
|
||||
float **samples = s->planar_samples, *samples2, *la, *overlap;
|
||||
int16_t *samples = s->samples, *samples2, *la;
|
||||
ChannelElement *cpe;
|
||||
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];
|
||||
FFPsyWindowInfo windows[AAC_MAX_CHANNELS];
|
||||
|
||||
if (s->last_frame)
|
||||
return 0;
|
||||
|
||||
if (data) {
|
||||
deinterleave_input_samples(s, data);
|
||||
if (s->psypp)
|
||||
ff_psy_preprocess(s->psypp, s->planar_samples, s->channels);
|
||||
if (!s->psypp) {
|
||||
if (avctx->channels <= 2) {
|
||||
memcpy(s->samples + 1024 * avctx->channels, data,
|
||||
1024 * avctx->channels * sizeof(s->samples[0]));
|
||||
} else {
|
||||
for (i = 0; i < 1024; i++)
|
||||
for (ch = 0; ch < avctx->channels; ch++)
|
||||
s->samples[(i + 1024) * avctx->channels + ch] =
|
||||
((int16_t*)data)[i * avctx->channels +
|
||||
channel_maps[avctx->channels-1][ch]];
|
||||
}
|
||||
} else {
|
||||
start_ch = 0;
|
||||
samples2 = s->samples + 1024 * avctx->channels;
|
||||
for (i = 0; i < chan_map[0]; i++) {
|
||||
tag = chan_map[i+1];
|
||||
chans = tag == TYPE_CPE ? 2 : 1;
|
||||
ff_psy_preprocess(s->psypp,
|
||||
(uint16_t*)data + channel_maps[avctx->channels-1][start_ch],
|
||||
samples2 + start_ch, start_ch, chans);
|
||||
start_ch += chans;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!avctx->frame_number) {
|
||||
memcpy(s->samples, s->samples + 1024 * avctx->channels,
|
||||
1024 * avctx->channels * sizeof(s->samples[0]));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!avctx->frame_number)
|
||||
return 0;
|
||||
|
||||
start_ch = 0;
|
||||
for (i = 0; i < s->chan_map[0]; i++) {
|
||||
for (i = 0; i < chan_map[0]; i++) {
|
||||
FFPsyWindowInfo* wi = windows + start_ch;
|
||||
tag = s->chan_map[i+1];
|
||||
tag = chan_map[i+1];
|
||||
chans = tag == TYPE_CPE ? 2 : 1;
|
||||
cpe = &s->cpe[i];
|
||||
for (ch = 0; ch < chans; ch++) {
|
||||
IndividualChannelStream *ics = &cpe->ch[ch].ics;
|
||||
int cur_channel = start_ch + ch;
|
||||
overlap = &samples[cur_channel][0];
|
||||
samples2 = overlap + 1024;
|
||||
la = samples2 + (448+64);
|
||||
samples2 = samples + cur_channel;
|
||||
la = samples2 + (448+64) * avctx->channels;
|
||||
if (!data)
|
||||
la = NULL;
|
||||
if (tag == TYPE_LFE) {
|
||||
@@ -538,12 +555,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
wi[ch].window_shape = 0;
|
||||
wi[ch].num_windows = 1;
|
||||
wi[ch].grouping[0] = 1;
|
||||
|
||||
/* Only the lowest 12 coefficients are used in a LFE channel.
|
||||
* The expression below results in only the bottom 8 coefficients
|
||||
* being used for 11.025kHz to 16kHz sample rates.
|
||||
*/
|
||||
ics->num_swb = s->samplerate_index >= 8 ? 1 : 3;
|
||||
} else {
|
||||
wi[ch] = s->psy.model->window(&s->psy, samples2, la, cur_channel,
|
||||
ics->window_sequence[0]);
|
||||
@@ -554,11 +565,11 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
ics->use_kb_window[0] = wi[ch].window_shape;
|
||||
ics->num_windows = wi[ch].num_windows;
|
||||
ics->swb_sizes = s->psy.bands [ics->num_windows == 8];
|
||||
ics->num_swb = tag == TYPE_LFE ? ics->num_swb : s->psy.num_bands[ics->num_windows == 8];
|
||||
ics->num_swb = tag == TYPE_LFE ? 12 : s->psy.num_bands[ics->num_windows == 8];
|
||||
for (w = 0; w < ics->num_windows; w++)
|
||||
ics->group_len[w] = wi[ch].grouping[w];
|
||||
|
||||
apply_window_and_mdct(s, &cpe->ch[ch], overlap);
|
||||
apply_window_and_mdct(avctx, s, &cpe->ch[ch], samples2);
|
||||
}
|
||||
start_ch += chans;
|
||||
}
|
||||
@@ -569,19 +580,16 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
put_bitstream_info(avctx, s, LIBAVCODEC_IDENT);
|
||||
start_ch = 0;
|
||||
memset(chan_el_counter, 0, sizeof(chan_el_counter));
|
||||
for (i = 0; i < s->chan_map[0]; i++) {
|
||||
for (i = 0; i < chan_map[0]; i++) {
|
||||
FFPsyWindowInfo* wi = windows + start_ch;
|
||||
const float *coeffs[2];
|
||||
tag = s->chan_map[i+1];
|
||||
tag = chan_map[i+1];
|
||||
chans = tag == TYPE_CPE ? 2 : 1;
|
||||
cpe = &s->cpe[i];
|
||||
put_bits(&s->pb, 3, 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++) {
|
||||
s->cur_channel = start_ch * 2 + ch;
|
||||
s->cur_channel = start_ch + 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);
|
||||
}
|
||||
cpe->common_window = 0;
|
||||
@@ -597,7 +605,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
}
|
||||
}
|
||||
}
|
||||
s->cur_channel = start_ch * 2;
|
||||
s->cur_channel = start_ch;
|
||||
if (s->options.stereo_mode && cpe->common_window) {
|
||||
if (s->options.stereo_mode > 0) {
|
||||
IndividualChannelStream *ics = &cpe->ch[0].ics;
|
||||
@@ -624,8 +632,8 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
frame_bits = put_bits_count(&s->pb);
|
||||
if (frame_bits <= 6144 * s->channels - 3) {
|
||||
s->psy.bitres.bits = frame_bits / s->channels;
|
||||
if (frame_bits <= 6144 * avctx->channels - 3) {
|
||||
s->psy.bitres.bits = frame_bits / avctx->channels;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -646,7 +654,8 @@ static int aac_encode_frame(AVCodecContext *avctx,
|
||||
|
||||
if (!data)
|
||||
s->last_frame = 1;
|
||||
|
||||
memcpy(s->samples, s->samples + 1024 * avctx->channels,
|
||||
1024 * avctx->channels * sizeof(s->samples[0]));
|
||||
return put_bits_count(&s->pb)>>3;
|
||||
}
|
||||
|
||||
@@ -657,116 +666,18 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
|
||||
ff_mdct_end(&s->mdct1024);
|
||||
ff_mdct_end(&s->mdct128);
|
||||
ff_psy_end(&s->psy);
|
||||
if (s->psypp)
|
||||
ff_psy_preprocess_end(s->psypp);
|
||||
av_freep(&s->buffer.samples);
|
||||
ff_psy_preprocess_end(s->psypp);
|
||||
av_freep(&s->samples);
|
||||
av_freep(&s->cpe);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
dsputil_init(&s->dsp, avctx);
|
||||
|
||||
// window init
|
||||
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
|
||||
ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
|
||||
ff_init_ff_sine_windows(10);
|
||||
ff_init_ff_sine_windows(7);
|
||||
|
||||
if (ret = ff_mdct_init(&s->mdct1024, 11, 0, 32768.0))
|
||||
return ret;
|
||||
if (ret = ff_mdct_init(&s->mdct128, 8, 0, 32768.0))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
|
||||
{
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->buffer.samples, 3 * 1024 * s->channels * sizeof(s->buffer.samples[0]), alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->cpe, sizeof(ChannelElement) * s->chan_map[0], alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, avctx->extradata, 5 + FF_INPUT_BUFFER_PADDING_SIZE, alloc_fail);
|
||||
|
||||
for(int ch = 0; ch < s->channels; ch++)
|
||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||
|
||||
return 0;
|
||||
alloc_fail:
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
AACEncContext *s = avctx->priv_data;
|
||||
int i, ret = 0;
|
||||
const uint8_t *sizes[2];
|
||||
uint8_t grouping[AAC_MAX_CHANNELS];
|
||||
int lengths[2];
|
||||
|
||||
avctx->frame_size = 1024;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[i])
|
||||
break;
|
||||
|
||||
s->channels = avctx->channels;
|
||||
|
||||
ERROR_IF(i == 16,
|
||||
"Unsupported sample rate %d\n", avctx->sample_rate);
|
||||
ERROR_IF(s->channels > AAC_MAX_CHANNELS,
|
||||
"Unsupported number of channels: %d\n", s->channels);
|
||||
ERROR_IF(avctx->profile != FF_PROFILE_UNKNOWN && avctx->profile != FF_PROFILE_AAC_LOW,
|
||||
"Unsupported profile %d\n", avctx->profile);
|
||||
ERROR_IF(1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * s->channels,
|
||||
"Too many bits per frame requested\n");
|
||||
|
||||
s->samplerate_index = i;
|
||||
|
||||
s->chan_map = aac_chan_configs[s->channels-1];
|
||||
|
||||
if (ret = dsp_init(avctx, s))
|
||||
goto fail;
|
||||
|
||||
if (ret = alloc_buffers(avctx, s))
|
||||
goto fail;
|
||||
|
||||
avctx->extradata_size = 5;
|
||||
put_audio_specific_config(avctx);
|
||||
|
||||
sizes[0] = swb_size_1024[i];
|
||||
sizes[1] = swb_size_128[i];
|
||||
lengths[0] = ff_aac_num_swb_1024[i];
|
||||
lengths[1] = ff_aac_num_swb_128[i];
|
||||
for (i = 0; i < s->chan_map[0]; i++)
|
||||
grouping[i] = s->chan_map[i + 1] == TYPE_CPE;
|
||||
if (ret = ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], grouping))
|
||||
goto fail;
|
||||
s->psypp = ff_psy_preprocess_init(avctx);
|
||||
s->coder = &ff_aac_coders[s->options.aac_coder];
|
||||
|
||||
s->lambda = avctx->global_quality ? avctx->global_quality : 120;
|
||||
|
||||
ff_aac_tableinit();
|
||||
|
||||
for (i = 0; i < 428; i++)
|
||||
ff_aac_pow34sf_tab[i] = sqrt(ff_aac_pow2sf_tab[i] * sqrt(ff_aac_pow2sf_tab[i]));
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
aac_encode_end(avctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
|
||||
static const AVOption aacenc_options[] = {
|
||||
{"stereo_mode", "Stereo coding method", offsetof(AACEncContext, options.stereo_mode), AV_OPT_TYPE_INT, {.dbl = 0}, -1, 1, AACENC_FLAGS, "stereo_mode"},
|
||||
{"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.dbl = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
|
||||
{"stereo_mode", "Stereo coding method", offsetof(AACEncContext, options.stereo_mode), FF_OPT_TYPE_INT, {.dbl = 0}, -1, 1, AACENC_FLAGS, "stereo_mode"},
|
||||
{"auto", "Selected by the Encoder", 0, FF_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_off", "Disable Mid/Side coding", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
@@ -778,15 +689,15 @@ static const AVClass aacenc_class = {
|
||||
};
|
||||
|
||||
AVCodec ff_aac_encoder = {
|
||||
.name = "aac",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = CODEC_ID_AAC,
|
||||
.priv_data_size = sizeof(AACEncContext),
|
||||
.init = aac_encode_init,
|
||||
.encode = aac_encode_frame,
|
||||
.close = aac_encode_end,
|
||||
"aac",
|
||||
AVMEDIA_TYPE_AUDIO,
|
||||
CODEC_ID_AAC,
|
||||
sizeof(AACEncContext),
|
||||
aac_encode_init,
|
||||
aac_encode_frame,
|
||||
aac_encode_end,
|
||||
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
|
||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,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"),
|
||||
.priv_class = &aacenc_class,
|
||||
};
|
||||
|
@@ -30,11 +30,8 @@
|
||||
|
||||
#include "psymodel.h"
|
||||
|
||||
#define AAC_CODER_NB 4
|
||||
|
||||
typedef struct AACEncOptions {
|
||||
int stereo_mode;
|
||||
int aac_coder;
|
||||
} AACEncOptions;
|
||||
|
||||
struct AACEncContext;
|
||||
@@ -61,11 +58,9 @@ typedef struct AACEncContext {
|
||||
FFTContext mdct1024; ///< long (1024 samples) frame transform context
|
||||
FFTContext mdct128; ///< short (128 samples) frame transform context
|
||||
DSPContext dsp;
|
||||
float *planar_samples[6]; ///< saved preprocessed input
|
||||
int16_t *samples; ///< saved preprocessed input
|
||||
|
||||
int samplerate_index; ///< MPEG-4 samplerate index
|
||||
int channels; ///< channel count
|
||||
const uint8_t *chan_map; ///< channel configuration map
|
||||
|
||||
ChannelElement *cpe; ///< channel elements
|
||||
FFPsyContext psy;
|
||||
@@ -76,12 +71,6 @@ typedef struct AACEncContext {
|
||||
float lambda;
|
||||
DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients
|
||||
DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients
|
||||
|
||||
struct {
|
||||
float *samples;
|
||||
} buffer;
|
||||
} AACEncContext;
|
||||
|
||||
extern float ff_aac_pow34sf_tab[428];
|
||||
|
||||
#endif /* AVCODEC_AACENC_H */
|
||||
|
@@ -28,9 +28,9 @@
|
||||
#include "aacps_tablegen.h"
|
||||
#include "aacpsdata.c"
|
||||
|
||||
#define PS_BASELINE 0 ///< Operate in Baseline PS mode
|
||||
///< Baseline implies 10 or 20 stereo bands,
|
||||
///< mixing mode A, and no ipd/opd
|
||||
#define PS_BASELINE 0 //< Operate in Baseline PS mode
|
||||
//< Baseline implies 10 or 20 stereo bands,
|
||||
//< mixing mode A, and no ipd/opd
|
||||
|
||||
#define numQMFSlots 32 //numTimeSlots * RATE
|
||||
|
||||
@@ -69,19 +69,19 @@ static const int huff_iid[] = {
|
||||
|
||||
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) \
|
||||
/** \
|
||||
* 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, \
|
||||
int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
|
||||
{ \
|
||||
@@ -223,7 +223,7 @@ int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps
|
||||
cnt -= 2 + ps_read_extension_data(gb, ps, ps_extension_id);
|
||||
}
|
||||
if (cnt < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d\n", cnt);
|
||||
av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d", cnt);
|
||||
goto err;
|
||||
}
|
||||
skip_bits(gb, cnt);
|
||||
@@ -275,10 +275,6 @@ int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps
|
||||
err:
|
||||
ps->start = 0;
|
||||
skip_bits_long(gb_host, bits_left);
|
||||
memset(ps->iid_par, 0, sizeof(ps->iid_par));
|
||||
memset(ps->icc_par, 0, sizeof(ps->icc_par));
|
||||
memset(ps->ipd_par, 0, sizeof(ps->ipd_par));
|
||||
memset(ps->opd_par, 0, sizeof(ps->opd_par));
|
||||
return bits_left;
|
||||
}
|
||||
|
||||
@@ -658,7 +654,7 @@ static void decorrelation(PSContext *ps, float (*out)[32][2], const float (*s)[3
|
||||
const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
|
||||
const float peak_decay_factor = 0.76592833836465f;
|
||||
const float transient_impact = 1.5f;
|
||||
const float a_smooth = 0.25f; ///< Smoothing coefficient
|
||||
const float a_smooth = 0.25f; //< Smoothing coefficient
|
||||
int i, k, m, n;
|
||||
int n0 = 0, nL = 32;
|
||||
static const int link_delay[] = { 3, 4, 5 };
|
||||
|
@@ -52,11 +52,11 @@ typedef struct {
|
||||
int num_env;
|
||||
int enable_ipdopd;
|
||||
int border_position[PS_MAX_NUM_ENV+1];
|
||||
int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Intensity Difference Parameters
|
||||
int8_t icc_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-Channel Coherence Parameters
|
||||
int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; //<Inter-channel Intensity Difference Parameters
|
||||
int8_t icc_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; //<Inter-Channel Coherence Parameters
|
||||
/* ipd/opd is iid/icc sized so that the same functions can handle both */
|
||||
int8_t ipd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Phase Difference Parameters
|
||||
int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Overall Phase Difference Parameters
|
||||
int8_t ipd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; //<Inter-channel Phase Difference Parameters
|
||||
int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; //<Overall Phase Difference Parameters
|
||||
int is34bands;
|
||||
int is34bands_old;
|
||||
|
||||
|
@@ -139,7 +139,7 @@ static void ps_tableinit(void)
|
||||
}
|
||||
|
||||
for (iid = 0; iid < 46; iid++) {
|
||||
float c = iid_par_dequant[iid]; ///< Linear Inter-channel Intensity Difference
|
||||
float c = iid_par_dequant[iid]; //<Linear Inter-channel Intensity Difference
|
||||
float c1 = (float)M_SQRT2 / sqrtf(1.0f + c*c);
|
||||
float c2 = c * c1;
|
||||
for (icc = 0; icc < 8; icc++) {
|
||||
|
@@ -216,7 +216,7 @@ static const float psy_fir_coeffs[] = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculate the ABR attack threshold from the above LAME psymodel table.
|
||||
* calculates the attack threshold for ABR from the above table for the LAME psy model
|
||||
*/
|
||||
static float lame_calc_attack_threshold(int bitrate)
|
||||
{
|
||||
@@ -377,10 +377,9 @@ static const uint8_t window_grouping[9] = {
|
||||
* Tell encoder which window types to use.
|
||||
* @see 3GPP TS26.403 5.4.1 "Blockswitching"
|
||||
*/
|
||||
static av_unused FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
|
||||
const int16_t *audio,
|
||||
const int16_t *la,
|
||||
int channel, int prev_type)
|
||||
static FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
|
||||
const int16_t *audio, const int16_t *la,
|
||||
int channel, int prev_type)
|
||||
{
|
||||
int i, j;
|
||||
int br = ctx->avctx->bit_rate / ctx->avctx->channels;
|
||||
@@ -400,7 +399,7 @@ static av_unused FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
|
||||
int stay_short = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
for (j = 0; j < 128; j++) {
|
||||
v = iir_filter(la[i*128+j], pch->iir_state);
|
||||
v = iir_filter(la[(i*128+j)*ctx->avctx->channels], pch->iir_state);
|
||||
sum += v*v;
|
||||
}
|
||||
s[i] = sum;
|
||||
@@ -557,8 +556,8 @@ static float calc_reduced_thr_3gpp(AacPsyBand *band, float min_snr,
|
||||
/**
|
||||
* Calculate band thresholds as suggested in 3GPP TS26.403
|
||||
*/
|
||||
static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
const float *coefs, const FFPsyWindowInfo *wi)
|
||||
static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
|
||||
const float *coefs, const FFPsyWindowInfo *wi)
|
||||
{
|
||||
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
|
||||
AacPsyChannel *pch = &pctx->ch[channel];
|
||||
@@ -627,7 +626,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
}
|
||||
|
||||
/* 5.6.1.3.2 "Calculation of the desired perceptual entropy" */
|
||||
ctx->ch[channel].entropy = pe;
|
||||
ctx->pe[channel] = pe;
|
||||
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);
|
||||
/* NOTE: PE correction is kept simple. During initial testing it had very
|
||||
@@ -731,7 +730,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
for (w = 0; w < wi->num_windows*16; w += 16) {
|
||||
for (g = 0; g < num_bands; g++) {
|
||||
AacPsyBand *band = &pch->band[w+g];
|
||||
FFPsyBand *psy_band = &ctx->ch[channel].psy_bands[w+g];
|
||||
FFPsyBand *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g];
|
||||
|
||||
psy_band->threshold = band->thr;
|
||||
psy_band->energy = band->energy;
|
||||
@@ -741,16 +740,6 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
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)
|
||||
{
|
||||
AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data;
|
||||
@@ -776,8 +765,9 @@ static void lame_apply_block_type(AacPsyChannel *ctx, FFPsyWindowInfo *wi, int u
|
||||
ctx->next_window_seq = blocktype;
|
||||
}
|
||||
|
||||
static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
|
||||
const float *la, int channel, int prev_type)
|
||||
static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx,
|
||||
const int16_t *audio, const int16_t *la,
|
||||
int channel, int prev_type)
|
||||
{
|
||||
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
|
||||
AacPsyChannel *pch = &pctx->ch[channel];
|
||||
@@ -794,20 +784,20 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
|
||||
float attack_intensity[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS];
|
||||
float energy_subshort[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS];
|
||||
float energy_short[AAC_NUM_BLOCKS_SHORT + 1] = { 0 };
|
||||
const float *firbuf = la + (AAC_BLOCK_SIZE_SHORT/4 - PSY_LAME_FIR_LEN);
|
||||
int chans = ctx->avctx->channels;
|
||||
const int16_t *firbuf = la + (AAC_BLOCK_SIZE_SHORT/4 - PSY_LAME_FIR_LEN) * chans;
|
||||
int j, att_sum = 0;
|
||||
|
||||
/* LAME comment: apply high pass filter of fs/4 */
|
||||
for (i = 0; i < AAC_BLOCK_SIZE_LONG; i++) {
|
||||
float sum1, sum2;
|
||||
sum1 = firbuf[i + (PSY_LAME_FIR_LEN - 1) / 2];
|
||||
sum1 = firbuf[(i + ((PSY_LAME_FIR_LEN - 1) / 2)) * chans];
|
||||
sum2 = 0.0;
|
||||
for (j = 0; j < ((PSY_LAME_FIR_LEN - 1) / 2) - 1; j += 2) {
|
||||
sum1 += psy_fir_coeffs[j] * (firbuf[i + j] + firbuf[i + PSY_LAME_FIR_LEN - j]);
|
||||
sum2 += psy_fir_coeffs[j + 1] * (firbuf[i + j + 1] + firbuf[i + PSY_LAME_FIR_LEN - j - 1]);
|
||||
sum1 += psy_fir_coeffs[j] * (firbuf[(i + j) * chans] + firbuf[(i + PSY_LAME_FIR_LEN - j) * chans]);
|
||||
sum2 += psy_fir_coeffs[j + 1] * (firbuf[(i + j + 1) * chans] + firbuf[(i + PSY_LAME_FIR_LEN - j - 1) * chans]);
|
||||
}
|
||||
/* NOTE: The LAME psymodel expects it's input in the range -32768 to 32768. Tuning this for normalized floats would be difficult. */
|
||||
hpfsmpl[i] = (sum1 + sum2) * 32768.0f;
|
||||
hpfsmpl[i] = sum1 + sum2;
|
||||
}
|
||||
|
||||
/* Calculate the energies of each sub-shortblock */
|
||||
@@ -822,15 +812,16 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
|
||||
float const *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS);
|
||||
float p = 1.0f;
|
||||
for (; pf < pfe; pf++)
|
||||
p = FFMAX(p, fabsf(*pf));
|
||||
if (p < fabsf(*pf))
|
||||
p = fabsf(*pf);
|
||||
pch->prev_energy_subshort[i] = energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS] = p;
|
||||
energy_short[1 + i / PSY_LAME_NUM_SUBBLOCKS] += p;
|
||||
/* NOTE: The indexes below are [i + 3 - 2] in the LAME source.
|
||||
* Obviously the 3 and 2 have some significance, or this would be just [i + 1]
|
||||
* (which is what we use here). What the 3 stands for is ambiguous, as it is both
|
||||
* number of short blocks, and the number of sub-short blocks.
|
||||
* It seems that LAME is comparing each sub-block to sub-block + 1 in the
|
||||
* previous block.
|
||||
/* FIXME: The indexes below are [i + 3 - 2] in the LAME source.
|
||||
* Obviously the 3 and 2 have some significance, or this would be just [i + 1]
|
||||
* (which is what we use here). What the 3 stands for is ambigious, as it is both
|
||||
* number of short blocks, and the number of sub-short blocks.
|
||||
* It seems that LAME is comparing each sub-block to sub-block + 1 in the
|
||||
* previous block.
|
||||
*/
|
||||
if (p > energy_subshort[i + 1])
|
||||
p = p / energy_subshort[i + 1];
|
||||
|
@@ -131,8 +131,6 @@ av_cold void ff_aac_sbr_init(void)
|
||||
av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr)
|
||||
{
|
||||
float mdct_scale;
|
||||
if(sbr->mdct.mdct_bits)
|
||||
return;
|
||||
sbr->kx[0] = sbr->kx[1] = 32; //Typo in spec, kx' inits to 32
|
||||
sbr->data[0].e_a[1] = sbr->data[1].e_a[1] = -1;
|
||||
sbr->data[0].synthesis_filterbank_samples_offset = SBR_SYNTHESIS_BUF_SIZE - (1280 - 128);
|
||||
@@ -542,7 +540,7 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr)
|
||||
k = sbr->n_master;
|
||||
} while (sb != sbr->kx[1] + sbr->m[1]);
|
||||
|
||||
if (sbr->num_patches > 1 && sbr->patch_num_subbands[sbr->num_patches-1] < 3)
|
||||
if (sbr->patch_num_subbands[sbr->num_patches-1] < 3 && sbr->num_patches > 1)
|
||||
sbr->num_patches--;
|
||||
|
||||
return 0;
|
||||
@@ -1185,15 +1183,14 @@ static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
|
||||
{
|
||||
int i, n;
|
||||
const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us;
|
||||
const int step = 128 >> div;
|
||||
float *v;
|
||||
for (i = 0; i < 32; i++) {
|
||||
if (*v_off < step) {
|
||||
if (*v_off == 0) {
|
||||
int saved_samples = (1280 - 128) >> div;
|
||||
memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float));
|
||||
*v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - step;
|
||||
*v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - (128 >> div);
|
||||
} else {
|
||||
*v_off -= step;
|
||||
*v_off -= 128 >> div;
|
||||
}
|
||||
v = v0 + *v_off;
|
||||
if (div) {
|
||||
|
@@ -34,10 +34,17 @@
|
||||
|
||||
typedef struct AascContext {
|
||||
AVCodecContext *avctx;
|
||||
GetByteContext gb;
|
||||
AVFrame frame;
|
||||
} AascContext;
|
||||
|
||||
#define FETCH_NEXT_STREAM_BYTE() \
|
||||
if (stream_ptr >= buf_size) \
|
||||
{ \
|
||||
av_log(s->avctx, AV_LOG_ERROR, " AASC: stream ptr just went out of bounds (fetch)\n"); \
|
||||
break; \
|
||||
} \
|
||||
stream_byte = buf[stream_ptr++];
|
||||
|
||||
static av_cold int aasc_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
AascContext *s = avctx->priv_data;
|
||||
@@ -58,7 +65,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
AascContext *s = avctx->priv_data;
|
||||
int compr, i, stride;
|
||||
|
||||
s->frame.reference = 3;
|
||||
s->frame.reference = 1;
|
||||
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
|
||||
if (avctx->reget_buffer(avctx, &s->frame)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
|
||||
@@ -72,18 +79,12 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
case 0:
|
||||
stride = (avctx->width * 3 + 3) & ~3;
|
||||
for(i = avctx->height - 1; i >= 0; i--){
|
||||
if(avctx->width*3 > buf_size){
|
||||
av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n");
|
||||
break;
|
||||
}
|
||||
memcpy(s->frame.data[0] + i*s->frame.linesize[0], buf, avctx->width*3);
|
||||
buf += stride;
|
||||
buf_size -= stride;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
bytestream2_init(&s->gb, buf - 4, buf_size + 4);
|
||||
ff_msrle_decode(avctx, (AVPicture*)&s->frame, 8, &s->gb);
|
||||
ff_msrle_decode(avctx, (AVPicture*)&s->frame, 8, buf - 4, buf_size + 4);
|
||||
break;
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr);
|
||||
@@ -109,13 +110,14 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
AVCodec ff_aasc_decoder = {
|
||||
.name = "aasc",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_AASC,
|
||||
.priv_data_size = sizeof(AascContext),
|
||||
.init = aasc_decode_init,
|
||||
.close = aasc_decode_end,
|
||||
.decode = aasc_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
"aasc",
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_ID_AASC,
|
||||
sizeof(AascContext),
|
||||
aasc_decode_init,
|
||||
NULL,
|
||||
aasc_decode_end,
|
||||
aasc_decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
||||
};
|
||||
|
@@ -120,7 +120,7 @@ typedef struct {
|
||||
uint32_t bit_rate;
|
||||
uint8_t channels;
|
||||
uint16_t frame_size;
|
||||
uint64_t channel_layout;
|
||||
int64_t channel_layout;
|
||||
/** @} */
|
||||
} AC3HeaderInfo;
|
||||
|
||||
@@ -131,8 +131,47 @@ typedef enum {
|
||||
EAC3_FRAME_TYPE_RESERVED
|
||||
} EAC3FrameType;
|
||||
|
||||
/**
|
||||
* Encoding Options used by AVOption.
|
||||
*/
|
||||
typedef struct AC3EncOptions {
|
||||
/* AC-3 metadata options*/
|
||||
int dialogue_level;
|
||||
int bitstream_mode;
|
||||
float center_mix_level;
|
||||
float surround_mix_level;
|
||||
int dolby_surround_mode;
|
||||
int audio_production_info;
|
||||
int mixing_level;
|
||||
int room_type;
|
||||
int copyright;
|
||||
int original;
|
||||
int extended_bsi_1;
|
||||
int preferred_stereo_downmix;
|
||||
float ltrt_center_mix_level;
|
||||
float ltrt_surround_mix_level;
|
||||
float loro_center_mix_level;
|
||||
float loro_surround_mix_level;
|
||||
int extended_bsi_2;
|
||||
int dolby_surround_ex_mode;
|
||||
int dolby_headphone_mode;
|
||||
int ad_converter_type;
|
||||
|
||||
/* other encoding options */
|
||||
int allow_per_frame_metadata;
|
||||
int stereo_rematrixing;
|
||||
int channel_coupling;
|
||||
int cpl_start;
|
||||
} AC3EncOptions;
|
||||
|
||||
void ff_ac3_common_init(void);
|
||||
|
||||
extern const int64_t ff_ac3_channel_layouts[];
|
||||
extern const AVOption ff_ac3_options[];
|
||||
|
||||
extern AVCodec ff_ac3_float_encoder;
|
||||
extern AVCodec ff_ac3_fixed_encoder;
|
||||
|
||||
/**
|
||||
* Calculate the log power-spectral density of the input signal.
|
||||
* This gives a rough estimate of signal power in the frequency domain by using
|
||||
|
@@ -34,20 +34,8 @@ static const uint8_t eac3_blocks[4] = {
|
||||
1, 2, 3, 6
|
||||
};
|
||||
|
||||
/**
|
||||
* Table for center mix levels
|
||||
* reference: Section 5.4.2.4 cmixlev
|
||||
*/
|
||||
static const uint8_t center_levels[4] = { 4, 5, 6, 5 };
|
||||
|
||||
/**
|
||||
* Table for surround mix levels
|
||||
* reference: Section 5.4.2.5 surmixlev
|
||||
*/
|
||||
static const uint8_t surround_levels[4] = { 4, 6, 7, 6 };
|
||||
|
||||
|
||||
int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
|
||||
int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
|
||||
{
|
||||
int frame_size_code;
|
||||
|
||||
@@ -65,8 +53,8 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
|
||||
hdr->num_blocks = 6;
|
||||
|
||||
/* set default mix levels */
|
||||
hdr->center_mix_level = 5; // -4.5dB
|
||||
hdr->surround_mix_level = 6; // -6.0dB
|
||||
hdr->center_mix_level = 1; // -4.5dB
|
||||
hdr->surround_mix_level = 1; // -6.0dB
|
||||
|
||||
if(hdr->bitstream_id <= 10) {
|
||||
/* Normal AC-3 */
|
||||
@@ -88,9 +76,9 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
|
||||
skip_bits(gbc, 2); // skip dsurmod
|
||||
} else {
|
||||
if((hdr->channel_mode & 1) && hdr->channel_mode != AC3_CHMODE_MONO)
|
||||
hdr-> center_mix_level = center_levels[get_bits(gbc, 2)];
|
||||
hdr->center_mix_level = get_bits(gbc, 2);
|
||||
if(hdr->channel_mode & 4)
|
||||
hdr->surround_mix_level = surround_levels[get_bits(gbc, 2)];
|
||||
hdr->surround_mix_level = get_bits(gbc, 2);
|
||||
}
|
||||
hdr->lfe_on = get_bits1(gbc);
|
||||
|
||||
@@ -134,7 +122,7 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
|
||||
(hdr->num_blocks * 256.0));
|
||||
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
|
||||
}
|
||||
hdr->channel_layout = avpriv_ac3_channel_layout_tab[hdr->channel_mode];
|
||||
hdr->channel_layout = ff_ac3_channel_layout_tab[hdr->channel_mode];
|
||||
if (hdr->lfe_on)
|
||||
hdr->channel_layout |= AV_CH_LOW_FREQUENCY;
|
||||
|
||||
@@ -153,7 +141,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
GetBitContext gbc;
|
||||
|
||||
init_get_bits(&gbc, tmp.u8+8-AC3_HEADER_SIZE, 54);
|
||||
err = avpriv_ac3_parse_header(&gbc, &hdr);
|
||||
err = ff_ac3_parse_header(&gbc, &hdr);
|
||||
|
||||
if(err < 0)
|
||||
return 0;
|
||||
@@ -186,9 +174,9 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
|
||||
|
||||
|
||||
AVCodecParser ff_ac3_parser = {
|
||||
.codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 },
|
||||
.priv_data_size = sizeof(AACAC3ParseContext),
|
||||
.parser_init = ac3_parse_init,
|
||||
.parser_parse = ff_aac_ac3_parse,
|
||||
.parser_close = ff_parse_close,
|
||||
{ CODEC_ID_AC3, CODEC_ID_EAC3 },
|
||||
sizeof(AACAC3ParseContext),
|
||||
ac3_parse_init,
|
||||
ff_aac_ac3_parse,
|
||||
ff_parse_close,
|
||||
};
|
||||
|
@@ -36,6 +36,6 @@
|
||||
* -2 if the bsid (version) element is invalid, -3 if the fscod (sample rate)
|
||||
* element is invalid, or -4 if the frmsizecod (bit rate) element is invalid.
|
||||
*/
|
||||
int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr);
|
||||
int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr);
|
||||
|
||||
#endif /* AVCODEC_AC3_PARSER_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -66,9 +66,7 @@
|
||||
#define AC3_FRAME_BUFFER_SIZE 32768
|
||||
|
||||
typedef struct {
|
||||
AVClass *class; ///< class for AVOptions
|
||||
AVCodecContext *avctx; ///< parent context
|
||||
AVFrame frame; ///< AVFrame for decoded output
|
||||
GetBitContext gbc; ///< bitstream reader
|
||||
|
||||
///@name Bit stream information
|
||||
@@ -89,12 +87,6 @@ typedef struct {
|
||||
int eac3; ///< indicates if current frame is E-AC-3
|
||||
///@}
|
||||
|
||||
int preferred_stereo_downmix;
|
||||
float ltrt_center_mix_level;
|
||||
float ltrt_surround_mix_level;
|
||||
float loro_center_mix_level;
|
||||
float loro_surround_mix_level;
|
||||
|
||||
///@name Frame syntax parameters
|
||||
int snr_offset_strategy; ///< SNR offset strategy (snroffststr)
|
||||
int block_switch_syntax; ///< block switch syntax enabled (blkswe)
|
||||
@@ -151,7 +143,6 @@ typedef struct {
|
||||
|
||||
///@name Dynamic range
|
||||
float dynamic_range[2]; ///< dynamic range
|
||||
float drc_scale; ///< percentage of dynamic range compression to be applied
|
||||
///@}
|
||||
|
||||
///@name Bandwidth
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include "avcodec.h"
|
||||
#include "ac3.h"
|
||||
#include "ac3dsp.h"
|
||||
#include "mathops.h"
|
||||
|
||||
static void ac3_exponent_min_c(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
|
||||
{
|
||||
@@ -109,7 +108,7 @@ static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t *psd,
|
||||
int snr_offset, int floor,
|
||||
const uint8_t *bap_tab, uint8_t *bap)
|
||||
{
|
||||
int bin, band, band_end;
|
||||
int bin, band;
|
||||
|
||||
/* special case, if snr offset is -960, set all bap's to zero */
|
||||
if (snr_offset == -960) {
|
||||
@@ -121,14 +120,12 @@ static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t *psd,
|
||||
band = ff_ac3_bin_to_band_tab[start];
|
||||
do {
|
||||
int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
|
||||
band_end = ff_ac3_band_start_tab[++band];
|
||||
band_end = FFMIN(band_end, end);
|
||||
|
||||
int band_end = FFMIN(ff_ac3_band_start_tab[band+1], end);
|
||||
for (; bin < band_end; bin++) {
|
||||
int address = av_clip((psd[bin] - m) >> 5, 0, 63);
|
||||
bap[bin] = bap_tab[address];
|
||||
}
|
||||
} while (end > band_end);
|
||||
} while (end > ff_ac3_band_start_tab[band++]);
|
||||
}
|
||||
|
||||
static void ac3_update_bap_counts_c(uint16_t mant_cnt[16], uint8_t *bap,
|
||||
@@ -167,50 +164,21 @@ static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nb_coefs; i++) {
|
||||
int e;
|
||||
int v = abs(coef[i]);
|
||||
exp[i] = v ? 23 - av_log2(v) : 24;
|
||||
}
|
||||
}
|
||||
|
||||
static void ac3_sum_square_butterfly_int32_c(int64_t sum[4],
|
||||
const int32_t *coef0,
|
||||
const int32_t *coef1,
|
||||
int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
sum[0] = sum[1] = sum[2] = sum[3] = 0;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
int lt = coef0[i];
|
||||
int rt = coef1[i];
|
||||
int md = lt + rt;
|
||||
int sd = lt - rt;
|
||||
MAC64(sum[0], lt, lt);
|
||||
MAC64(sum[1], rt, rt);
|
||||
MAC64(sum[2], md, md);
|
||||
MAC64(sum[3], sd, sd);
|
||||
}
|
||||
}
|
||||
|
||||
static void ac3_sum_square_butterfly_float_c(float sum[4],
|
||||
const float *coef0,
|
||||
const float *coef1,
|
||||
int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
sum[0] = sum[1] = sum[2] = sum[3] = 0;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
float lt = coef0[i];
|
||||
float rt = coef1[i];
|
||||
float md = lt + rt;
|
||||
float sd = lt - rt;
|
||||
sum[0] += lt * lt;
|
||||
sum[1] += rt * rt;
|
||||
sum[2] += md * md;
|
||||
sum[3] += sd * sd;
|
||||
if (v == 0)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,8 +193,6 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
|
||||
c->update_bap_counts = ac3_update_bap_counts_c;
|
||||
c->compute_mantissa_size = ac3_compute_mantissa_size_c;
|
||||
c->extract_exponents = ac3_extract_exponents_c;
|
||||
c->sum_square_butterfly_int32 = ac3_sum_square_butterfly_int32_c;
|
||||
c->sum_square_butterfly_float = ac3_sum_square_butterfly_float_c;
|
||||
|
||||
if (ARCH_ARM)
|
||||
ff_ac3dsp_init_arm(c, bit_exact);
|
||||
|
@@ -125,12 +125,6 @@ typedef struct AC3DSPContext {
|
||||
int (*compute_mantissa_size)(uint16_t mant_cnt[6][16]);
|
||||
|
||||
void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
|
||||
void (*sum_square_butterfly_int32)(int64_t sum[4], const int32_t *coef0,
|
||||
const int32_t *coef1, int len);
|
||||
|
||||
void (*sum_square_butterfly_float)(float sum[4], const float *coef0,
|
||||
const float *coef1, int len);
|
||||
} AC3DSPContext;
|
||||
|
||||
void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact);
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user