Compare commits
512 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -7,6 +7,10 @@
|
|||||||
*-example
|
*-example
|
||||||
*-test
|
*-test
|
||||||
*_g
|
*_g
|
||||||
|
*.def
|
||||||
|
*.dll
|
||||||
|
*.lib
|
||||||
|
*.exp
|
||||||
config.*
|
config.*
|
||||||
doc/*.1
|
doc/*.1
|
||||||
doc/*.html
|
doc/*.html
|
||||||
|
706
Changelog
706
Changelog
@@ -1,706 +0,0 @@
|
|||||||
Entries are sorted chronologically from oldest to youngest within each release,
|
|
||||||
releases are sorted from youngest to oldest.
|
|
||||||
|
|
||||||
|
|
||||||
version 0.7:
|
|
||||||
|
|
||||||
- many many things we forgot because we rather write code than changelogs
|
|
||||||
- libmpcodecs video filter support (3 times as many filters than before)
|
|
||||||
- mpeg2 aspect ratio dection fixed
|
|
||||||
- libxvid aspect pickiness fixed
|
|
||||||
- Frame multithreaded decoding
|
|
||||||
- E-AC-3 audio encoder
|
|
||||||
- ac3enc: add channel coupling support
|
|
||||||
- floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.
|
|
||||||
- H264/MPEG frame-level multi-threading
|
|
||||||
- All av_metadata_* functions renamed to av_dict_* and moved to libavutil
|
|
||||||
- 4:4:4 H.264 decoding support
|
|
||||||
- 10-bit H.264 optimizations for x86
|
|
||||||
- lut, lutrgb, and lutyuv filters added
|
|
||||||
- buffersink libavfilter sink added
|
|
||||||
- Bump libswscale for recently reported ABI break
|
|
||||||
|
|
||||||
|
|
||||||
version 0.7_beta2:
|
|
||||||
|
|
||||||
- VP8 frame-multithreading
|
|
||||||
- NEON optimizations for VP8
|
|
||||||
- Lots of deprecated API cruft removed
|
|
||||||
- fft and imdct optimizations for AVX (Sandy Bridge) processors
|
|
||||||
- showinfo filter added
|
|
||||||
- DPX image encoder
|
|
||||||
- SMPTE 302M AES3 audio decoder
|
|
||||||
- Apple Core Audio Format muxer
|
|
||||||
- 9bit and 10bit per sample support in the H.264 decoder
|
|
||||||
- 9bit and 10bit FFV1 encoding / decoding
|
|
||||||
- split filter added
|
|
||||||
- select filter added
|
|
||||||
- sdl output device added
|
|
||||||
|
|
||||||
|
|
||||||
version 0.7_beta1:
|
|
||||||
|
|
||||||
- WebM support in Matroska de/muxer
|
|
||||||
- low overhead Ogg muxing
|
|
||||||
- MMS-TCP support
|
|
||||||
- VP8 de/encoding via libvpx
|
|
||||||
- Demuxer for On2's IVF format
|
|
||||||
- Pictor/PC Paint decoder
|
|
||||||
- HE-AAC v2 decoder
|
|
||||||
- libfaad2 wrapper removed
|
|
||||||
- DTS-ES extension (XCh) decoding support
|
|
||||||
- native VP8 decoder
|
|
||||||
- RTSP tunneling over HTTP
|
|
||||||
- RTP depacketization of SVQ3
|
|
||||||
- -strict inofficial replaced by -strict unofficial
|
|
||||||
- ffplay -exitonkeydown and -exitonmousedown options added
|
|
||||||
- native GSM / GSM MS decoder
|
|
||||||
- RTP depacketization of QDM2
|
|
||||||
- ANSI/ASCII art playback system
|
|
||||||
- Lego Mindstorms RSO de/muxer
|
|
||||||
- libavcore added
|
|
||||||
- SubRip subtitle file muxer and demuxer
|
|
||||||
- Chinese AVS encoding via libxavs
|
|
||||||
- ffprobe -show_packets option added
|
|
||||||
- RTP packetization of Theora and Vorbis
|
|
||||||
- RTP depacketization of MP4A-LATM
|
|
||||||
- RTP packetization and depacketization of VP8
|
|
||||||
- hflip filter
|
|
||||||
- Apple HTTP Live Streaming demuxer
|
|
||||||
- a64 codec
|
|
||||||
- MMS-HTTP support
|
|
||||||
- G.722 ADPCM audio encoder/decoder
|
|
||||||
- R10k video decoder
|
|
||||||
- ocv_smooth filter
|
|
||||||
- frei0r wrapper filter
|
|
||||||
- change crop filter syntax to width:height:x:y
|
|
||||||
- make the crop filter accept parametric expressions
|
|
||||||
- make ffprobe accept AVFormatContext options
|
|
||||||
- yadif filter
|
|
||||||
- blackframe filter
|
|
||||||
- Demuxer for Leitch/Harris' VR native stream format (LXF)
|
|
||||||
- RTP depacketization of the X-QT QuickTime format
|
|
||||||
- SAP (Session Announcement Protocol, RFC 2974) muxer and demuxer
|
|
||||||
- cropdetect filter
|
|
||||||
- ffmpeg -crop* options removed
|
|
||||||
- transpose filter added
|
|
||||||
- ffmpeg -force_key_frames option added
|
|
||||||
- demuxer for receiving raw rtp:// URLs without an SDP description
|
|
||||||
- single stream LATM/LOAS decoder
|
|
||||||
- setpts filter added
|
|
||||||
- Win64 support for optimized asm functions
|
|
||||||
- MJPEG/AVI1 to JPEG/JFIF bitstream filter
|
|
||||||
- ASS subtitle encoder and decoder
|
|
||||||
- IEC 61937 encapsulation for E-AC3, TrueHD, DTS-HD (for HDMI passthrough)
|
|
||||||
- overlay filter added
|
|
||||||
- rename aspect filter to setdar, and pixelaspect to setsar
|
|
||||||
- IEC 61937 demuxer
|
|
||||||
- Mobotix .mxg demuxer
|
|
||||||
- frei0r source added
|
|
||||||
- hqdn3d filter added
|
|
||||||
- RTP depacketization of QCELP
|
|
||||||
- FLAC parser added
|
|
||||||
- gradfun filter added
|
|
||||||
- AMR-WB decoder
|
|
||||||
- replace the ocv_smooth filter with a more generic ocv filter
|
|
||||||
- Windows Televison (WTV) demuxer
|
|
||||||
- FFmpeg metadata format muxer and demuxer
|
|
||||||
- SubRip (srt) subtitle encoder and decoder
|
|
||||||
- floating-point AC-3 encoder added
|
|
||||||
- Lagarith decoder
|
|
||||||
- ffmpeg -copytb option added
|
|
||||||
- IVF muxer added
|
|
||||||
- Wing Commander IV movies decoder added
|
|
||||||
- movie source added
|
|
||||||
- Bink version 'b' audio and video decoder
|
|
||||||
- Bitmap Brothers JV playback system
|
|
||||||
- Apple HTTP Live Streaming protocol handler
|
|
||||||
- sndio support for playback and record
|
|
||||||
- Linux framebuffer input device added
|
|
||||||
- Chronomaster DFA decoder
|
|
||||||
- DPX image encoder
|
|
||||||
- MicroDVD subtitle file muxer and demuxer
|
|
||||||
- Playstation Portable PMP format demuxer
|
|
||||||
- fieldorder video filter added
|
|
||||||
- AAC encoding via libvo-aacenc
|
|
||||||
- AMR-WB encoding via libvo-amrwbenc
|
|
||||||
- xWMA demuxer
|
|
||||||
- Mobotix MxPEG decoder
|
|
||||||
|
|
||||||
|
|
||||||
version 0.6:
|
|
||||||
|
|
||||||
- PB-frame decoding for H.263
|
|
||||||
- deprecated vhook subsystem removed
|
|
||||||
- deprecated old scaler removed
|
|
||||||
- VQF demuxer
|
|
||||||
- Alpha channel scaler
|
|
||||||
- PCX encoder
|
|
||||||
- RTP packetization of H.263
|
|
||||||
- RTP packetization of AMR
|
|
||||||
- RTP depacketization of Vorbis
|
|
||||||
- CorePNG decoding support
|
|
||||||
- Cook multichannel decoding support
|
|
||||||
- introduced avlanguage helpers in libavformat
|
|
||||||
- 8088flex TMV demuxer and decoder
|
|
||||||
- per-stream language-tags extraction in asfdec
|
|
||||||
- V210 decoder and encoder
|
|
||||||
- remaining GPL parts in AC-3 decoder converted to LGPL
|
|
||||||
- QCP demuxer
|
|
||||||
- SoX native format muxer and demuxer
|
|
||||||
- AMR-NB decoding/encoding, AMR-WB decoding via OpenCORE libraries
|
|
||||||
- DPX image decoder
|
|
||||||
- Electronic Arts Madcow decoder
|
|
||||||
- DivX (XSUB) subtitle encoder
|
|
||||||
- nonfree libamr support for AMR-NB/WB decoding/encoding removed
|
|
||||||
- experimental AAC encoder
|
|
||||||
- RTP depacketization of ASF and RTSP from WMS servers
|
|
||||||
- RTMP support in libavformat
|
|
||||||
- noX handling for OPT_BOOL X options
|
|
||||||
- Wave64 demuxer
|
|
||||||
- IEC-61937 compatible Muxer
|
|
||||||
- TwinVQ decoder
|
|
||||||
- Bluray (PGS) subtitle decoder
|
|
||||||
- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks)
|
|
||||||
- WMA Pro decoder
|
|
||||||
- Core Audio Format demuxer
|
|
||||||
- Atrac1 decoder
|
|
||||||
- MD STUDIO audio demuxer
|
|
||||||
- RF64 support in WAV demuxer
|
|
||||||
- MPEG-4 Audio Lossless Coding (ALS) decoder
|
|
||||||
- -formats option split into -formats, -codecs, -bsfs, and -protocols
|
|
||||||
- IV8 demuxer
|
|
||||||
- CDG demuxer and decoder
|
|
||||||
- R210 decoder
|
|
||||||
- Auravision Aura 1 and 2 decoders
|
|
||||||
- Deluxe Paint Animation playback system
|
|
||||||
- SIPR decoder
|
|
||||||
- Adobe Filmstrip muxer and demuxer
|
|
||||||
- RTP depacketization of H.263
|
|
||||||
- Bink demuxer and audio/video decoders
|
|
||||||
- enable symbol versioning by default for linkers that support it
|
|
||||||
- IFF PBM/ILBM bitmap decoder
|
|
||||||
- concat protocol
|
|
||||||
- Indeo 5 decoder
|
|
||||||
- RTP depacketization of AMR
|
|
||||||
- WMA Voice decoder
|
|
||||||
- ffprobe tool
|
|
||||||
- AMR-NB decoder
|
|
||||||
- RTSP muxer
|
|
||||||
- HE-AAC v1 decoder
|
|
||||||
- Kega Game Video (KGV1) decoder
|
|
||||||
- VorbisComment writing for FLAC, Ogg FLAC and Ogg Speex files
|
|
||||||
- RTP depacketization of Theora
|
|
||||||
- HTTP Digest authentication
|
|
||||||
- RTMP/RTMPT/RTMPS/RTMPE/RTMPTE protocol support via librtmp
|
|
||||||
- Psygnosis YOP demuxer and video decoder
|
|
||||||
- spectral extension support in the E-AC-3 decoder
|
|
||||||
- unsharp video filter
|
|
||||||
- RTP hinting in the mov/3gp/mp4 muxer
|
|
||||||
- Dirac in Ogg demuxing
|
|
||||||
- seek to keyframes in Ogg
|
|
||||||
- 4:2:2 and 4:4:4 Theora decoding
|
|
||||||
- 35% faster VP3/Theora decoding
|
|
||||||
- faster AAC decoding
|
|
||||||
- faster H.264 decoding
|
|
||||||
- RealAudio 1.0 (14.4K) encoder
|
|
||||||
|
|
||||||
|
|
||||||
version 0.5:
|
|
||||||
|
|
||||||
- DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer
|
|
||||||
- TechSmith Camtasia (TSCC) video decoder
|
|
||||||
- IBM Ultimotion (ULTI) video decoder
|
|
||||||
- Sierra Online audio file demuxer and decoder
|
|
||||||
- Apple QuickDraw (qdrw) video decoder
|
|
||||||
- Creative ADPCM audio decoder (16 bits as well as 8 bits schemes)
|
|
||||||
- Electronic Arts Multimedia (WVE/UV2/etc.) file demuxer
|
|
||||||
- Miro VideoXL (VIXL) video decoder
|
|
||||||
- H.261 video encoder
|
|
||||||
- QPEG video decoder
|
|
||||||
- Nullsoft Video (NSV) file demuxer
|
|
||||||
- Shorten audio decoder
|
|
||||||
- LOCO video decoder
|
|
||||||
- Apple Lossless Audio Codec (ALAC) decoder
|
|
||||||
- Winnov WNV1 video decoder
|
|
||||||
- Autodesk Animator Studio Codec (AASC) decoder
|
|
||||||
- Indeo 2 video decoder
|
|
||||||
- Fraps FPS1 video decoder
|
|
||||||
- Snow video encoder/decoder
|
|
||||||
- Sonic audio encoder/decoder
|
|
||||||
- Vorbis audio decoder
|
|
||||||
- Macromedia ADPCM decoder
|
|
||||||
- Duck TrueMotion 2 video decoder
|
|
||||||
- support for decoding FLX and DTA extensions in FLIC files
|
|
||||||
- H.264 custom quantization matrices support
|
|
||||||
- ffserver fixed, it should now be usable again
|
|
||||||
- QDM2 audio decoder
|
|
||||||
- Real Cooker audio decoder
|
|
||||||
- TrueSpeech audio decoder
|
|
||||||
- WMA2 audio decoder fixed, now all files should play correctly
|
|
||||||
- RealAudio 14.4 and 28.8 decoders fixed
|
|
||||||
- JPEG-LS decoder
|
|
||||||
- build system improvements
|
|
||||||
- tabs and trailing whitespace removed from the codebase
|
|
||||||
- CamStudio video decoder
|
|
||||||
- AIFF/AIFF-C audio format, encoding and decoding
|
|
||||||
- ADTS AAC file reading and writing
|
|
||||||
- Creative VOC file reading and writing
|
|
||||||
- American Laser Games multimedia (*.mm) playback system
|
|
||||||
- Zip Motion Blocks Video decoder
|
|
||||||
- improved Theora/VP3 decoder
|
|
||||||
- True Audio (TTA) decoder
|
|
||||||
- AVS demuxer and video decoder
|
|
||||||
- JPEG-LS encoder
|
|
||||||
- Smacker demuxer and decoder
|
|
||||||
- NuppelVideo/MythTV demuxer and RTjpeg decoder
|
|
||||||
- KMVC decoder
|
|
||||||
- MPEG-2 intra VLC support
|
|
||||||
- MPEG-2 4:2:2 encoder
|
|
||||||
- Flash Screen Video decoder
|
|
||||||
- GXF demuxer
|
|
||||||
- Chinese AVS decoder
|
|
||||||
- GXF muxer
|
|
||||||
- MXF demuxer
|
|
||||||
- VC-1/WMV3/WMV9 video decoder
|
|
||||||
- MacIntel support
|
|
||||||
- AVISynth support
|
|
||||||
- VMware video decoder
|
|
||||||
- VP5 video decoder
|
|
||||||
- VP6 video decoder
|
|
||||||
- WavPack lossless audio decoder
|
|
||||||
- Targa (.TGA) picture decoder
|
|
||||||
- Vorbis audio encoder
|
|
||||||
- Delphine Software .cin demuxer/audio and video decoder
|
|
||||||
- Tiertex .seq demuxer/video decoder
|
|
||||||
- MTV demuxer
|
|
||||||
- TIFF picture encoder and decoder
|
|
||||||
- GIF picture decoder
|
|
||||||
- Intel Music Coder decoder
|
|
||||||
- Zip Motion Blocks Video encoder
|
|
||||||
- Musepack decoder
|
|
||||||
- Flash Screen Video encoder
|
|
||||||
- Theora encoding via libtheora
|
|
||||||
- BMP encoder
|
|
||||||
- WMA encoder
|
|
||||||
- GSM-MS encoder and decoder
|
|
||||||
- DCA decoder
|
|
||||||
- DXA demuxer and decoder
|
|
||||||
- DNxHD decoder
|
|
||||||
- Gamecube movie (.THP) playback system
|
|
||||||
- Blackfin optimizations
|
|
||||||
- Interplay C93 demuxer and video decoder
|
|
||||||
- Bethsoft VID demuxer and video decoder
|
|
||||||
- CRYO APC demuxer
|
|
||||||
- Atrac3 decoder
|
|
||||||
- V.Flash PTX decoder
|
|
||||||
- RoQ muxer, RoQ audio encoder
|
|
||||||
- Renderware TXD demuxer and decoder
|
|
||||||
- extern C declarations for C++ removed from headers
|
|
||||||
- sws_flags command line option
|
|
||||||
- codebook generator
|
|
||||||
- RoQ video encoder
|
|
||||||
- QTRLE encoder
|
|
||||||
- OS/2 support removed and restored again
|
|
||||||
- AC-3 decoder
|
|
||||||
- NUT muxer
|
|
||||||
- additional SPARC (VIS) optimizations
|
|
||||||
- Matroska muxer
|
|
||||||
- slice-based parallel H.264 decoding
|
|
||||||
- Monkey's Audio demuxer and decoder
|
|
||||||
- AMV audio and video decoder
|
|
||||||
- DNxHD encoder
|
|
||||||
- H.264 PAFF decoding
|
|
||||||
- Nellymoser ASAO decoder
|
|
||||||
- Beam Software SIFF demuxer and decoder
|
|
||||||
- libvorbis Vorbis decoding removed in favor of native decoder
|
|
||||||
- IntraX8 (J-Frame) subdecoder for WMV2 and VC-1
|
|
||||||
- Ogg (Theora, Vorbis and FLAC) muxer
|
|
||||||
- The "device" muxers and demuxers are now in a new libavdevice library
|
|
||||||
- PC Paintbrush PCX decoder
|
|
||||||
- Sun Rasterfile decoder
|
|
||||||
- TechnoTrend PVA demuxer
|
|
||||||
- Linux Media Labs MPEG-4 (LMLM4) demuxer
|
|
||||||
- AVM2 (Flash 9) SWF muxer
|
|
||||||
- QT variant of IMA ADPCM encoder
|
|
||||||
- VFW grabber
|
|
||||||
- iPod/iPhone compatible mp4 muxer
|
|
||||||
- Mimic decoder
|
|
||||||
- MSN TCP Webcam stream demuxer
|
|
||||||
- RL2 demuxer / decoder
|
|
||||||
- IFF demuxer
|
|
||||||
- 8SVX audio decoder
|
|
||||||
- non-recursive Makefiles
|
|
||||||
- BFI demuxer
|
|
||||||
- MAXIS EA XA (.xa) demuxer / decoder
|
|
||||||
- BFI video decoder
|
|
||||||
- OMA demuxer
|
|
||||||
- MLP/TrueHD decoder
|
|
||||||
- Electronic Arts CMV decoder
|
|
||||||
- Motion Pixels Video decoder
|
|
||||||
- Motion Pixels MVI demuxer
|
|
||||||
- removed animated GIF decoder/demuxer
|
|
||||||
- D-Cinema audio muxer
|
|
||||||
- Electronic Arts TGV decoder
|
|
||||||
- Apple Lossless Audio Codec (ALAC) encoder
|
|
||||||
- AAC decoder
|
|
||||||
- floating point PCM encoder/decoder
|
|
||||||
- MXF muxer
|
|
||||||
- DV100 AKA DVCPRO HD decoder and demuxer
|
|
||||||
- E-AC-3 support added to AC-3 decoder
|
|
||||||
- Nellymoser ASAO encoder
|
|
||||||
- ASS and SSA demuxer and muxer
|
|
||||||
- liba52 wrapper removed
|
|
||||||
- SVQ3 watermark decoding support
|
|
||||||
- Speex decoding via libspeex
|
|
||||||
- Electronic Arts TGQ decoder
|
|
||||||
- RV40 decoder
|
|
||||||
- QCELP / PureVoice decoder
|
|
||||||
- RV30 decoder
|
|
||||||
- hybrid WavPack support
|
|
||||||
- R3D REDCODE demuxer
|
|
||||||
- ALSA support for playback and record
|
|
||||||
- Electronic Arts TQI decoder
|
|
||||||
- OpenJPEG based JPEG 2000 decoder
|
|
||||||
- NC (NC4600) camera file demuxer
|
|
||||||
- Gopher client support
|
|
||||||
- MXF D-10 muxer
|
|
||||||
- generic metadata API
|
|
||||||
- flash ScreenVideo2 encoder
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.9-pre1:
|
|
||||||
|
|
||||||
- DV encoder, DV muxer
|
|
||||||
- Microsoft RLE video decoder
|
|
||||||
- Microsoft Video-1 decoder
|
|
||||||
- Apple Animation (RLE) decoder
|
|
||||||
- Apple Graphics (SMC) decoder
|
|
||||||
- Apple Video (RPZA) decoder
|
|
||||||
- Cinepak decoder
|
|
||||||
- Sega FILM (CPK) file demuxer
|
|
||||||
- Westwood multimedia support (VQA & AUD files)
|
|
||||||
- Id Quake II CIN playback support
|
|
||||||
- 8BPS video decoder
|
|
||||||
- FLIC playback support
|
|
||||||
- RealVideo 2.0 (RV20) decoder
|
|
||||||
- Duck TrueMotion v1 (DUCK) video decoder
|
|
||||||
- Sierra VMD demuxer and video decoder
|
|
||||||
- MSZH and ZLIB decoder support
|
|
||||||
- SVQ1 video encoder
|
|
||||||
- AMR-WB support
|
|
||||||
- PPC optimizations
|
|
||||||
- rate distortion optimal cbp support
|
|
||||||
- rate distorted optimal ac prediction for MPEG-4
|
|
||||||
- rate distorted optimal lambda->qp support
|
|
||||||
- AAC encoding with libfaac
|
|
||||||
- Sunplus JPEG codec (SP5X) support
|
|
||||||
- use Lagrange multipler instead of QP for ratecontrol
|
|
||||||
- Theora/VP3 decoding support
|
|
||||||
- XA and ADX ADPCM codecs
|
|
||||||
- export MPEG-2 active display area / pan scan
|
|
||||||
- Add support for configuring with IBM XLC
|
|
||||||
- floating point AAN DCT
|
|
||||||
- initial support for zygo video (not complete)
|
|
||||||
- RGB ffv1 support
|
|
||||||
- new audio/video parser API
|
|
||||||
- av_log() system
|
|
||||||
- av_read_frame() and av_seek_frame() support
|
|
||||||
- missing last frame fixes
|
|
||||||
- seek by mouse in ffplay
|
|
||||||
- noise reduction of DCT coefficients
|
|
||||||
- H.263 OBMC & 4MV support
|
|
||||||
- H.263 alternative inter vlc support
|
|
||||||
- H.263 loop filter
|
|
||||||
- H.263 slice structured mode
|
|
||||||
- interlaced DCT support for MPEG-2 encoding
|
|
||||||
- stuffing to stay above min_bitrate
|
|
||||||
- MB type & QP visualization
|
|
||||||
- frame stepping for ffplay
|
|
||||||
- interlaced motion estimation
|
|
||||||
- alternate scantable support
|
|
||||||
- SVCD scan offset support
|
|
||||||
- closed GOP support
|
|
||||||
- SSE2 FDCT
|
|
||||||
- quantizer noise shaping
|
|
||||||
- G.726 ADPCM audio codec
|
|
||||||
- MS ADPCM encoding
|
|
||||||
- multithreaded/SMP motion estimation
|
|
||||||
- multithreaded/SMP encoding for MPEG-1/MPEG-2/MPEG-4/H.263
|
|
||||||
- multithreaded/SMP decoding for MPEG-2
|
|
||||||
- FLAC decoder
|
|
||||||
- Metrowerks CodeWarrior suppport
|
|
||||||
- H.263+ custom pcf support
|
|
||||||
- nicer output for 'ffmpeg -formats'
|
|
||||||
- Matroska demuxer
|
|
||||||
- SGI image format, encoding and decoding
|
|
||||||
- H.264 loop filter support
|
|
||||||
- H.264 CABAC support
|
|
||||||
- nicer looking arrows for the motion vector visualization
|
|
||||||
- improved VCD support
|
|
||||||
- audio timestamp drift compensation
|
|
||||||
- MPEG-2 YUV 422/444 support
|
|
||||||
- polyphase kaiser windowed sinc and blackman nuttall windowed sinc audio resample
|
|
||||||
- better image scaling
|
|
||||||
- H.261 support
|
|
||||||
- correctly interleave packets during encoding
|
|
||||||
- VIS optimized motion compensation
|
|
||||||
- intra_dc_precision>0 encoding support
|
|
||||||
- support reuse of motion vectors/MB types/field select values of the source video
|
|
||||||
- more accurate deblock filter
|
|
||||||
- padding support
|
|
||||||
- many optimizations and bugfixes
|
|
||||||
- FunCom ISS audio file demuxer and according ADPCM decoding
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.8:
|
|
||||||
|
|
||||||
- MPEG-2 video encoding (Michael)
|
|
||||||
- Id RoQ playback subsystem (Mike Melanson and Tim Ferguson)
|
|
||||||
- Wing Commander III Movie (.mve) file playback subsystem (Mike Melanson
|
|
||||||
and Mario Brito)
|
|
||||||
- Xan DPCM audio decoder (Mario Brito)
|
|
||||||
- Interplay MVE playback subsystem (Mike Melanson)
|
|
||||||
- Duck DK3 and DK4 ADPCM audio decoders (Mike Melanson)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.7:
|
|
||||||
|
|
||||||
- RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders. Author unknown, code from mplayerhq
|
|
||||||
(originally from public domain player for Amiga at http://www.honeypot.net/audio)
|
|
||||||
- current version now also compiles with older GCC (Fabrice)
|
|
||||||
- 4X multimedia playback system including 4xm file demuxer (Mike
|
|
||||||
Melanson), and 4X video and audio codecs (Michael)
|
|
||||||
- Creative YUV (CYUV) decoder (Mike Melanson)
|
|
||||||
- FFV1 codec (our very simple lossless intra only codec, compresses much better
|
|
||||||
than HuffYUV) (Michael)
|
|
||||||
- ASV1 (Asus), H.264, Intel indeo3 codecs have been added (various)
|
|
||||||
- tiny PNG encoder and decoder, tiny GIF decoder, PAM decoder (PPM with
|
|
||||||
alpha support), JPEG YUV colorspace support. (Fabrice Bellard)
|
|
||||||
- ffplay has been replaced with a newer version which uses SDL (optionally)
|
|
||||||
for multiplatform support (Fabrice)
|
|
||||||
- Sorenson Version 3 codec (SVQ3) support has been added (decoding only) - donated
|
|
||||||
by anonymous
|
|
||||||
- AMR format has been added (Johannes Carlsson)
|
|
||||||
- 3GP support has been added (Johannes Carlsson)
|
|
||||||
- VP3 codec has been added (Mike Melanson)
|
|
||||||
- more MPEG-1/2 fixes
|
|
||||||
- better multiplatform support, MS Visual Studio fixes (various)
|
|
||||||
- AltiVec optimizations (Magnus Damn and others)
|
|
||||||
- SH4 processor support has been added (BERO)
|
|
||||||
- new public interfaces (avcodec_get_pix_fmt) (Roman Shaposhnick)
|
|
||||||
- VOB streaming support (Brian Foley)
|
|
||||||
- better MP3 autodetection (Andriy Rysin)
|
|
||||||
- qpel encoding (Michael)
|
|
||||||
- 4mv+b frames encoding finally fixed (Michael)
|
|
||||||
- chroma ME (Michael)
|
|
||||||
- 5 comparison functions for ME (Michael)
|
|
||||||
- B-frame encoding speedup (Michael)
|
|
||||||
- WMV2 codec (unfinished - Michael)
|
|
||||||
- user specified diamond size for EPZS (Michael)
|
|
||||||
- Playstation STR playback subsystem, still experimental (Mike and Michael)
|
|
||||||
- ASV2 codec (Michael)
|
|
||||||
- CLJR decoder (Alex)
|
|
||||||
|
|
||||||
.. And lots more new enhancements and fixes.
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.6:
|
|
||||||
|
|
||||||
- completely new integer only MPEG audio layer 1/2/3 decoder rewritten
|
|
||||||
from scratch
|
|
||||||
- Recoded DCT and motion vector search with gcc (no longer depends on nasm)
|
|
||||||
- fix quantization bug in AC3 encoder
|
|
||||||
- added PCM codecs and format. Corrected WAV/AVI/ASF PCM issues
|
|
||||||
- added prototype ffplay program
|
|
||||||
- added GOB header parsing on H.263/H.263+ decoder (Juanjo)
|
|
||||||
- bug fix on MCBPC tables of H.263 (Juanjo)
|
|
||||||
- bug fix on DC coefficients of H.263 (Juanjo)
|
|
||||||
- added Advanced Prediction Mode on H.263/H.263+ decoder (Juanjo)
|
|
||||||
- now we can decode H.263 streams found in QuickTime files (Juanjo)
|
|
||||||
- now we can decode H.263 streams found in VIVO v1 files(Juanjo)
|
|
||||||
- preliminary RTP "friendly" mode for H.263/H.263+ coding. (Juanjo)
|
|
||||||
- added GOB header for H.263/H.263+ coding on RTP mode (Juanjo)
|
|
||||||
- now H.263 picture size is returned on the first decoded frame (Juanjo)
|
|
||||||
- added first regression tests
|
|
||||||
- added MPEG-2 TS demuxer
|
|
||||||
- new demux API for libav
|
|
||||||
- more accurate and faster IDCT (Michael)
|
|
||||||
- faster and entropy-controlled motion search (Michael)
|
|
||||||
- two pass video encoding (Michael)
|
|
||||||
- new video rate control (Michael)
|
|
||||||
- added MSMPEG4V1, MSMPEGV2 and WMV1 support (Michael)
|
|
||||||
- great performance improvement of video encoders and decoders (Michael)
|
|
||||||
- new and faster bit readers and vlc parsers (Michael)
|
|
||||||
- high quality encoding mode: tries all macroblock/VLC types (Michael)
|
|
||||||
- added DV video decoder
|
|
||||||
- preliminary RTP/RTSP support in ffserver and libavformat
|
|
||||||
- H.263+ AIC decoding/encoding support (Juanjo)
|
|
||||||
- VCD MPEG-PS mode (Juanjo)
|
|
||||||
- PSNR stuff (Juanjo)
|
|
||||||
- simple stats output (Juanjo)
|
|
||||||
- 16-bit and 15-bit RGB/BGR/GBR support (Bisqwit)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.5:
|
|
||||||
|
|
||||||
- some header fixes (Zdenek Kabelac <kabi at informatics.muni.cz>)
|
|
||||||
- many MMX optimizations (Nick Kurshev <nickols_k at mail.ru>)
|
|
||||||
- added configure system (actually a small shell script)
|
|
||||||
- added MPEG audio layer 1/2/3 decoding using LGPL'ed mpglib by
|
|
||||||
Michael Hipp (temporary solution - waiting for integer only
|
|
||||||
decoder)
|
|
||||||
- fixed VIDIOCSYNC interrupt
|
|
||||||
- added Intel H.263 decoding support ('I263' AVI fourCC)
|
|
||||||
- added Real Video 1.0 decoding (needs further testing)
|
|
||||||
- simplified image formats again. Added PGM format (=grey
|
|
||||||
pgm). Renamed old PGM to PGMYUV.
|
|
||||||
- fixed msmpeg4 slice issues (tell me if you still find problems)
|
|
||||||
- fixed OpenDivX bugs with newer versions (added VOL header decoding)
|
|
||||||
- added support for MPlayer interface
|
|
||||||
- added macroblock skip optimization
|
|
||||||
- added MJPEG decoder
|
|
||||||
- added mmx/mmxext IDCT from libmpeg2
|
|
||||||
- added pgmyuvpipe, ppm, and ppm_pipe formats (original patch by Celer
|
|
||||||
<celer at shell.scrypt.net>)
|
|
||||||
- added pixel format conversion layer (e.g. for MJPEG or PPM)
|
|
||||||
- added deinterlacing option
|
|
||||||
- MPEG-1/2 fixes
|
|
||||||
- MPEG-4 vol header fixes (Jonathan Marsden <snmjbm at pacbell.net>)
|
|
||||||
- ARM optimizations (Lionel Ulmer <lionel.ulmer at free.fr>).
|
|
||||||
- Windows porting of file converter
|
|
||||||
- added MJPEG raw format (input/ouput)
|
|
||||||
- added JPEG image format support (input/output)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.4:
|
|
||||||
|
|
||||||
- fixed some std header definitions (Bjorn Lindgren
|
|
||||||
<bjorn.e.lindgren at telia.com>).
|
|
||||||
- added MPEG demuxer (MPEG-1 and 2 compatible).
|
|
||||||
- added ASF demuxer
|
|
||||||
- added prototype RM demuxer
|
|
||||||
- added AC3 decoding (done with libac3 by Aaron Holtzman)
|
|
||||||
- added decoding codec parameter guessing (.e.g. for MPEG, because the
|
|
||||||
header does not include them)
|
|
||||||
- fixed header generation in MPEG-1, AVI and ASF muxer: wmplayer can now
|
|
||||||
play them (only tested video)
|
|
||||||
- fixed H.263 white bug
|
|
||||||
- fixed phase rounding in img resample filter
|
|
||||||
- add MMX code for polyphase img resample filter
|
|
||||||
- added CPU autodetection
|
|
||||||
- added generic title/author/copyright/comment string handling (ASF and RM
|
|
||||||
use them)
|
|
||||||
- added SWF demux to extract MP3 track (not usable yet because no MP3
|
|
||||||
decoder)
|
|
||||||
- added fractional frame rate support
|
|
||||||
- codecs are no longer searched by read_header() (should fix ffserver
|
|
||||||
segfault)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.3:
|
|
||||||
|
|
||||||
- BGR24 patch (initial patch by Jeroen Vreeken <pe1rxq at amsat.org>)
|
|
||||||
- fixed raw yuv output
|
|
||||||
- added motion rounding support in MPEG-4
|
|
||||||
- fixed motion bug rounding in MSMPEG4
|
|
||||||
- added B-frame handling in video core
|
|
||||||
- added full MPEG-1 decoding support
|
|
||||||
- added partial (frame only) MPEG-2 support
|
|
||||||
- changed the FOURCC code for H.263 to "U263" to be able to see the
|
|
||||||
+AVI/H.263 file with the UB Video H.263+ decoder. MPlayer works with
|
|
||||||
this +codec ;) (JuanJo).
|
|
||||||
- Halfpel motion estimation after MB type selection (JuanJo)
|
|
||||||
- added pgm and .Y.U.V output format
|
|
||||||
- suppressed 'img:' protocol. Simply use: /tmp/test%d.[pgm|Y] as input or
|
|
||||||
output.
|
|
||||||
- added pgmpipe I/O format (original patch from Martin Aumueller
|
|
||||||
<lists at reserv.at>, but changed completely since we use a format
|
|
||||||
instead of a protocol)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.2:
|
|
||||||
|
|
||||||
- added H.263/MPEG-4/MSMPEG4 decoding support. MPEG-4 decoding support
|
|
||||||
(for OpenDivX) is almost complete: 8x8 MVs and rounding are
|
|
||||||
missing. MSMPEG4 support is complete.
|
|
||||||
- added prototype MPEG-1 decoder. Only I- and P-frames handled yet (it
|
|
||||||
can decode ffmpeg MPEGs :-)).
|
|
||||||
- added libavcodec API documentation (see apiexample.c).
|
|
||||||
- fixed image polyphase bug (the bottom of some images could be
|
|
||||||
greenish)
|
|
||||||
- added support for non clipped motion vectors (decoding only)
|
|
||||||
and image sizes non-multiple of 16
|
|
||||||
- added support for AC prediction (decoding only)
|
|
||||||
- added file overwrite confirmation (can be disabled with -y)
|
|
||||||
- added custom size picture to H.263 using H.263+ (Juanjo)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.1:
|
|
||||||
|
|
||||||
- added MSMPEG4 (aka DivX) compatible encoder. Changed default codec
|
|
||||||
of AVI and ASF to DIV3.
|
|
||||||
- added -me option to set motion estimation method
|
|
||||||
(default=log). suppressed redundant -hq option.
|
|
||||||
- added options -acodec and -vcodec to force a given codec (useful for
|
|
||||||
AVI for example)
|
|
||||||
- fixed -an option
|
|
||||||
- improved dct_quantize speed
|
|
||||||
- factorized some motion estimation code
|
|
||||||
|
|
||||||
|
|
||||||
version 0.4.0:
|
|
||||||
|
|
||||||
- removing grab code from ffserver and moved it to ffmpeg. Added
|
|
||||||
multistream support to ffmpeg.
|
|
||||||
- added timeshifting support for live feeds (option ?date=xxx in the
|
|
||||||
URL)
|
|
||||||
- added high quality image resize code with polyphase filter (need
|
|
||||||
mmx/see optimization). Enable multiple image size support in ffserver.
|
|
||||||
- added multi live feed support in ffserver
|
|
||||||
- suppressed master feature from ffserver (it should be done with an
|
|
||||||
external program which opens the .ffm url and writes it to another
|
|
||||||
ffserver)
|
|
||||||
- added preliminary support for video stream parsing (WAV and AVI half
|
|
||||||
done). Added proper support for audio/video file conversion in
|
|
||||||
ffmpeg.
|
|
||||||
- added preliminary support for video file sending from ffserver
|
|
||||||
- redesigning I/O subsystem: now using URL based input and output
|
|
||||||
(see avio.h)
|
|
||||||
- added WAV format support
|
|
||||||
- added "tty user interface" to ffmpeg to stop grabbing gracefully
|
|
||||||
- added MMX/SSE optimizations to SAD (Sums of Absolutes Differences)
|
|
||||||
(Juan J. Sierralta P. a.k.a. "Juanjo" <juanjo at atmlab.utfsm.cl>)
|
|
||||||
- added MMX DCT from mpeg2_movie 1.5 (Juanjo)
|
|
||||||
- added new motion estimation algorithms, log and phods (Juanjo)
|
|
||||||
- changed directories: libav for format handling, libavcodec for
|
|
||||||
codecs
|
|
||||||
|
|
||||||
|
|
||||||
version 0.3.4:
|
|
||||||
|
|
||||||
- added stereo in MPEG audio encoder
|
|
||||||
|
|
||||||
|
|
||||||
version 0.3.3:
|
|
||||||
|
|
||||||
- added 'high quality' mode which use motion vectors. It can be used in
|
|
||||||
real time at low resolution.
|
|
||||||
- fixed rounding problems which caused quality problems at high
|
|
||||||
bitrates and large GOP size
|
|
||||||
|
|
||||||
|
|
||||||
version 0.3.2: small fixes
|
|
||||||
|
|
||||||
- ASF fixes
|
|
||||||
- put_seek bug fix
|
|
||||||
|
|
||||||
|
|
||||||
version 0.3.1: added avi/divx support
|
|
||||||
|
|
||||||
- added AVI support
|
|
||||||
- added MPEG-4 codec compatible with OpenDivX. It is based on the H.263 codec
|
|
||||||
- added sound for flash format (not tested)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.3: initial public release
|
|
349
Doxyfile
349
Doxyfile
@@ -1,4 +1,4 @@
|
|||||||
# Doxyfile 1.5.6
|
# Doxyfile 1.7.1
|
||||||
|
|
||||||
# This file describes the settings to be used by the documentation system
|
# This file describes the settings to be used by the documentation system
|
||||||
# doxygen (www.doxygen.org) for a project
|
# doxygen (www.doxygen.org) for a project
|
||||||
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER =
|
PROJECT_NUMBER = 0.7.6
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
@@ -54,11 +54,11 @@ CREATE_SUBDIRS = NO
|
|||||||
# information to generate all constant output in the proper language.
|
# information to generate all constant output in the proper language.
|
||||||
# The default language is English, other supported languages are:
|
# The default language is English, other supported languages are:
|
||||||
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
|
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
|
||||||
# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
|
# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
|
||||||
# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
|
# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
|
||||||
# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
|
# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
|
||||||
# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
|
# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
|
||||||
# and Ukrainian.
|
# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
|
||||||
|
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
|
|
||||||
@@ -155,13 +155,6 @@ QT_AUTOBRIEF = NO
|
|||||||
|
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
|
||||||
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
|
|
||||||
# will output the detailed description near the top, like JavaDoc.
|
|
||||||
# If set to NO, the detailed description appears after the member
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
|
|
||||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||||
# member inherits the documentation from any documented member that it
|
# member inherits the documentation from any documented member that it
|
||||||
# re-implements.
|
# re-implements.
|
||||||
@@ -214,6 +207,18 @@ OPTIMIZE_FOR_FORTRAN = NO
|
|||||||
|
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
|
||||||
|
# Doxygen selects the parser to use depending on the extension of the files it
|
||||||
|
# parses. With this tag you can assign which parser to use for a given extension.
|
||||||
|
# Doxygen has a built-in mapping, but you can override or extend it using this
|
||||||
|
# tag. The format is ext=language, where ext is a file extension, and language
|
||||||
|
# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
|
||||||
|
# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
|
||||||
|
# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
|
||||||
|
# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
|
||||||
|
# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
|
||||||
|
|
||||||
|
EXTENSION_MAPPING =
|
||||||
|
|
||||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||||
# to include (a tag file for) the STL sources as input, then you should
|
# to include (a tag file for) the STL sources as input, then you should
|
||||||
# set this tag to YES in order to let doxygen match functions declarations and
|
# set this tag to YES in order to let doxygen match functions declarations and
|
||||||
@@ -268,6 +273,22 @@ SUBGROUPING = YES
|
|||||||
|
|
||||||
TYPEDEF_HIDES_STRUCT = NO
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
|
||||||
|
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||||
|
# determine which symbols to keep in memory and which to flush to disk.
|
||||||
|
# When the cache is full, less often used symbols will be written to disk.
|
||||||
|
# For small to medium size projects (<1000 input files) the default value is
|
||||||
|
# probably good enough. For larger projects a too small cache size can cause
|
||||||
|
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||||
|
# causing a significant performance penality.
|
||||||
|
# If the system has enough physical memory increasing the cache will improve the
|
||||||
|
# performance by keeping more symbols in memory. Note that the value works on
|
||||||
|
# a logarithmic scale so increasing the size by one will rougly double the
|
||||||
|
# memory usage. The cache size is given by this formula:
|
||||||
|
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||||
|
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||||
|
|
||||||
|
SYMBOL_CACHE_SIZE = 0
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Build related configuration options
|
# Build related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -366,6 +387,12 @@ HIDE_SCOPE_NAMES = NO
|
|||||||
|
|
||||||
SHOW_INCLUDE_FILES = YES
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
|
||||||
|
# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
|
||||||
|
# will list include files with double quotes in the documentation
|
||||||
|
# rather than with sharp brackets.
|
||||||
|
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
|
||||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||||
# is inserted in the documentation for inline members.
|
# is inserted in the documentation for inline members.
|
||||||
|
|
||||||
@@ -385,6 +412,16 @@ SORT_MEMBER_DOCS = YES
|
|||||||
|
|
||||||
SORT_BRIEF_DOCS = NO
|
SORT_BRIEF_DOCS = NO
|
||||||
|
|
||||||
|
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
|
||||||
|
# will sort the (brief and detailed) documentation of class members so that
|
||||||
|
# constructors and destructors are listed first. If set to NO (the default)
|
||||||
|
# the constructors will appear in the respective orders defined by
|
||||||
|
# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
|
||||||
|
# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
|
||||||
|
# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
|
||||||
|
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
|
||||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
|
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
|
||||||
# hierarchy of group names into alphabetical order. If set to NO (the default)
|
# hierarchy of group names into alphabetical order. If set to NO (the default)
|
||||||
# the group names will appear in their defined order.
|
# the group names will appear in their defined order.
|
||||||
@@ -459,7 +496,8 @@ SHOW_DIRECTORIES = NO
|
|||||||
SHOW_FILES = YES
|
SHOW_FILES = YES
|
||||||
|
|
||||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
|
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
|
||||||
# Namespaces page. This will remove the Namespaces entry from the Quick Index
|
# Namespaces page.
|
||||||
|
# This will remove the Namespaces entry from the Quick Index
|
||||||
# and from the Folder Tree View (if specified). The default is YES.
|
# and from the Folder Tree View (if specified). The default is YES.
|
||||||
|
|
||||||
SHOW_NAMESPACES = YES
|
SHOW_NAMESPACES = YES
|
||||||
@@ -474,6 +512,15 @@ SHOW_NAMESPACES = YES
|
|||||||
|
|
||||||
FILE_VERSION_FILTER =
|
FILE_VERSION_FILTER =
|
||||||
|
|
||||||
|
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
|
||||||
|
# by doxygen. The layout file controls the global structure of the generated
|
||||||
|
# output files in an output format independent way. The create the layout file
|
||||||
|
# that represents doxygen's defaults, run doxygen with the -l option.
|
||||||
|
# You can optionally specify a file name after the option, if omitted
|
||||||
|
# DoxygenLayout.xml will be used as the name of the layout file.
|
||||||
|
|
||||||
|
LAYOUT_FILE =
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -577,7 +624,8 @@ EXCLUDE_SYMLINKS = NO
|
|||||||
# against the file with absolute path, so to exclude all test directories
|
# against the file with absolute path, so to exclude all test directories
|
||||||
# for example use the pattern */test/*
|
# for example use the pattern */test/*
|
||||||
|
|
||||||
EXCLUDE_PATTERNS = *.git *.d
|
EXCLUDE_PATTERNS = *.git \
|
||||||
|
*.d
|
||||||
|
|
||||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||||
@@ -591,14 +639,15 @@ EXCLUDE_SYMBOLS =
|
|||||||
# directories that contain example code fragments that are included (see
|
# directories that contain example code fragments that are included (see
|
||||||
# the \include command).
|
# the \include command).
|
||||||
|
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH = libavcodec/ \
|
||||||
|
libavformat/
|
||||||
|
|
||||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||||
# and *.h) to filter out the source-files in the directories. If left
|
# and *.h) to filter out the source-files in the directories. If left
|
||||||
# blank all files are included.
|
# blank all files are included.
|
||||||
|
|
||||||
EXAMPLE_PATTERNS =
|
EXAMPLE_PATTERNS = *-example.c
|
||||||
|
|
||||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||||
# searched for input files to be used with the \include or \dontinclude
|
# searched for input files to be used with the \include or \dontinclude
|
||||||
@@ -618,14 +667,17 @@ IMAGE_PATH =
|
|||||||
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
# by executing (via popen()) the command <filter> <input-file>, where <filter>
|
||||||
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
|
||||||
# input file. Doxygen will then use the output that the filter program writes
|
# input file. Doxygen will then use the output that the filter program writes
|
||||||
# to standard output. If FILTER_PATTERNS is specified, this tag will be
|
# to standard output.
|
||||||
|
# If FILTER_PATTERNS is specified, this tag will be
|
||||||
# ignored.
|
# ignored.
|
||||||
|
|
||||||
INPUT_FILTER =
|
INPUT_FILTER =
|
||||||
|
|
||||||
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
|
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
|
||||||
# basis. Doxygen will compare the file name with each pattern and apply the
|
# basis.
|
||||||
# filter if there is a match. The filters are a list of the form:
|
# Doxygen will compare the file name with each pattern and apply the
|
||||||
|
# filter if there is a match.
|
||||||
|
# The filters are a list of the form:
|
||||||
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
|
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
|
||||||
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
|
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
|
||||||
# is applied to all files.
|
# is applied to all files.
|
||||||
@@ -675,7 +727,8 @@ REFERENCES_RELATION = NO
|
|||||||
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
|
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
|
||||||
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
|
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
|
||||||
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
|
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
|
||||||
# link to the source code. Otherwise they will link to the documentstion.
|
# link to the source code.
|
||||||
|
# Otherwise they will link to the documentation.
|
||||||
|
|
||||||
REFERENCES_LINK_SOURCE = YES
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
|
||||||
@@ -758,18 +811,50 @@ HTML_FOOTER =
|
|||||||
|
|
||||||
HTML_STYLESHEET =
|
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
|
||||||
|
# according to this color. Hue is specified as an angle on a colorwheel,
|
||||||
|
# see http://en.wikipedia.org/wiki/Hue for more information.
|
||||||
|
# For instance the value 0 represents red, 60 is yellow, 120 is green,
|
||||||
|
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
|
||||||
|
# The allowed range is 0 to 359.
|
||||||
|
|
||||||
|
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
|
||||||
|
# grayscales only. A value of 255 will produce the most vivid colors.
|
||||||
|
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
|
||||||
|
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
|
||||||
|
# the luminance component of the colors in the HTML output. Values below
|
||||||
|
# 100 gradually make the output lighter, whereas values above 100 make
|
||||||
|
# the output darker. The value divided by 100 is the actual gamma applied,
|
||||||
|
# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
|
||||||
|
# and 100 does not change the gamma.
|
||||||
|
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
|
||||||
|
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
|
||||||
|
# page will contain the date and time when the page was generated. Setting
|
||||||
|
# this to NO can help when comparing the output of multiple runs.
|
||||||
|
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
|
||||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||||
# files or namespaces will be aligned in HTML using tables. If set to
|
# files or namespaces will be aligned in HTML using tables. If set to
|
||||||
# NO a bullet list will be used.
|
# NO a bullet list will be used.
|
||||||
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
|
||||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||||
# will be generated that can be used as input for tools like the
|
# documentation will contain sections that can be hidden and shown after the
|
||||||
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
|
# page has loaded. For this to work a browser that supports
|
||||||
# of the generated HTML documentation.
|
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
|
||||||
|
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
|
||||||
|
|
||||||
GENERATE_HTMLHELP = NO
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
|
||||||
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
# 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
|
# will be generated that can be used as input for Apple's Xcode 3
|
||||||
@@ -779,6 +864,8 @@ GENERATE_HTMLHELP = NO
|
|||||||
# directory and running "make install" will install the docset in
|
# directory and running "make install" will install the docset in
|
||||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
|
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
|
||||||
# it at startup.
|
# it at startup.
|
||||||
|
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||||
|
# for more information.
|
||||||
|
|
||||||
GENERATE_DOCSET = NO
|
GENERATE_DOCSET = NO
|
||||||
|
|
||||||
@@ -796,13 +883,22 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
|
|||||||
|
|
||||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
|
||||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
|
||||||
# documentation will contain sections that can be hidden and shown after the
|
# the documentation publisher. This should be a reverse domain-name style
|
||||||
# page has loaded. For this to work a browser that supports
|
# string, e.g. com.mycompany.MyDocSet.documentation.
|
||||||
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
|
|
||||||
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
|
|
||||||
|
|
||||||
HTML_DYNAMIC_SECTIONS = NO
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
|
||||||
|
# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
|
||||||
|
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
|
||||||
|
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||||
|
# will be generated that can be used as input for tools like the
|
||||||
|
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
|
||||||
|
# of the generated HTML documentation.
|
||||||
|
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
|
||||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
||||||
# be used to specify the file name of the resulting .chm file. You
|
# be used to specify the file name of the resulting .chm file. You
|
||||||
@@ -841,6 +937,76 @@ BINARY_TOC = NO
|
|||||||
|
|
||||||
TOC_EXPAND = NO
|
TOC_EXPAND = NO
|
||||||
|
|
||||||
|
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
|
||||||
|
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
|
||||||
|
# that can be used as input for Qt's qhelpgenerator to generate a
|
||||||
|
# Qt Compressed Help (.qch) of the generated HTML documentation.
|
||||||
|
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
|
||||||
|
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
|
||||||
|
# be used to specify the file name of the resulting .qch file.
|
||||||
|
# The path specified is relative to the HTML output folder.
|
||||||
|
|
||||||
|
QCH_FILE =
|
||||||
|
|
||||||
|
# The QHP_NAMESPACE tag specifies the namespace to use when generating
|
||||||
|
# Qt Help Project output. For more information please see
|
||||||
|
# http://doc.trolltech.com/qthelpproject.html#namespace
|
||||||
|
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
|
||||||
|
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
|
||||||
|
# Qt Help Project output. For more information please see
|
||||||
|
# http://doc.trolltech.com/qthelpproject.html#virtual-folders
|
||||||
|
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
|
||||||
|
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
|
||||||
|
# add. For more information please see
|
||||||
|
# http://doc.trolltech.com/qthelpproject.html#custom-filters
|
||||||
|
|
||||||
|
QHP_CUST_FILTER_NAME =
|
||||||
|
|
||||||
|
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
|
||||||
|
# custom filter to add. For more information please see
|
||||||
|
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
|
||||||
|
# Qt Help Project / Custom Filters</a>.
|
||||||
|
|
||||||
|
QHP_CUST_FILTER_ATTRS =
|
||||||
|
|
||||||
|
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||||
|
# project's
|
||||||
|
# filter section matches.
|
||||||
|
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
|
||||||
|
# Qt Help Project / Filter Attributes</a>.
|
||||||
|
|
||||||
|
QHP_SECT_FILTER_ATTRS =
|
||||||
|
|
||||||
|
# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
|
||||||
|
# be used to specify the location of Qt's qhelpgenerator.
|
||||||
|
# If non-empty doxygen will try to run qhelpgenerator on the generated
|
||||||
|
# .qhp file.
|
||||||
|
|
||||||
|
QHG_LOCATION =
|
||||||
|
|
||||||
|
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
|
||||||
|
# will be generated, which together with the HTML files, form an Eclipse help
|
||||||
|
# plugin. To install this plugin and make it available under the help contents
|
||||||
|
# menu in Eclipse, the contents of the directory containing the HTML and XML
|
||||||
|
# files needs to be copied into the plugins directory of eclipse. The name of
|
||||||
|
# the directory within the plugins directory should be the same as
|
||||||
|
# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
|
||||||
|
# the help appears.
|
||||||
|
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
|
||||||
|
# A unique identifier for the eclipse help plugin. When installing the plugin
|
||||||
|
# the directory name containing the HTML and XML files should also have
|
||||||
|
# this name.
|
||||||
|
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
|
||||||
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
|
||||||
# top of each HTML page. The value NO (the default) enables the index and
|
# top of each HTML page. The value NO (the default) enables the index and
|
||||||
# the value YES disables it.
|
# the value YES disables it.
|
||||||
@@ -854,27 +1020,30 @@ ENUM_VALUES_PER_LINE = 4
|
|||||||
|
|
||||||
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
|
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
|
||||||
# structure should be generated to display hierarchical information.
|
# structure should be generated to display hierarchical information.
|
||||||
# If the tag value is set to FRAME, a side panel will be generated
|
# If the tag value is set to YES, a side panel will be generated
|
||||||
# containing a tree-like index structure (just like the one that
|
# containing a tree-like index structure (just like the one that
|
||||||
# is generated for HTML Help). For this to work a browser that supports
|
# is generated for HTML Help). For this to work a browser that supports
|
||||||
# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
|
# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
|
||||||
# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
|
# Windows users are probably better off using the HTML help feature.
|
||||||
# probably better off using the HTML help feature. Other possible values
|
|
||||||
# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
|
|
||||||
# and Class Hiererachy pages using a tree view instead of an ordered list;
|
|
||||||
# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
|
|
||||||
# disables this behavior completely. For backwards compatibility with previous
|
|
||||||
# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
|
|
||||||
# respectively.
|
|
||||||
|
|
||||||
GENERATE_TREEVIEW = NO
|
GENERATE_TREEVIEW = NO
|
||||||
|
|
||||||
|
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
|
||||||
|
# and Class Hierarchy pages using a tree view instead of an ordered list.
|
||||||
|
|
||||||
|
USE_INLINE_TREES = NO
|
||||||
|
|
||||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||||
# used to set the initial width (in pixels) of the frame in which the tree
|
# used to set the initial width (in pixels) of the frame in which the tree
|
||||||
# is shown.
|
# is shown.
|
||||||
|
|
||||||
TREEVIEW_WIDTH = 250
|
TREEVIEW_WIDTH = 250
|
||||||
|
|
||||||
|
# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
|
||||||
|
# links to external symbols imported via tag files in a separate window.
|
||||||
|
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
|
||||||
# Use this tag to change the font size of Latex formulas included
|
# Use this tag to change the font size of Latex formulas included
|
||||||
# as images in the HTML documentation. The default is 10. Note that
|
# as images in the HTML documentation. The default is 10. Note that
|
||||||
# when you change the font size after a successful doxygen run you need
|
# when you change the font size after a successful doxygen run you need
|
||||||
@@ -883,6 +1052,34 @@ TREEVIEW_WIDTH = 250
|
|||||||
|
|
||||||
FORMULA_FONTSIZE = 10
|
FORMULA_FONTSIZE = 10
|
||||||
|
|
||||||
|
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||||
|
# generated for formulas are transparent PNGs. Transparent PNGs are
|
||||||
|
# not supported properly for IE 6.0, but are supported on all modern browsers.
|
||||||
|
# Note that when changing this option you need to delete any form_*.png files
|
||||||
|
# in the HTML output before the changes have effect.
|
||||||
|
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
|
||||||
|
# When the SEARCHENGINE tag is enabled doxygen will generate a search box
|
||||||
|
# for the HTML output. The underlying search engine uses javascript
|
||||||
|
# and DHTML and should work on any modern browser. Note that when using
|
||||||
|
# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
|
||||||
|
# (GENERATE_DOCSET) there is already a search function so this one should
|
||||||
|
# typically be disabled. For large projects the javascript based search engine
|
||||||
|
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||||
|
|
||||||
|
SEARCHENGINE = NO
|
||||||
|
|
||||||
|
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||||
|
# implemented using a PHP enabled web server instead of at the web client
|
||||||
|
# using Javascript. Doxygen will generate the search PHP script and index
|
||||||
|
# file to put on the web server. The advantage of the server
|
||||||
|
# based approach is that it scales better to large projects and allows
|
||||||
|
# full text search. The disadvances is that it is more difficult to setup
|
||||||
|
# and does not have live searching capabilities.
|
||||||
|
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the LaTeX output
|
# configuration options related to the LaTeX output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -900,6 +1097,9 @@ LATEX_OUTPUT = latex
|
|||||||
|
|
||||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||||
# invoked. If left blank `latex' will be used as the default command name.
|
# invoked. If left blank `latex' will be used as the default command name.
|
||||||
|
# Note that when enabling USE_PDFLATEX this option is only used for
|
||||||
|
# generating bitmaps for formulas in the HTML output, but not in the
|
||||||
|
# Makefile that is written to the output directory.
|
||||||
|
|
||||||
LATEX_CMD_NAME = latex
|
LATEX_CMD_NAME = latex
|
||||||
|
|
||||||
@@ -959,6 +1159,13 @@ LATEX_BATCHMODE = NO
|
|||||||
|
|
||||||
LATEX_HIDE_INDICES = NO
|
LATEX_HIDE_INDICES = NO
|
||||||
|
|
||||||
|
# If LATEX_SOURCE_CODE is set to YES then doxygen will include
|
||||||
|
# source code with syntax highlighting in the LaTeX output.
|
||||||
|
# Note that which sources are shown also depends on other settings
|
||||||
|
# such as SOURCE_BROWSER.
|
||||||
|
|
||||||
|
LATEX_SOURCE_CODE = NO
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the RTF output
|
# configuration options related to the RTF output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -1095,8 +1302,10 @@ GENERATE_PERLMOD = NO
|
|||||||
PERLMOD_LATEX = NO
|
PERLMOD_LATEX = NO
|
||||||
|
|
||||||
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
|
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
|
||||||
# nicely formatted so it can be parsed by a human reader. This is useful
|
# nicely formatted so it can be parsed by a human reader.
|
||||||
# if you want to understand what is going on. On the other hand, if this
|
# This is useful
|
||||||
|
# if you want to understand what is going on.
|
||||||
|
# On the other hand, if this
|
||||||
# tag is set to NO the size of the Perl module output will be much smaller
|
# tag is set to NO the size of the Perl module output will be much smaller
|
||||||
# and Perl will parse it just the same.
|
# and Perl will parse it just the same.
|
||||||
|
|
||||||
@@ -1158,16 +1367,22 @@ INCLUDE_FILE_PATTERNS =
|
|||||||
# undefined via #undef or recursively expanded use the := operator
|
# undefined via #undef or recursively expanded use the := operator
|
||||||
# instead of the = operator.
|
# instead of the = operator.
|
||||||
|
|
||||||
PREDEFINED = __attribute__(x)="" "RENAME(x)=x ## _TMPL" "DEF(x)=x ## _TMPL" \
|
PREDEFINED = "__attribute__(x)=" \
|
||||||
HAVE_AV_CONFIG_H HAVE_MMX HAVE_MMX2 HAVE_AMD3DNOW \
|
"RENAME(x)=x ## _TMPL" \
|
||||||
|
"DEF(x)=x ## _TMPL" \
|
||||||
|
HAVE_AV_CONFIG_H \
|
||||||
|
HAVE_MMX \
|
||||||
|
HAVE_MMX2 \
|
||||||
|
HAVE_AMD3DNOW \
|
||||||
|
"DECLARE_ALIGNED(a,t,n)=t n" \
|
||||||
|
"offsetof(x,y)=0x42"
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||||
# this tag can be used to specify a list of macro names that should be expanded.
|
# this tag can be used to specify a list of macro names that should be expanded.
|
||||||
# The macro definition that is found in the sources will be used.
|
# The macro definition that is found in the sources will be used.
|
||||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||||
|
|
||||||
#EXPAND_AS_DEFINED = FF_COMMON_FRAME
|
EXPAND_AS_DEFINED = declare_idct
|
||||||
EXPAND_AS_DEFINED = declare_idct(idct, table, idct_row_head, idct_row, idct_row_tail, idct_row_mid)
|
|
||||||
|
|
||||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||||
@@ -1185,9 +1400,11 @@ SKIP_FUNCTION_MACROS = YES
|
|||||||
# Optionally an initial location of the external documentation
|
# Optionally an initial location of the external documentation
|
||||||
# can be added for each tagfile. The format of a tag file without
|
# can be added for each tagfile. The format of a tag file without
|
||||||
# this location is as follows:
|
# this location is as follows:
|
||||||
# TAGFILES = file1 file2 ...
|
#
|
||||||
|
# TAGFILES = file1 file2 ...
|
||||||
# Adding location for the tag files is done as follows:
|
# Adding location for the tag files is done as follows:
|
||||||
# TAGFILES = file1=loc1 "file2 = loc2" ...
|
#
|
||||||
|
# TAGFILES = file1=loc1 "file2 = loc2" ...
|
||||||
# where "loc1" and "loc2" can be relative or absolute paths or
|
# where "loc1" and "loc2" can be relative or absolute paths or
|
||||||
# URLs. If a location is present for each tag, the installdox tool
|
# URLs. If a location is present for each tag, the installdox tool
|
||||||
# does not have to be run to correct the links.
|
# does not have to be run to correct the links.
|
||||||
@@ -1255,6 +1472,14 @@ HIDE_UNDOC_RELATIONS = YES
|
|||||||
|
|
||||||
HAVE_DOT = NO
|
HAVE_DOT = NO
|
||||||
|
|
||||||
|
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
|
||||||
|
# allowed to run in parallel. When set to 0 (the default) doxygen will
|
||||||
|
# base this on the number of processors available in the system. You can set it
|
||||||
|
# explicitly to a value larger than 0 to get control over the balance
|
||||||
|
# between CPU load and processing speed.
|
||||||
|
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
|
||||||
# By default doxygen will write a font called FreeSans.ttf to the output
|
# By default doxygen will write a font called FreeSans.ttf to the output
|
||||||
# directory and reference it in all dot files that doxygen generates. This
|
# directory and reference it in all dot files that doxygen generates. This
|
||||||
# font does not include all possible unicode characters however, so when you need
|
# font does not include all possible unicode characters however, so when you need
|
||||||
@@ -1266,6 +1491,11 @@ HAVE_DOT = NO
|
|||||||
|
|
||||||
DOT_FONTNAME = FreeSans
|
DOT_FONTNAME = FreeSans
|
||||||
|
|
||||||
|
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
|
||||||
|
# The default size is 10pt.
|
||||||
|
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
|
||||||
# By default doxygen will tell dot to use the output directory to look for the
|
# By default doxygen will tell dot to use the output directory to look for the
|
||||||
# FreeSans.ttf font (which doxygen will put there itself). If you specify a
|
# FreeSans.ttf font (which doxygen will put there itself). If you specify a
|
||||||
# different font using DOT_FONTNAME you can set the path where dot
|
# different font using DOT_FONTNAME you can set the path where dot
|
||||||
@@ -1383,10 +1613,10 @@ DOT_GRAPH_MAX_NODES = 50
|
|||||||
MAX_DOT_GRAPH_DEPTH = 0
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
|
||||||
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
||||||
# background. This is enabled by default, which results in a transparent
|
# background. This is disabled by default, because dot on Windows does not
|
||||||
# background. Warning: Depending on the platform used, enabling this option
|
# seem to support this out of the box. Warning: Depending on the platform used,
|
||||||
# may lead to badly anti-aliased labels on the edges of a graph (i.e. they
|
# enabling this option may lead to badly anti-aliased labels on the edges of
|
||||||
# become hard to read).
|
# a graph (i.e. they become hard to read).
|
||||||
|
|
||||||
DOT_TRANSPARENT = YES
|
DOT_TRANSPARENT = YES
|
||||||
|
|
||||||
@@ -1408,12 +1638,3 @@ GENERATE_LEGEND = YES
|
|||||||
# the various graphs.
|
# the various graphs.
|
||||||
|
|
||||||
DOT_CLEANUP = YES
|
DOT_CLEANUP = YES
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to the search engine
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# The SEARCHENGINE tag specifies whether or not a search engine should be
|
|
||||||
# used. If set to NO the values of all tags below this one will be ignored.
|
|
||||||
|
|
||||||
SEARCHENGINE = NO
|
|
||||||
|
6
LICENSE
6
LICENSE
@@ -41,6 +41,6 @@ is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of
|
|||||||
those licenses. So to combine the OpenCORE libraries with FFmpeg, the license
|
those licenses. So to combine the OpenCORE libraries with FFmpeg, the license
|
||||||
version needs to be upgraded by passing --enable-version3 to configure.
|
version needs to be upgraded by passing --enable-version3 to configure.
|
||||||
|
|
||||||
The nonfree external library libfaac can be hooked up in FFmpeg. You need to
|
The nonfree external libraries libfaac and libaacplus can be hooked up in FFmpeg.
|
||||||
pass --enable-nonfree to configure to enable it. Employ this option with care
|
You need to pass --enable-nonfree to configure to enable it. Employ this option
|
||||||
as FFmpeg then becomes nonfree and unredistributable.
|
with care as FFmpeg then becomes nonfree and unredistributable.
|
||||||
|
@@ -373,6 +373,7 @@ Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C
|
|||||||
Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
||||||
Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7
|
Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7
|
||||||
Diego Biurrun 8227 1E31 B6D9 4994 7427 E220 9CAE D6CC 4757 FCC5
|
Diego Biurrun 8227 1E31 B6D9 4994 7427 E220 9CAE D6CC 4757 FCC5
|
||||||
|
Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4
|
||||||
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
||||||
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
||||||
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
||||||
|
9
Makefile
9
Makefile
@@ -178,7 +178,7 @@ testclean:
|
|||||||
clean:: testclean
|
clean:: testclean
|
||||||
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
||||||
$(RM) $(CLEANSUFFIXES)
|
$(RM) $(CLEANSUFFIXES)
|
||||||
$(RM) doc/*.html doc/*.pod doc/*.1
|
$(RM) doc/*.html doc/*.pod doc/*.1 doc/*.d doc/*~
|
||||||
$(RM) $(TOOLS)
|
$(RM) $(TOOLS)
|
||||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||||
|
|
||||||
@@ -258,9 +258,12 @@ FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
|
|||||||
FATE = $(FATE_ACODEC) \
|
FATE = $(FATE_ACODEC) \
|
||||||
$(FATE_VCODEC) \
|
$(FATE_VCODEC) \
|
||||||
$(FATE_LAVF) \
|
$(FATE_LAVF) \
|
||||||
$(FATE_LAVFI) \
|
|
||||||
$(FATE_SEEK) \
|
$(FATE_SEEK) \
|
||||||
|
|
||||||
|
FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
|
||||||
|
|
||||||
|
FATE += $(FATE-yes)
|
||||||
|
|
||||||
$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
|
$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
|
||||||
$(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
|
$(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
|
||||||
$(FATE_LAVF): $(REFS)
|
$(FATE_LAVF): $(REFS)
|
||||||
@@ -282,7 +285,7 @@ fate-lavfi: $(FATE_LAVFI)
|
|||||||
fate-seek: $(FATE_SEEK)
|
fate-seek: $(FATE_SEEK)
|
||||||
|
|
||||||
ifdef SAMPLES
|
ifdef SAMPLES
|
||||||
FATE += $(FATE_TESTS)
|
FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
|
||||||
fate-rsync:
|
fate-rsync:
|
||||||
rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
|
rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
|
||||||
else
|
else
|
||||||
|
24
cmdutils.c
24
cmdutils.c
@@ -574,12 +574,13 @@ void show_banner(void)
|
|||||||
print_all_libs_info(stderr, INDENT|SHOW_VERSION);
|
print_all_libs_info(stderr, INDENT|SHOW_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_version(void) {
|
int opt_version(const char *opt, const char *arg) {
|
||||||
printf("%s " FFMPEG_VERSION "\n", program_name);
|
printf("%s " FFMPEG_VERSION "\n", program_name);
|
||||||
print_all_libs_info(stdout, SHOW_VERSION);
|
print_all_libs_info(stdout, SHOW_VERSION);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_license(void)
|
int opt_license(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
printf(
|
printf(
|
||||||
#if CONFIG_NONFREE
|
#if CONFIG_NONFREE
|
||||||
@@ -646,9 +647,10 @@ void show_license(void)
|
|||||||
program_name, program_name, program_name
|
program_name, program_name, program_name
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_formats(void)
|
int opt_formats(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
AVInputFormat *ifmt=NULL;
|
AVInputFormat *ifmt=NULL;
|
||||||
AVOutputFormat *ofmt=NULL;
|
AVOutputFormat *ofmt=NULL;
|
||||||
@@ -695,9 +697,10 @@ void show_formats(void)
|
|||||||
name,
|
name,
|
||||||
long_name ? long_name:" ");
|
long_name ? long_name:" ");
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_codecs(void)
|
int opt_codecs(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
AVCodec *p=NULL, *p2;
|
AVCodec *p=NULL, *p2;
|
||||||
const char *last_name;
|
const char *last_name;
|
||||||
@@ -771,9 +774,10 @@ void show_codecs(void)
|
|||||||
"even though both encoding and decoding are supported. For example, the h263\n"
|
"even though both encoding and decoding are supported. For example, the h263\n"
|
||||||
"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
|
"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
|
||||||
"worse.\n");
|
"worse.\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_bsfs(void)
|
int opt_bsfs(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
AVBitStreamFilter *bsf=NULL;
|
AVBitStreamFilter *bsf=NULL;
|
||||||
|
|
||||||
@@ -781,9 +785,10 @@ void show_bsfs(void)
|
|||||||
while((bsf = av_bitstream_filter_next(bsf)))
|
while((bsf = av_bitstream_filter_next(bsf)))
|
||||||
printf("%s\n", bsf->name);
|
printf("%s\n", bsf->name);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_protocols(void)
|
int opt_protocols(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
URLProtocol *up=NULL;
|
URLProtocol *up=NULL;
|
||||||
|
|
||||||
@@ -799,9 +804,10 @@ void show_protocols(void)
|
|||||||
up->url_write ? 'O' : '.',
|
up->url_write ? 'O' : '.',
|
||||||
up->url_seek ? 'S' : '.',
|
up->url_seek ? 'S' : '.',
|
||||||
up->name);
|
up->name);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_filters(void)
|
int opt_filters(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
AVFilter av_unused(**filter) = NULL;
|
AVFilter av_unused(**filter) = NULL;
|
||||||
|
|
||||||
@@ -810,9 +816,10 @@ void show_filters(void)
|
|||||||
while ((filter = av_filter_next(filter)) && *filter)
|
while ((filter = av_filter_next(filter)) && *filter)
|
||||||
printf("%-16s %s\n", (*filter)->name, (*filter)->description);
|
printf("%-16s %s\n", (*filter)->name, (*filter)->description);
|
||||||
#endif
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_pix_fmts(void)
|
int opt_pix_fmts(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
enum PixelFormat pix_fmt;
|
enum PixelFormat pix_fmt;
|
||||||
|
|
||||||
@@ -843,6 +850,7 @@ void show_pix_fmts(void)
|
|||||||
pix_desc->nb_components,
|
pix_desc->nb_components,
|
||||||
av_get_bits_per_pixel(pix_desc));
|
av_get_bits_per_pixel(pix_desc));
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int read_yesno(void)
|
int read_yesno(void)
|
||||||
|
26
cmdutils.h
26
cmdutils.h
@@ -62,7 +62,7 @@ void uninit_opts(void);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Trivial log callback.
|
* Trivial log callback.
|
||||||
* Only suitable for show_help and similar since it lacks prefix handling.
|
* Only suitable for opt_help and similar since it lacks prefix handling.
|
||||||
*/
|
*/
|
||||||
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
||||||
|
|
||||||
@@ -177,50 +177,58 @@ void show_banner(void);
|
|||||||
* Print the version of the program to stdout. The version message
|
* Print the version of the program to stdout. The version message
|
||||||
* depends on the current versions of the repository and of the libav*
|
* depends on the current versions of the repository and of the libav*
|
||||||
* libraries.
|
* libraries.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_version(void);
|
int opt_version(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print the license of the program to stdout. The license depends on
|
* Print the license of the program to stdout. The license depends on
|
||||||
* the license of the libraries compiled into the program.
|
* the license of the libraries compiled into the program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_license(void);
|
int opt_license(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the formats supported by the
|
* Print a listing containing all the formats supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_formats(void);
|
int opt_formats(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the codecs supported by the
|
* Print a listing containing all the codecs supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_codecs(void);
|
int opt_codecs(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the filters supported by the
|
* Print a listing containing all the filters supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_filters(void);
|
int opt_filters(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the bit stream filters supported by the
|
* Print a listing containing all the bit stream filters supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_bsfs(void);
|
int opt_bsfs(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the protocols supported by the
|
* Print a listing containing all the protocols supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_protocols(void);
|
int opt_protocols(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a listing containing all the pixel formats supported by the
|
* Print a listing containing all the pixel formats supported by the
|
||||||
* program.
|
* program.
|
||||||
|
* This option processing function does not utilize the arguments.
|
||||||
*/
|
*/
|
||||||
void show_pix_fmts(void);
|
int opt_pix_fmts(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a positive value if a line read from standard input
|
* Return a positive value if a line read from standard input
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
|
{ "L", OPT_EXIT, {(void*)opt_license}, "show license" },
|
||||||
{ "h", OPT_EXIT, {(void*)show_help}, "show help" },
|
{ "h", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||||
{ "?", OPT_EXIT, {(void*)show_help}, "show help" },
|
{ "?", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||||
{ "help", OPT_EXIT, {(void*)show_help}, "show help" },
|
{ "help", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||||
{ "-help", OPT_EXIT, {(void*)show_help}, "show help" },
|
{ "-help", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||||
{ "version", OPT_EXIT, {(void*)show_version}, "show version" },
|
{ "version", OPT_EXIT, {(void*)opt_version}, "show version" },
|
||||||
{ "formats" , OPT_EXIT, {(void*)show_formats }, "show available formats" },
|
{ "formats" , OPT_EXIT, {(void*)opt_formats }, "show available formats" },
|
||||||
{ "codecs" , OPT_EXIT, {(void*)show_codecs }, "show available codecs" },
|
{ "codecs" , OPT_EXIT, {(void*)opt_codecs }, "show available codecs" },
|
||||||
{ "bsfs" , OPT_EXIT, {(void*)show_bsfs }, "show available bit stream filters" },
|
{ "bsfs" , OPT_EXIT, {(void*)opt_bsfs }, "show available bit stream filters" },
|
||||||
{ "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
|
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
|
||||||
{ "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" },
|
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
|
||||||
{ "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
|
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
|
||||||
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||||
|
31
configure
vendored
31
configure
vendored
@@ -162,6 +162,7 @@ External library support:
|
|||||||
--enable-bzlib enable bzlib [autodetect]
|
--enable-bzlib enable bzlib [autodetect]
|
||||||
--enable-libcelt enable CELT/Opus decoding via libcelt [no]
|
--enable-libcelt enable CELT/Opus decoding via libcelt [no]
|
||||||
--enable-frei0r enable frei0r video filtering
|
--enable-frei0r enable frei0r video filtering
|
||||||
|
--enable-libaacplus enable AAC+ encoding via libaacplus [no]
|
||||||
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
|
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
|
||||||
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
|
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
|
||||||
--enable-libopencv enable video filtering via libopencv [no]
|
--enable-libopencv enable video filtering via libopencv [no]
|
||||||
@@ -177,7 +178,7 @@ External library support:
|
|||||||
--enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]
|
--enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]
|
||||||
--enable-librtmp enable RTMP[E] support via librtmp [no]
|
--enable-librtmp enable RTMP[E] support via librtmp [no]
|
||||||
--enable-libschroedinger enable Dirac support via libschroedinger [no]
|
--enable-libschroedinger enable Dirac support via libschroedinger [no]
|
||||||
--enable-libspeex enable Speex decoding via libspeex [no]
|
--enable-libspeex enable Speex encoding and decoding via libspeex [no]
|
||||||
--enable-libtheora enable Theora encoding via libtheora [no]
|
--enable-libtheora enable Theora encoding via libtheora [no]
|
||||||
--enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
|
--enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
|
||||||
--enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
|
--enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
|
||||||
@@ -927,6 +928,8 @@ CONFIG_LIST="
|
|||||||
h264pred
|
h264pred
|
||||||
hardcoded_tables
|
hardcoded_tables
|
||||||
huffman
|
huffman
|
||||||
|
libaacplus
|
||||||
|
libcdio
|
||||||
libcelt
|
libcelt
|
||||||
libdc1394
|
libdc1394
|
||||||
libdirac
|
libdirac
|
||||||
@@ -1401,6 +1404,7 @@ vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
|
|||||||
h264_parser_select="golomb h264dsp h264pred"
|
h264_parser_select="golomb h264dsp h264pred"
|
||||||
|
|
||||||
# external libraries
|
# external libraries
|
||||||
|
libaacplus_encoder_deps="libaacplus"
|
||||||
libcelt_decoder_deps="libcelt"
|
libcelt_decoder_deps="libcelt"
|
||||||
libdirac_decoder_deps="libdirac !libschroedinger"
|
libdirac_decoder_deps="libdirac !libschroedinger"
|
||||||
libdirac_encoder_deps="libdirac"
|
libdirac_encoder_deps="libdirac"
|
||||||
@@ -1417,6 +1421,7 @@ libopenjpeg_decoder_deps="libopenjpeg"
|
|||||||
libschroedinger_decoder_deps="libschroedinger"
|
libschroedinger_decoder_deps="libschroedinger"
|
||||||
libschroedinger_encoder_deps="libschroedinger"
|
libschroedinger_encoder_deps="libschroedinger"
|
||||||
libspeex_decoder_deps="libspeex"
|
libspeex_decoder_deps="libspeex"
|
||||||
|
libspeex_encoder_deps="libspeex"
|
||||||
libtheora_encoder_deps="libtheora"
|
libtheora_encoder_deps="libtheora"
|
||||||
libvo_aacenc_encoder_deps="libvo_aacenc"
|
libvo_aacenc_encoder_deps="libvo_aacenc"
|
||||||
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
|
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
|
||||||
@@ -1512,7 +1517,7 @@ postproc_deps="gpl"
|
|||||||
|
|
||||||
# programs
|
# programs
|
||||||
ffmpeg_deps="avcodec avformat swscale"
|
ffmpeg_deps="avcodec avformat swscale"
|
||||||
ffmpeg_select="buffer_filter"
|
ffmpeg_select="buffer_filter buffersink_filter"
|
||||||
ffplay_deps="avcodec avformat swscale sdl"
|
ffplay_deps="avcodec avformat swscale sdl"
|
||||||
ffplay_select="rdft"
|
ffplay_select="rdft"
|
||||||
ffprobe_deps="avcodec avformat"
|
ffprobe_deps="avcodec avformat"
|
||||||
@@ -1531,7 +1536,7 @@ test_deps(){
|
|||||||
dep=${v%=*}
|
dep=${v%=*}
|
||||||
tests=${v#*=}
|
tests=${v#*=}
|
||||||
for name in ${tests}; do
|
for name in ${tests}; do
|
||||||
eval ${name}_test_deps="'${dep}$suf1 ${dep}$suf2'"
|
append ${name}_test_deps ${dep}$suf1 ${dep}$suf2
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -1541,6 +1546,9 @@ set_ne_test_deps(){
|
|||||||
eval ${1}_le_test_deps="!bigendian"
|
eval ${1}_le_test_deps="!bigendian"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mxf_d10_test_deps="avfilter"
|
||||||
|
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
|
||||||
|
|
||||||
test_deps _encoder _decoder \
|
test_deps _encoder _decoder \
|
||||||
adpcm_g726=g726 \
|
adpcm_g726=g726 \
|
||||||
adpcm_ima_qt \
|
adpcm_ima_qt \
|
||||||
@@ -1603,7 +1611,7 @@ test_deps _muxer _demuxer \
|
|||||||
mmf \
|
mmf \
|
||||||
mov \
|
mov \
|
||||||
pcm_mulaw=mulaw \
|
pcm_mulaw=mulaw \
|
||||||
mxf \
|
mxf="mxf mxf_d10" \
|
||||||
nut \
|
nut \
|
||||||
ogg \
|
ogg \
|
||||||
rawvideo=pixfmt \
|
rawvideo=pixfmt \
|
||||||
@@ -2537,6 +2545,7 @@ case $target_os in
|
|||||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
||||||
;;
|
;;
|
||||||
gnu)
|
gnu)
|
||||||
|
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
||||||
;;
|
;;
|
||||||
qnx)
|
qnx)
|
||||||
add_cppflags -D_QNX_SOURCE
|
add_cppflags -D_QNX_SOURCE
|
||||||
@@ -2582,6 +2591,7 @@ die_license_disabled gpl libxavs
|
|||||||
die_license_disabled gpl libxvid
|
die_license_disabled gpl libxvid
|
||||||
die_license_disabled gpl x11grab
|
die_license_disabled gpl x11grab
|
||||||
|
|
||||||
|
die_license_disabled nonfree libaacplus
|
||||||
die_license_disabled nonfree libfaac
|
die_license_disabled nonfree libfaac
|
||||||
|
|
||||||
die_license_disabled version3 libopencore_amrnb
|
die_license_disabled version3 libopencore_amrnb
|
||||||
@@ -2914,6 +2924,7 @@ check_mathfunc truncf
|
|||||||
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
|
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
|
||||||
enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0
|
enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0
|
||||||
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
|
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
|
||||||
|
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
|
||||||
enabled libdc1394 && require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new
|
enabled libdc1394 && require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new
|
||||||
enabled libdirac && require_pkg_config dirac \
|
enabled libdirac && require_pkg_config dirac \
|
||||||
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \
|
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \
|
||||||
@@ -3064,7 +3075,6 @@ fi
|
|||||||
|
|
||||||
if enabled small; then
|
if enabled small; then
|
||||||
add_cflags $size_cflags
|
add_cflags $size_cflags
|
||||||
optimizations="small"
|
|
||||||
elif enabled optimizations; then
|
elif enabled optimizations; then
|
||||||
add_cflags $speed_cflags
|
add_cflags $speed_cflags
|
||||||
else
|
else
|
||||||
@@ -3072,6 +3082,10 @@ else
|
|||||||
fi
|
fi
|
||||||
check_cflags -fno-math-errno
|
check_cflags -fno-math-errno
|
||||||
check_cflags -fno-signed-zeros
|
check_cflags -fno-signed-zeros
|
||||||
|
check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
|
||||||
|
int x;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
if enabled icc; then
|
if enabled icc; then
|
||||||
# Just warnings, no remarks
|
# Just warnings, no remarks
|
||||||
@@ -3118,6 +3132,8 @@ elif enabled armcc; then
|
|||||||
add_cflags -W${armcc_opt},--diag_suppress=1207
|
add_cflags -W${armcc_opt},--diag_suppress=1207
|
||||||
add_cflags -W${armcc_opt},--diag_suppress=1293 # assignment in condition
|
add_cflags -W${armcc_opt},--diag_suppress=1293 # assignment in condition
|
||||||
add_cflags -W${armcc_opt},--diag_suppress=3343 # hardfp compat
|
add_cflags -W${armcc_opt},--diag_suppress=3343 # hardfp compat
|
||||||
|
add_cflags -W${armcc_opt},--diag_suppress=167 # pointer sign
|
||||||
|
add_cflags -W${armcc_opt},--diag_suppress=513 # pointer sign
|
||||||
elif enabled tms470; then
|
elif enabled tms470; then
|
||||||
add_cflags -pds=824 -pds=837
|
add_cflags -pds=824 -pds=837
|
||||||
elif enabled pathscale; then
|
elif enabled pathscale; then
|
||||||
@@ -3204,6 +3220,7 @@ if enabled sparc; then
|
|||||||
fi
|
fi
|
||||||
echo "debug symbols ${debug-no}"
|
echo "debug symbols ${debug-no}"
|
||||||
echo "strip symbols ${stripping-no}"
|
echo "strip symbols ${stripping-no}"
|
||||||
|
echo "optimize for size ${small-no}"
|
||||||
echo "optimizations ${optimizations-no}"
|
echo "optimizations ${optimizations-no}"
|
||||||
echo "static ${static-no}"
|
echo "static ${static-no}"
|
||||||
echo "shared ${shared-no}"
|
echo "shared ${shared-no}"
|
||||||
@@ -3219,6 +3236,7 @@ echo "frei0r enabled ${frei0r-no}"
|
|||||||
echo "libdc1394 support ${libdc1394-no}"
|
echo "libdc1394 support ${libdc1394-no}"
|
||||||
echo "libdirac enabled ${libdirac-no}"
|
echo "libdirac enabled ${libdirac-no}"
|
||||||
echo "libfaac enabled ${libfaac-no}"
|
echo "libfaac enabled ${libfaac-no}"
|
||||||
|
echo "libaacplus enabled ${libaacplus-no}"
|
||||||
echo "libgsm enabled ${libgsm-no}"
|
echo "libgsm enabled ${libgsm-no}"
|
||||||
echo "libmp3lame enabled ${libmp3lame-no}"
|
echo "libmp3lame enabled ${libmp3lame-no}"
|
||||||
echo "libnut enabled ${libnut-no}"
|
echo "libnut enabled ${libnut-no}"
|
||||||
@@ -3270,6 +3288,7 @@ if enabled source_path_used; then
|
|||||||
doc
|
doc
|
||||||
libavcodec
|
libavcodec
|
||||||
libavcodec/$arch
|
libavcodec/$arch
|
||||||
|
libavcodec/mlib
|
||||||
libavdevice
|
libavdevice
|
||||||
libavfilter
|
libavfilter
|
||||||
libavfilter/$arch
|
libavfilter/$arch
|
||||||
@@ -3281,6 +3300,7 @@ if enabled source_path_used; then
|
|||||||
libpostproc
|
libpostproc
|
||||||
libswscale
|
libswscale
|
||||||
libswscale/$arch
|
libswscale/$arch
|
||||||
|
libswscale/mlib
|
||||||
tests
|
tests
|
||||||
tools
|
tools
|
||||||
"
|
"
|
||||||
@@ -3377,6 +3397,7 @@ SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
|
|||||||
SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}
|
SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}
|
||||||
SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}
|
SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}
|
||||||
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
|
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
|
||||||
|
NOREDZONE_FLAGS=$noredzone_flags
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
get_version(){
|
get_version(){
|
||||||
|
@@ -2,7 +2,7 @@ Release Notes
|
|||||||
=============
|
=============
|
||||||
|
|
||||||
* 0.8 "Love" June, 2011
|
* 0.8 "Love" June, 2011
|
||||||
* 0.7 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
* 0.7.1 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
||||||
|
|
||||||
|
|
||||||
General notes
|
General notes
|
||||||
|
@@ -54,10 +54,8 @@ These features are supported by all compilers we care about, so we will not
|
|||||||
accept patches to remove their use unless they absolutely do not impair
|
accept patches to remove their use unless they absolutely do not impair
|
||||||
clarity and performance.
|
clarity and performance.
|
||||||
|
|
||||||
All code must compile with GCC 2.95 and GCC 3.3. Currently, FFmpeg also
|
All code must compile with recent versions of GCC and a number of other
|
||||||
compiles with several other compilers, such as the Compaq ccc compiler
|
currently supported compilers. To ensure compatibility, please do not use
|
||||||
or Sun Studio 9, and we would like to keep it that way unless it would
|
|
||||||
be exceedingly involved. To ensure compatibility, please do not use any
|
|
||||||
additional C99 features or GCC extensions. Especially watch out for:
|
additional C99 features or GCC extensions. Especially watch out for:
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
@@ -479,7 +479,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* open the output file, if needed */
|
/* open the output file, if needed */
|
||||||
if (!(fmt->flags & AVFMT_NOFILE)) {
|
if (!(fmt->flags & AVFMT_NOFILE)) {
|
||||||
if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
|
if (avio_open(&oc->pb, filename, AVIO_WRONLY) < 0) {
|
||||||
fprintf(stderr, "Could not open '%s'\n", filename);
|
fprintf(stderr, "Could not open '%s'\n", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@@ -447,6 +447,11 @@ encompassing your FFmpeg includes using @code{extern "C"}.
|
|||||||
|
|
||||||
See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
|
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
|
||||||
|
|
||||||
|
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?
|
@section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
|
||||||
|
|
||||||
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
||||||
|
@@ -713,8 +713,39 @@ ffmpeg -i in.ogg -map_metadata 0:0,s0 out.mp3
|
|||||||
Copy chapters from @var{infile} to @var{outfile}. If no chapter mapping is specified,
|
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
|
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.
|
output files. Use a negative file index to disable any chapter copying.
|
||||||
@item -debug
|
@item -debug @var{category}
|
||||||
Print specific debug info.
|
Print specific debug info.
|
||||||
|
@var{category} is a number or a string containing one of the following values:
|
||||||
|
@table @samp
|
||||||
|
@item bitstream
|
||||||
|
@item buffers
|
||||||
|
picture buffer allocations
|
||||||
|
@item bugs
|
||||||
|
@item dct_coeff
|
||||||
|
@item er
|
||||||
|
error recognition
|
||||||
|
@item mb_type
|
||||||
|
macroblock (MB) type
|
||||||
|
@item mmco
|
||||||
|
memory management control operations (H.264)
|
||||||
|
@item mv
|
||||||
|
motion vector
|
||||||
|
@item pict
|
||||||
|
picture info
|
||||||
|
@item pts
|
||||||
|
@item qp
|
||||||
|
per-block quantization parameter (QP)
|
||||||
|
@item rc
|
||||||
|
rate control
|
||||||
|
@item skip
|
||||||
|
@item startcode
|
||||||
|
@item thread_ops
|
||||||
|
threading operations
|
||||||
|
@item vis_mb_type
|
||||||
|
visualize block types
|
||||||
|
@item vis_qp
|
||||||
|
visualize quantization parameter (QP), lower QP are tinted greener
|
||||||
|
@end table
|
||||||
@item -benchmark
|
@item -benchmark
|
||||||
Show benchmarking information at the end of an encode.
|
Show benchmarking information at the end of an encode.
|
||||||
Shows CPU time used and maximum memory consumption.
|
Shows CPU time used and maximum memory consumption.
|
||||||
|
@@ -1683,7 +1683,7 @@ It accepts the following parameters:
|
|||||||
|
|
||||||
Negative values for the amount will blur the input video, while positive
|
Negative values for the amount will blur the input video, while positive
|
||||||
values will sharpen. All parameters are optional and default to the
|
values will sharpen. All parameters are optional and default to the
|
||||||
equivalent of the string '5:5:1.0:0:0:0.0'.
|
equivalent of the string '5:5:1.0:5:5:0.0'.
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
|
|
||||||
@@ -1701,11 +1701,11 @@ and 5.0, default value is 1.0.
|
|||||||
|
|
||||||
@item chroma_msize_x
|
@item chroma_msize_x
|
||||||
Set the chroma matrix horizontal size. It can be an integer between 3
|
Set the chroma matrix horizontal size. It can be an integer between 3
|
||||||
and 13, default value is 0.
|
and 13, default value is 5.
|
||||||
|
|
||||||
@item chroma_msize_y
|
@item chroma_msize_y
|
||||||
Set the chroma matrix vertical size. It can be an integer between 3
|
Set the chroma matrix vertical size. It can be an integer between 3
|
||||||
and 13, default value is 0.
|
and 13, default value is 5.
|
||||||
|
|
||||||
@item luma_amount
|
@item luma_amount
|
||||||
Set the chroma effect strength. It can be a float number between -2.0
|
Set the chroma effect strength. It can be a float number between -2.0
|
||||||
|
@@ -542,6 +542,8 @@ following image formats are supported:
|
|||||||
@multitable @columnfractions .4 .1 .1 .4
|
@multitable @columnfractions .4 .1 .1 .4
|
||||||
@item Name @tab Encoding @tab Decoding @tab Comments
|
@item Name @tab Encoding @tab Decoding @tab Comments
|
||||||
@item 8SVX audio @tab @tab X
|
@item 8SVX audio @tab @tab X
|
||||||
|
@item AAC+ @tab E @tab X
|
||||||
|
@tab encoding supported through external library libaacplus
|
||||||
@item AAC @tab E @tab X
|
@item AAC @tab E @tab X
|
||||||
@tab encoding supported through external library libfaac and libvo-aacenc
|
@tab encoding supported through external library libfaac and libvo-aacenc
|
||||||
@item AC-3 @tab IX @tab X
|
@item AC-3 @tab IX @tab X
|
||||||
@@ -961,7 +963,7 @@ MSVC++-compatible import libraries.
|
|||||||
@item Build FFmpeg with
|
@item Build FFmpeg with
|
||||||
|
|
||||||
@example
|
@example
|
||||||
./configure --enable-shared --enable-memalign-hack
|
./configure --enable-shared
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
@end example
|
@end example
|
||||||
@@ -998,9 +1000,11 @@ extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
|
|||||||
|
|
||||||
Note that using import libraries created by dlltool requires
|
Note that using import libraries created by dlltool requires
|
||||||
the linker optimization option to be set to
|
the linker optimization option to be set to
|
||||||
"References: Keep Unreferenced Data (/OPT:NOREF)", otherwise
|
"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
|
||||||
the resulting binaries will fail during runtime. This isn't
|
the resulting binaries will fail during runtime. This isn't
|
||||||
required when using import libraries generated by lib.exe.
|
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
|
@subsection Cross compilation for Windows with Linux
|
||||||
|
|
||||||
@@ -1036,7 +1040,7 @@ diffutils
|
|||||||
Then run
|
Then run
|
||||||
|
|
||||||
@example
|
@example
|
||||||
./configure --enable-static --disable-shared
|
./configure
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
to make a static build.
|
to make a static build.
|
||||||
@@ -1058,7 +1062,7 @@ These library packages are only available from Cygwin Ports
|
|||||||
(@url{http://sourceware.org/cygwinports/}) :
|
(@url{http://sourceware.org/cygwinports/}) :
|
||||||
|
|
||||||
@example
|
@example
|
||||||
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
|
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-devel, libgsm-devel,
|
||||||
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
|
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
|
||||||
libxvidcore-devel
|
libxvidcore-devel
|
||||||
@end example
|
@end example
|
||||||
@@ -1083,12 +1087,12 @@ and add some special flags to your configure invocation.
|
|||||||
|
|
||||||
For a static build run
|
For a static build run
|
||||||
@example
|
@example
|
||||||
./configure --target-os=mingw32 --enable-memalign-hack --enable-static --disable-shared --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
and for a build with shared libraries
|
and for a build with shared libraries
|
||||||
@example
|
@example
|
||||||
./configure --target-os=mingw32 --enable-memalign-hack --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@bye
|
@bye
|
||||||
|
55
ffmpeg.c
55
ffmpeg.c
@@ -31,7 +31,7 @@
|
|||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "libavcodec/audioconvert.h"
|
#include "libavcodec/audioconvert.h"
|
||||||
#include "libavutil/audioconvert.h"
|
#include "libavutil/audioconvert.h"
|
||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
@@ -113,7 +113,9 @@ typedef struct AVChapterMap {
|
|||||||
static const OptionDef options[];
|
static const OptionDef options[];
|
||||||
|
|
||||||
#define MAX_FILES 100
|
#define MAX_FILES 100
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
#define MAX_STREAMS 1024 /* arbitrary sanity check value */
|
#define MAX_STREAMS 1024 /* arbitrary sanity check value */
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *last_asked_format = NULL;
|
static const char *last_asked_format = NULL;
|
||||||
static int64_t input_files_ts_offset[MAX_FILES];
|
static int64_t input_files_ts_offset[MAX_FILES];
|
||||||
@@ -343,6 +345,7 @@ typedef struct AVInputFile {
|
|||||||
int eof_reached; /* true if eof reached */
|
int eof_reached; /* true if eof reached */
|
||||||
int ist_index; /* index of first stream in ist_table */
|
int ist_index; /* index of first stream in ist_table */
|
||||||
int buffer_size; /* current total buffer size */
|
int buffer_size; /* current total buffer size */
|
||||||
|
int nb_streams; /* nb streams we are aware of */
|
||||||
} AVInputFile;
|
} AVInputFile;
|
||||||
|
|
||||||
#if HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
@@ -711,7 +714,6 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
|
|||||||
return err;
|
return err;
|
||||||
/* copy stream format */
|
/* copy stream format */
|
||||||
s->nb_streams = 0;
|
s->nb_streams = 0;
|
||||||
s->streams = av_mallocz(sizeof(AVStream *) * ic->nb_streams);
|
|
||||||
for(i=0;i<ic->nb_streams;i++) {
|
for(i=0;i<ic->nb_streams;i++) {
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
@@ -1859,7 +1861,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
/* encode any samples remaining in fifo */
|
/* encode any samples remaining in fifo */
|
||||||
if (fifo_bytes > 0) {
|
if (fifo_bytes > 0) {
|
||||||
int osize = av_get_bits_per_sample_fmt(enc->sample_fmt) >> 3;
|
int osize = av_get_bytes_per_sample(enc->sample_fmt);
|
||||||
int fs_tmp = enc->frame_size;
|
int fs_tmp = enc->frame_size;
|
||||||
|
|
||||||
av_fifo_generic_read(ost->fifo, audio_buf, fifo_bytes, NULL);
|
av_fifo_generic_read(ost->fifo, audio_buf, fifo_bytes, NULL);
|
||||||
@@ -2045,7 +2047,7 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
int si = stream_maps[i].stream_index;
|
int si = stream_maps[i].stream_index;
|
||||||
|
|
||||||
if (fi < 0 || fi > nb_input_files - 1 ||
|
if (fi < 0 || fi > nb_input_files - 1 ||
|
||||||
si < 0 || si > input_files[fi].ctx->nb_streams - 1) {
|
si < 0 || si > input_files[fi].nb_streams - 1) {
|
||||||
fprintf(stderr,"Could not find input stream #%d.%d\n", fi, si);
|
fprintf(stderr,"Could not find input stream #%d.%d\n", fi, si);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto fail;
|
goto fail;
|
||||||
@@ -2053,7 +2055,7 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
fi = stream_maps[i].sync_file_index;
|
fi = stream_maps[i].sync_file_index;
|
||||||
si = stream_maps[i].sync_stream_index;
|
si = stream_maps[i].sync_stream_index;
|
||||||
if (fi < 0 || fi > nb_input_files - 1 ||
|
if (fi < 0 || fi > nb_input_files - 1 ||
|
||||||
si < 0 || si > input_files[fi].ctx->nb_streams - 1) {
|
si < 0 || si > input_files[fi].nb_streams - 1) {
|
||||||
fprintf(stderr,"Could not find sync stream #%d.%d\n", fi, si);
|
fprintf(stderr,"Could not find sync stream #%d.%d\n", fi, si);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto fail;
|
goto fail;
|
||||||
@@ -2303,16 +2305,19 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
|
fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
|
||||||
ffmpeg_exit(1);
|
ffmpeg_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!codec->width || !codec->height) {
|
||||||
|
codec->width = icodec->width;
|
||||||
|
codec->height = icodec->height;
|
||||||
|
}
|
||||||
|
|
||||||
ost->video_resample = codec->width != icodec->width ||
|
ost->video_resample = codec->width != icodec->width ||
|
||||||
codec->height != icodec->height ||
|
codec->height != icodec->height ||
|
||||||
codec->pix_fmt != icodec->pix_fmt;
|
codec->pix_fmt != icodec->pix_fmt;
|
||||||
if (ost->video_resample) {
|
if (ost->video_resample) {
|
||||||
codec->bits_per_raw_sample= frame_bits_per_raw_sample;
|
codec->bits_per_raw_sample= frame_bits_per_raw_sample;
|
||||||
}
|
}
|
||||||
if (!codec->width || !codec->height) {
|
|
||||||
codec->width = icodec->width;
|
|
||||||
codec->height = icodec->height;
|
|
||||||
}
|
|
||||||
ost->resample_height = icodec->height;
|
ost->resample_height = icodec->height;
|
||||||
ost->resample_width = icodec->width;
|
ost->resample_width = icodec->width;
|
||||||
ost->resample_pix_fmt= icodec->pix_fmt;
|
ost->resample_pix_fmt= icodec->pix_fmt;
|
||||||
@@ -2375,9 +2380,9 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
|
if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
|
||||||
/* maximum video buffer size is 6-bytes per pixel, plus DPX header size */
|
/* maximum video buffer size is 6-bytes per pixel, plus DPX header size (1664)*/
|
||||||
int size= codec->width * codec->height;
|
int size= codec->width * codec->height;
|
||||||
bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 1664);
|
bit_buffer_size= FFMAX(bit_buffer_size, 7*size + 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2728,7 +2733,7 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
}
|
}
|
||||||
/* the following test is needed in case new streams appear
|
/* the following test is needed in case new streams appear
|
||||||
dynamically in stream : we ignore them */
|
dynamically in stream : we ignore them */
|
||||||
if (pkt.stream_index >= input_files[file_index].ctx->nb_streams)
|
if (pkt.stream_index >= input_files[file_index].nb_streams)
|
||||||
goto discard_packet;
|
goto discard_packet;
|
||||||
ist_index = input_files[file_index].ist_index + pkt.stream_index;
|
ist_index = input_files[file_index].ist_index + pkt.stream_index;
|
||||||
ist = &input_streams[ist_index];
|
ist = &input_streams[ist_index];
|
||||||
@@ -2941,7 +2946,7 @@ static int opt_frame_pix_fmt(const char *opt, const char *arg)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
show_pix_fmts();
|
opt_pix_fmts(NULL, NULL);
|
||||||
ffmpeg_exit(0);
|
ffmpeg_exit(0);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3465,6 +3470,7 @@ static int opt_input_file(const char *opt, const char *filename)
|
|||||||
input_files = grow_array(input_files, sizeof(*input_files), &nb_input_files, nb_input_files + 1);
|
input_files = grow_array(input_files, sizeof(*input_files), &nb_input_files, nb_input_files + 1);
|
||||||
input_files[nb_input_files - 1].ctx = ic;
|
input_files[nb_input_files - 1].ctx = ic;
|
||||||
input_files[nb_input_files - 1].ist_index = nb_input_streams - ic->nb_streams;
|
input_files[nb_input_files - 1].ist_index = nb_input_streams - ic->nb_streams;
|
||||||
|
input_files[nb_input_files - 1].nb_streams = ic->nb_streams;
|
||||||
|
|
||||||
top_field_first = -1;
|
top_field_first = -1;
|
||||||
video_channel = 0;
|
video_channel = 0;
|
||||||
@@ -3952,7 +3958,7 @@ static int opt_output_file(const char *opt, const char *filename)
|
|||||||
/* check filename in case of an image number is expected */
|
/* check filename in case of an image number is expected */
|
||||||
if (oc->oformat->flags & AVFMT_NEEDNUMBER) {
|
if (oc->oformat->flags & AVFMT_NEEDNUMBER) {
|
||||||
if (!av_filename_number_test(oc->filename)) {
|
if (!av_filename_number_test(oc->filename)) {
|
||||||
print_error(oc->filename, AVERROR(EINVAL));
|
print_error(oc->filename, AVERROR_NUMEXPECTED);
|
||||||
ffmpeg_exit(1);
|
ffmpeg_exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3963,7 +3969,7 @@ static int opt_output_file(const char *opt, const char *filename)
|
|||||||
(strchr(filename, ':') == NULL ||
|
(strchr(filename, ':') == NULL ||
|
||||||
filename[1] == ':' ||
|
filename[1] == ':' ||
|
||||||
av_strstart(filename, "file:", NULL))) {
|
av_strstart(filename, "file:", NULL))) {
|
||||||
if (avio_check(filename, 0) == 0) {
|
if (url_exist(filename)) {
|
||||||
if (!using_stdin) {
|
if (!using_stdin) {
|
||||||
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
|
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
@@ -3980,7 +3986,7 @@ static int opt_output_file(const char *opt, const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* open the file */
|
/* open the file */
|
||||||
if ((err = avio_open(&oc->pb, filename, AVIO_FLAG_WRITE)) < 0) {
|
if ((err = avio_open(&oc->pb, filename, AVIO_WRONLY)) < 0) {
|
||||||
print_error(filename, err);
|
print_error(filename, err);
|
||||||
ffmpeg_exit(1);
|
ffmpeg_exit(1);
|
||||||
}
|
}
|
||||||
@@ -4071,16 +4077,18 @@ static void parse_matrix_coeffs(uint16_t *dest, const char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_inter_matrix(const char *arg)
|
static int opt_inter_matrix(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
inter_matrix = av_mallocz(sizeof(uint16_t) * 64);
|
inter_matrix = av_mallocz(sizeof(uint16_t) * 64);
|
||||||
parse_matrix_coeffs(inter_matrix, arg);
|
parse_matrix_coeffs(inter_matrix, arg);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_intra_matrix(const char *arg)
|
static int opt_intra_matrix(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
intra_matrix = av_mallocz(sizeof(uint16_t) * 64);
|
intra_matrix = av_mallocz(sizeof(uint16_t) * 64);
|
||||||
parse_matrix_coeffs(intra_matrix, arg);
|
parse_matrix_coeffs(intra_matrix, arg);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_usage(void)
|
static void show_usage(void)
|
||||||
@@ -4090,7 +4098,7 @@ static void show_usage(void)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_help(void)
|
static int opt_help(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
AVCodec *c;
|
AVCodec *c;
|
||||||
AVOutputFormat *oformat = NULL;
|
AVOutputFormat *oformat = NULL;
|
||||||
@@ -4145,6 +4153,7 @@ static void show_help(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
|
av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opt_target(const char *opt, const char *arg)
|
static int opt_target(const char *opt, const char *arg)
|
||||||
@@ -4375,10 +4384,14 @@ static void log_callback_null(void* ptr, int level, const char* fmt, va_list vl)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_passlogfile(const char *arg)
|
static int opt_passlogfile(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
pass_logfilename_prefix = arg;
|
pass_logfilename_prefix = arg;
|
||||||
opt_default("passlogfile", arg);
|
#if CONFIG_LIBX264_ENCODER
|
||||||
|
return opt_default("passlogfile", arg);
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
|
41
ffplay.c
41
ffplay.c
@@ -27,6 +27,7 @@
|
|||||||
#include "libavutil/colorspace.h"
|
#include "libavutil/colorspace.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
#include "libavutil/samplefmt.h"
|
#include "libavutil/samplefmt.h"
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#include "libavcodec/audioconvert.h"
|
#include "libavcodec/audioconvert.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "libavcodec/avfft.h"
|
#include "libavcodec/avfft.h"
|
||||||
|
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
@@ -211,7 +212,7 @@ typedef struct VideoState {
|
|||||||
int refresh;
|
int refresh;
|
||||||
} VideoState;
|
} VideoState;
|
||||||
|
|
||||||
static void show_help(void);
|
static int opt_help(const char *opt, const char *arg);
|
||||||
|
|
||||||
/* options specified by the user */
|
/* options specified by the user */
|
||||||
static AVInputFormat *file_iformat;
|
static AVInputFormat *file_iformat;
|
||||||
@@ -1778,8 +1779,10 @@ static int video_thread(void *arg)
|
|||||||
|
|
||||||
if (ret < 0) goto the_end;
|
if (ret < 0) goto the_end;
|
||||||
|
|
||||||
|
#if CONFIG_AVFILTER
|
||||||
if (!picref)
|
if (!picref)
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
pts = pts_int*av_q2d(is->video_st->time_base);
|
pts = pts_int*av_q2d(is->video_st->time_base);
|
||||||
|
|
||||||
@@ -2295,15 +2298,13 @@ static int decode_interrupt_cb(void)
|
|||||||
static int read_thread(void *arg)
|
static int read_thread(void *arg)
|
||||||
{
|
{
|
||||||
VideoState *is = arg;
|
VideoState *is = arg;
|
||||||
AVFormatContext *ic;
|
AVFormatContext *ic = NULL;
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
int st_index[AVMEDIA_TYPE_NB];
|
int st_index[AVMEDIA_TYPE_NB];
|
||||||
AVPacket pkt1, *pkt = &pkt1;
|
AVPacket pkt1, *pkt = &pkt1;
|
||||||
AVFormatParameters params, *ap = ¶ms;
|
|
||||||
int eof=0;
|
int eof=0;
|
||||||
int pkt_in_play_range = 0;
|
int pkt_in_play_range = 0;
|
||||||
|
AVDictionaryEntry *t;
|
||||||
ic = avformat_alloc_context();
|
|
||||||
|
|
||||||
memset(st_index, -1, sizeof(st_index));
|
memset(st_index, -1, sizeof(st_index));
|
||||||
is->video_stream = -1;
|
is->video_stream = -1;
|
||||||
@@ -2313,30 +2314,17 @@ static int read_thread(void *arg)
|
|||||||
global_video_state = is;
|
global_video_state = is;
|
||||||
avio_set_interrupt_cb(decode_interrupt_cb);
|
avio_set_interrupt_cb(decode_interrupt_cb);
|
||||||
|
|
||||||
memset(ap, 0, sizeof(*ap));
|
err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts);
|
||||||
|
|
||||||
ap->prealloced_context = 1;
|
|
||||||
ap->width = frame_width;
|
|
||||||
ap->height= frame_height;
|
|
||||||
ap->time_base= (AVRational){1, 25};
|
|
||||||
ap->pix_fmt = frame_pix_fmt;
|
|
||||||
ic->flags |= AVFMT_FLAG_PRIV_OPT;
|
|
||||||
|
|
||||||
|
|
||||||
err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap);
|
|
||||||
if (err >= 0) {
|
|
||||||
set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
|
|
||||||
err = av_demuxer_open(ic, ap);
|
|
||||||
if(err < 0){
|
|
||||||
avformat_free_context(ic);
|
|
||||||
ic= NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
print_error(is->filename, err);
|
print_error(is->filename, err);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);
|
||||||
|
ret = AVERROR_OPTION_NOT_FOUND;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
is->ic = ic;
|
is->ic = ic;
|
||||||
|
|
||||||
if(genpts)
|
if(genpts)
|
||||||
@@ -2964,7 +2952,7 @@ static void show_usage(void)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_help(void)
|
static int opt_help(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
av_log_set_callback(log_callback_help);
|
av_log_set_callback(log_callback_help);
|
||||||
show_usage();
|
show_usage();
|
||||||
@@ -2996,6 +2984,7 @@ static void show_help(void)
|
|||||||
"down/up seek backward/forward 1 minute\n"
|
"down/up seek backward/forward 1 minute\n"
|
||||||
"mouse click seek to percentage in file corresponding to fraction of width\n"
|
"mouse click seek to percentage in file corresponding to fraction of width\n"
|
||||||
);
|
);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from the main */
|
/* Called from the main */
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
@@ -353,7 +353,7 @@ static int opt_input_file(const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_help(void)
|
static int opt_help(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
av_log_set_callback(log_callback_help);
|
av_log_set_callback(log_callback_help);
|
||||||
show_usage();
|
show_usage();
|
||||||
@@ -361,6 +361,7 @@ static void show_help(void)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
av_opt_show2(avformat_opts, NULL,
|
av_opt_show2(avformat_opts, NULL,
|
||||||
AV_OPT_FLAG_DECODING_PARAM, 0);
|
AV_OPT_FLAG_DECODING_PARAM, 0);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_pretty(void)
|
static void opt_pretty(void)
|
||||||
|
45
ffserver.c
45
ffserver.c
@@ -39,7 +39,7 @@
|
|||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/random_seed.h"
|
#include "libavutil/random_seed.h"
|
||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavcodec/opt.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -94,7 +94,9 @@ static const char *http_state[] = {
|
|||||||
"RTSP_SEND_PACKET",
|
"RTSP_SEND_PACKET",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
#define MAX_STREAMS 20
|
#define MAX_STREAMS 20
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IOBUFFER_INIT_SIZE 8192
|
#define IOBUFFER_INIT_SIZE 8192
|
||||||
|
|
||||||
@@ -2229,11 +2231,11 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0);
|
av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0);
|
||||||
av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0);
|
av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0);
|
||||||
|
|
||||||
c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams);
|
|
||||||
|
|
||||||
for(i=0;i<c->stream->nb_streams;i++) {
|
for(i=0;i<c->stream->nb_streams;i++) {
|
||||||
|
AVStream *st;
|
||||||
AVStream *src;
|
AVStream *src;
|
||||||
c->fmt_ctx.streams[i] = av_mallocz(sizeof(AVStream));
|
st = av_mallocz(sizeof(AVStream));
|
||||||
|
c->fmt_ctx.streams[i] = st;
|
||||||
/* if file or feed, then just take streams from FFStream struct */
|
/* if file or feed, then just take streams from FFStream struct */
|
||||||
if (!c->stream->feed ||
|
if (!c->stream->feed ||
|
||||||
c->stream->feed == c->stream)
|
c->stream->feed == c->stream)
|
||||||
@@ -2241,9 +2243,9 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
else
|
else
|
||||||
src = c->stream->feed->streams[c->stream->feed_streams[i]];
|
src = c->stream->feed->streams[c->stream->feed_streams[i]];
|
||||||
|
|
||||||
*(c->fmt_ctx.streams[i]) = *src;
|
*st = *src;
|
||||||
c->fmt_ctx.streams[i]->priv_data = 0;
|
st->priv_data = 0;
|
||||||
c->fmt_ctx.streams[i]->codec->frame_number = 0; /* XXX: should be done in
|
st->codec->frame_number = 0; /* XXX: should be done in
|
||||||
AVStream, not in codec */
|
AVStream, not in codec */
|
||||||
}
|
}
|
||||||
/* set output format parameters */
|
/* set output format parameters */
|
||||||
@@ -2941,9 +2943,11 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
|
|||||||
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
snprintf(avc->filename, 1024, "rtp://0.0.0.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) ||
|
if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) ||
|
||||||
!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams))))
|
!(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams))))
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
|
#endif
|
||||||
if (avc->nb_streams >= INT_MAX/sizeof(*avs) ||
|
if (avc->nb_streams >= INT_MAX/sizeof(*avs) ||
|
||||||
!(avs = av_malloc(avc->nb_streams * sizeof(*avs))))
|
!(avs = av_malloc(avc->nb_streams * sizeof(*avs))))
|
||||||
goto sdp_done;
|
goto sdp_done;
|
||||||
@@ -2956,8 +2960,10 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
|
|||||||
av_sdp_create(&avc, 1, *pbuffer, 2048);
|
av_sdp_create(&avc, 1, *pbuffer, 2048);
|
||||||
|
|
||||||
sdp_done:
|
sdp_done:
|
||||||
|
#if !FF_API_MAX_STREAMS
|
||||||
av_free(avc->streams);
|
av_free(avc->streams);
|
||||||
av_dict_free(&avc->metadata);
|
#endif
|
||||||
|
av_metadata_free(&avc->metadata);
|
||||||
av_free(avc);
|
av_free(avc);
|
||||||
av_free(avs);
|
av_free(avs);
|
||||||
|
|
||||||
@@ -3385,9 +3391,6 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
if (!st)
|
if (!st)
|
||||||
goto fail;
|
goto fail;
|
||||||
ctx->nb_streams = 1;
|
ctx->nb_streams = 1;
|
||||||
ctx->streams = av_mallocz(sizeof(AVStream *) * ctx->nb_streams);
|
|
||||||
if (!ctx->streams)
|
|
||||||
goto fail;
|
|
||||||
ctx->streams[0] = st;
|
ctx->streams[0] = st;
|
||||||
|
|
||||||
if (!c->stream->feed ||
|
if (!c->stream->feed ||
|
||||||
@@ -3421,7 +3424,7 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0)
|
if (url_open(&h, ctx->filename, AVIO_WRONLY) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
c->rtp_handles[stream_index] = h;
|
c->rtp_handles[stream_index] = h;
|
||||||
max_packet_size = url_get_max_packet_size(h);
|
max_packet_size = url_get_max_packet_size(h);
|
||||||
@@ -3674,7 +3677,7 @@ static void build_feed_streams(void)
|
|||||||
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (avio_check(feed->feed_filename, AVIO_FLAG_READ) > 0) {
|
if (url_exist(feed->feed_filename)) {
|
||||||
/* See if it matches */
|
/* See if it matches */
|
||||||
AVFormatContext *s = NULL;
|
AVFormatContext *s = NULL;
|
||||||
int matches = 0;
|
int matches = 0;
|
||||||
@@ -3747,7 +3750,7 @@ static void build_feed_streams(void)
|
|||||||
unlink(feed->feed_filename);
|
unlink(feed->feed_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (avio_check(feed->feed_filename, AVIO_FLAG_WRITE) <= 0) {
|
if (!url_exist(feed->feed_filename)) {
|
||||||
AVFormatContext s1 = {0}, *s = &s1;
|
AVFormatContext s1 = {0}, *s = &s1;
|
||||||
|
|
||||||
if (feed->readonly) {
|
if (feed->readonly) {
|
||||||
@@ -3757,15 +3760,20 @@ static void build_feed_streams(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* only write the header of the ffm file */
|
/* only write the header of the ffm file */
|
||||||
if (avio_open(&s->pb, feed->feed_filename, AVIO_FLAG_WRITE) < 0) {
|
if (avio_open(&s->pb, feed->feed_filename, AVIO_WRONLY) < 0) {
|
||||||
http_log("Could not open output feed file '%s'\n",
|
http_log("Could not open output feed file '%s'\n",
|
||||||
feed->feed_filename);
|
feed->feed_filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
s->oformat = feed->fmt;
|
s->oformat = feed->fmt;
|
||||||
s->nb_streams = feed->nb_streams;
|
s->nb_streams = feed->nb_streams;
|
||||||
s->streams = feed->streams;
|
for(i=0;i<s->nb_streams;i++) {
|
||||||
if (avformat_write_header(s, NULL) < 0) {
|
AVStream *st;
|
||||||
|
st = feed->streams[i];
|
||||||
|
s->streams[i] = st;
|
||||||
|
}
|
||||||
|
av_set_parameters(s, NULL);
|
||||||
|
if (av_write_header(s) < 0) {
|
||||||
http_log("Container doesn't supports the required parameters\n");
|
http_log("Container doesn't supports the required parameters\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -4654,12 +4662,13 @@ static void opt_debug(void)
|
|||||||
logfilename[0] = '-';
|
logfilename[0] = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_help(void)
|
static int opt_help(const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
printf("usage: ffserver [options]\n"
|
printf("usage: ffserver [options]\n"
|
||||||
"Hyper fast multi format Audio/Video streaming server\n");
|
"Hyper fast multi format Audio/Video streaming server\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
show_help_options(options, "Main options:\n", 0, 0);
|
show_help_options(options, "Main options:\n", 0, 0);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
|
@@ -133,7 +133,9 @@ typedef struct FourXContext{
|
|||||||
GetBitContext pre_gb; ///< ac/dc prefix
|
GetBitContext pre_gb; ///< ac/dc prefix
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
const uint8_t *bytestream;
|
const uint8_t *bytestream;
|
||||||
|
const uint8_t *bytestream_end;
|
||||||
const uint16_t *wordstream;
|
const uint16_t *wordstream;
|
||||||
|
const uint16_t *wordstream_end;
|
||||||
int mv[256];
|
int mv[256];
|
||||||
VLC pre_vlc;
|
VLC pre_vlc;
|
||||||
int last_dc;
|
int last_dc;
|
||||||
@@ -328,6 +330,10 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
|||||||
assert(code>=0 && code<=6);
|
assert(code>=0 && code<=6);
|
||||||
|
|
||||||
if(code == 0){
|
if(code == 0){
|
||||||
|
if (f->bytestream_end - f->bytestream < 1){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
src += f->mv[ *f->bytestream++ ];
|
src += f->mv[ *f->bytestream++ ];
|
||||||
if(start > src || src > end){
|
if(start > src || src > end){
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||||
@@ -345,15 +351,31 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
|||||||
}else if(code == 3 && f->version<2){
|
}else if(code == 3 && f->version<2){
|
||||||
mcdc(dst, src, log2w, h, stride, 1, 0);
|
mcdc(dst, src, log2w, h, stride, 1, 0);
|
||||||
}else if(code == 4){
|
}else if(code == 4){
|
||||||
|
if (f->bytestream_end - f->bytestream < 1){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
src += f->mv[ *f->bytestream++ ];
|
src += f->mv[ *f->bytestream++ ];
|
||||||
if(start > src || src > end){
|
if(start > src || src > end){
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
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, av_le2ne16(*f->wordstream++));
|
mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));
|
||||||
}else if(code == 5){
|
}else if(code == 5){
|
||||||
|
if (f->wordstream_end - f->wordstream < 1){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
|
mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
|
||||||
}else if(code == 6){
|
}else if(code == 6){
|
||||||
|
if (f->wordstream_end - f->wordstream < 2){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(log2w){
|
if(log2w){
|
||||||
dst[0] = av_le2ne16(*f->wordstream++);
|
dst[0] = av_le2ne16(*f->wordstream++);
|
||||||
dst[1] = av_le2ne16(*f->wordstream++);
|
dst[1] = av_le2ne16(*f->wordstream++);
|
||||||
@@ -375,6 +397,8 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
|
|
||||||
if(f->version>1){
|
if(f->version>1){
|
||||||
extra=20;
|
extra=20;
|
||||||
|
if (length < extra)
|
||||||
|
return -1;
|
||||||
bitstream_size= AV_RL32(buf+8);
|
bitstream_size= AV_RL32(buf+8);
|
||||||
wordstream_size= AV_RL32(buf+12);
|
wordstream_size= AV_RL32(buf+12);
|
||||||
bytestream_size= AV_RL32(buf+16);
|
bytestream_size= AV_RL32(buf+16);
|
||||||
@@ -385,11 +409,10 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
bytestream_size= FFMAX(length - bitstream_size - wordstream_size, 0);
|
bytestream_size= FFMAX(length - bitstream_size - wordstream_size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bitstream_size+ bytestream_size+ wordstream_size + extra != length
|
if (bitstream_size > length ||
|
||||||
|| bitstream_size > (1<<26)
|
bytestream_size > length - bitstream_size ||
|
||||||
|| bytestream_size > (1<<26)
|
wordstream_size > length - bytestream_size - bitstream_size ||
|
||||||
|| wordstream_size > (1<<26)
|
extra > length - bytestream_size - bitstream_size - wordstream_size){
|
||||||
){
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "lengths %d %d %d %d\n", bitstream_size, bytestream_size, wordstream_size,
|
av_log(f->avctx, AV_LOG_ERROR, "lengths %d %d %d %d\n", bitstream_size, bytestream_size, wordstream_size,
|
||||||
bitstream_size+ bytestream_size+ wordstream_size - length);
|
bitstream_size+ bytestream_size+ wordstream_size - length);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -399,10 +422,13 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
if (!f->bitstream_buffer)
|
if (!f->bitstream_buffer)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4);
|
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4);
|
||||||
|
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);
|
init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size);
|
||||||
|
|
||||||
f->wordstream= (const uint16_t*)(buf + extra + bitstream_size);
|
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= buf + extra + bitstream_size + wordstream_size;
|
||||||
|
f->bytestream_end = f->bytestream + bytestream_size;
|
||||||
|
|
||||||
init_mv(f);
|
init_mv(f);
|
||||||
|
|
||||||
@@ -531,7 +557,7 @@ static int decode_i_mb(FourXContext *f){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const buf){
|
static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const buf, int buf_size){
|
||||||
int frequency[512];
|
int frequency[512];
|
||||||
uint8_t flag[512];
|
uint8_t flag[512];
|
||||||
int up[512];
|
int up[512];
|
||||||
@@ -539,6 +565,7 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
|
|||||||
int bits_tab[257];
|
int bits_tab[257];
|
||||||
int start, end;
|
int start, end;
|
||||||
const uint8_t *ptr= buf;
|
const uint8_t *ptr= buf;
|
||||||
|
const uint8_t *ptr_end = buf + buf_size;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
memset(frequency, 0, sizeof(frequency));
|
memset(frequency, 0, sizeof(frequency));
|
||||||
@@ -549,6 +576,8 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
|
|||||||
for(;;){
|
for(;;){
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (start <= end && ptr_end - ptr < end - start + 1 + 1)
|
||||||
|
return NULL;
|
||||||
for(i=start; i<=end; i++){
|
for(i=start; i<=end; i++){
|
||||||
frequency[i]= *ptr++;
|
frequency[i]= *ptr++;
|
||||||
}
|
}
|
||||||
@@ -601,9 +630,10 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
|
|||||||
len_tab[j]= len;
|
len_tab[j]= len;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
|
if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
|
||||||
len_tab , 1, 1,
|
len_tab , 1, 1,
|
||||||
bits_tab, 4, 4, 0);
|
bits_tab, 4, 4, 0))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
@@ -621,10 +651,13 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
const int height= f->avctx->height;
|
const int height= f->avctx->height;
|
||||||
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
||||||
const int stride= f->current_picture.linesize[0]>>1;
|
const int stride= f->current_picture.linesize[0]>>1;
|
||||||
|
const uint8_t *buf_end = buf + length;
|
||||||
|
|
||||||
for(y=0; y<height; y+=16){
|
for(y=0; y<height; y+=16){
|
||||||
for(x=0; x<width; x+=16){
|
for(x=0; x<width; x+=16){
|
||||||
unsigned int color[4], bits;
|
unsigned int color[4], bits;
|
||||||
|
if (buf_end - buf < 8)
|
||||||
|
return -1;
|
||||||
memset(color, 0, sizeof(color));
|
memset(color, 0, sizeof(color));
|
||||||
//warning following is purely guessed ...
|
//warning following is purely guessed ...
|
||||||
color[0]= bytestream_get_le16(&buf);
|
color[0]= bytestream_get_le16(&buf);
|
||||||
@@ -658,18 +691,23 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
|
||||||
const int stride= f->current_picture.linesize[0]>>1;
|
const int stride= f->current_picture.linesize[0]>>1;
|
||||||
const unsigned int bitstream_size= AV_RL32(buf);
|
const unsigned int bitstream_size= AV_RL32(buf);
|
||||||
const int token_count av_unused = AV_RL32(buf + bitstream_size + 8);
|
unsigned int prestream_size;
|
||||||
unsigned int prestream_size= 4*AV_RL32(buf + bitstream_size + 4);
|
const uint8_t *prestream;
|
||||||
const uint8_t *prestream= buf + bitstream_size + 12;
|
|
||||||
|
|
||||||
if(prestream_size + bitstream_size + 12 != length
|
if (bitstream_size > (1<<26) || length < bitstream_size + 12)
|
||||||
|| bitstream_size > (1<<26)
|
return -1;
|
||||||
|| prestream_size > (1<<26)){
|
prestream_size = 4*AV_RL32(buf + bitstream_size + 4);
|
||||||
|
prestream = buf + bitstream_size + 12;
|
||||||
|
|
||||||
|
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);
|
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n", prestream_size, bitstream_size, length);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
prestream= read_huffman_tables(f, prestream);
|
prestream= read_huffman_tables(f, prestream, buf + length - prestream);
|
||||||
|
if (!prestream)
|
||||||
|
return -1;
|
||||||
|
|
||||||
init_get_bits(&f->gb, buf + 4, 8*bitstream_size);
|
init_get_bits(&f->gb, buf + 4, 8*bitstream_size);
|
||||||
|
|
||||||
@@ -679,6 +717,7 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
|||||||
if (!f->bitstream_buffer)
|
if (!f->bitstream_buffer)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4);
|
f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4);
|
||||||
|
memset((uint8_t*)f->bitstream_buffer + prestream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size);
|
init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size);
|
||||||
|
|
||||||
f->last_dc= 0*128*8*8;
|
f->last_dc= 0*128*8*8;
|
||||||
@@ -710,6 +749,8 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
AVFrame *p, temp;
|
AVFrame *p, temp;
|
||||||
int i, frame_4cc, frame_size;
|
int i, frame_4cc, frame_size;
|
||||||
|
|
||||||
|
if (buf_size < 12)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
frame_4cc= AV_RL32(buf);
|
frame_4cc= AV_RL32(buf);
|
||||||
if(buf_size != AV_RL32(buf+4)+8 || buf_size < 20){
|
if(buf_size != AV_RL32(buf+4)+8 || buf_size < 20){
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, AV_RL32(buf+4));
|
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, AV_RL32(buf+4));
|
||||||
@@ -722,6 +763,11 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
const int whole_size= AV_RL32(buf+16);
|
const int whole_size= AV_RL32(buf+16);
|
||||||
CFrameBuffer *cfrm;
|
CFrameBuffer *cfrm;
|
||||||
|
|
||||||
|
if (data_size < 0 || whole_size < 0){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "sizes invalid\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
for(i=0; i<CFRAME_BUFFER_COUNT; i++){
|
for(i=0; i<CFRAME_BUFFER_COUNT; i++){
|
||||||
if(f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number)
|
if(f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number)
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n", f->cfrm[i].id);
|
av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n", f->cfrm[i].id);
|
||||||
@@ -738,6 +784,8 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
cfrm= &f->cfrm[i];
|
cfrm= &f->cfrm[i];
|
||||||
|
|
||||||
|
if (data_size > UINT_MAX - cfrm->size - FF_INPUT_BUFFER_PADDING_SIZE)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
cfrm->data= av_fast_realloc(cfrm->data, &cfrm->allocated_size, cfrm->size + data_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
cfrm->data= av_fast_realloc(cfrm->data, &cfrm->allocated_size, cfrm->size + data_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if(!cfrm->data){ //explicit check needed as memcpy below might not catch a NULL
|
if(!cfrm->data){ //explicit check needed as memcpy below might not catch a NULL
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "realloc falure");
|
av_log(f->avctx, AV_LOG_ERROR, "realloc falure");
|
||||||
@@ -781,12 +829,16 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
if(frame_4cc == AV_RL32("ifr2")){
|
if(frame_4cc == AV_RL32("ifr2")){
|
||||||
p->pict_type= AV_PICTURE_TYPE_I;
|
p->pict_type= AV_PICTURE_TYPE_I;
|
||||||
if(decode_i2_frame(f, buf-4, frame_size) < 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;
|
return -1;
|
||||||
|
}
|
||||||
}else if(frame_4cc == AV_RL32("ifrm")){
|
}else if(frame_4cc == AV_RL32("ifrm")){
|
||||||
p->pict_type= AV_PICTURE_TYPE_I;
|
p->pict_type= AV_PICTURE_TYPE_I;
|
||||||
if(decode_i_frame(f, buf, frame_size) < 0)
|
if(decode_i_frame(f, buf, frame_size) < 0){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "decode i frame failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
}else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
|
}else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
|
||||||
if(!f->last_picture.data[0]){
|
if(!f->last_picture.data[0]){
|
||||||
f->last_picture.reference= 1;
|
f->last_picture.reference= 1;
|
||||||
@@ -797,8 +849,10 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
p->pict_type= AV_PICTURE_TYPE_P;
|
p->pict_type= AV_PICTURE_TYPE_P;
|
||||||
if(decode_p_frame(f, buf, frame_size) < 0)
|
if(decode_p_frame(f, buf, frame_size) < 0){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "decode p frame failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
}else if(frame_4cc == AV_RL32("snd_")){
|
}else if(frame_4cc == AV_RL32("snd_")){
|
||||||
av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size);
|
av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size);
|
||||||
}else{
|
}else{
|
||||||
@@ -831,6 +885,10 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
|||||||
av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
|
av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if((avctx->width % 16) || (avctx->height % 16)) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "unsupported width/height\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&f->current_picture);
|
avcodec_get_frame_defaults(&f->current_picture);
|
||||||
avcodec_get_frame_defaults(&f->last_picture);
|
avcodec_get_frame_defaults(&f->last_picture);
|
||||||
|
@@ -50,8 +50,6 @@ typedef struct EightBpsContext {
|
|||||||
|
|
||||||
unsigned char planes;
|
unsigned char planes;
|
||||||
unsigned char planemap[4];
|
unsigned char planemap[4];
|
||||||
|
|
||||||
uint32_t pal[256];
|
|
||||||
} EightBpsContext;
|
} EightBpsContext;
|
||||||
|
|
||||||
|
|
||||||
@@ -131,16 +129,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->bits_per_coded_sample <= 8) {
|
if (avctx->palctrl) {
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
memcpy (c->pic.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||||
AV_PKT_DATA_PALETTE,
|
if (avctx->palctrl->palette_changed) {
|
||||||
NULL);
|
|
||||||
if (pal) {
|
|
||||||
c->pic.palette_has_changed = 1;
|
c->pic.palette_has_changed = 1;
|
||||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
avctx->palctrl->palette_changed = 0;
|
||||||
}
|
} else
|
||||||
|
c->pic.palette_has_changed = 0;
|
||||||
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
*data_size = sizeof(AVFrame);
|
||||||
@@ -170,6 +165,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||||
c->planes = 1;
|
c->planes = 1;
|
||||||
c->planemap[0] = 0; // 1st plane is palette indexes
|
c->planemap[0] = 0; // 1st plane is palette indexes
|
||||||
|
if (avctx->palctrl == NULL) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Error: PAL8 format but no palette from demuxer.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
||||||
|
@@ -15,6 +15,7 @@ OBJS = allcodecs.o \
|
|||||||
fmtconvert.o \
|
fmtconvert.o \
|
||||||
imgconvert.o \
|
imgconvert.o \
|
||||||
jrevdct.o \
|
jrevdct.o \
|
||||||
|
opt.o \
|
||||||
options.o \
|
options.o \
|
||||||
parser.o \
|
parser.o \
|
||||||
raw.o \
|
raw.o \
|
||||||
@@ -567,6 +568,7 @@ OBJS-$(CONFIG_WEBM_MUXER) += xiph.o mpeg4audio.o \
|
|||||||
OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
|
|
||||||
# external codec libraries
|
# external codec libraries
|
||||||
|
OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
|
||||||
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
||||||
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
|
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
|
||||||
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
|
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
|
||||||
@@ -587,6 +589,7 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
|||||||
libschroedinger.o \
|
libschroedinger.o \
|
||||||
libdirac_libschro.o
|
libdirac_libschro.o
|
||||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||||
|
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
||||||
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
||||||
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
|
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
|
||||||
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
||||||
|
@@ -258,7 +258,7 @@ typedef struct {
|
|||||||
DynamicRangeControl che_drc;
|
DynamicRangeControl che_drc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup elements Channel element related data.
|
* @name Channel element related data
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
|
enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
|
||||||
@@ -270,14 +270,15 @@ typedef struct {
|
|||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.)
|
* @name temporary aligned temporary buffers
|
||||||
|
* (We do not want to have these on the stack.)
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
DECLARE_ALIGNED(32, float, buf_mdct)[1024];
|
DECLARE_ALIGNED(32, float, buf_mdct)[1024];
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tables Computed / set up during initialization.
|
* @name Computed / set up during initialization
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
FFTContext mdct;
|
FFTContext mdct;
|
||||||
@@ -289,7 +290,7 @@ typedef struct {
|
|||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup output Members used for output interleaving.
|
* @name Members used for output interleaving
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output).
|
float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output).
|
||||||
|
@@ -72,7 +72,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
int pce_size = 0;
|
int pce_size = 0;
|
||||||
uint8_t pce_data[MAX_PCE_SIZE];
|
uint8_t pce_data[MAX_PCE_SIZE];
|
||||||
if (!hdr.chan_config) {
|
if (!hdr.chan_config) {
|
||||||
init_get_bits(&gb, buf, buf_size);
|
init_get_bits(&gb, buf, buf_size * 8);
|
||||||
if (get_bits(&gb, 3) != 5) {
|
if (get_bits(&gb, 3) != 5) {
|
||||||
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
|
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -1755,12 +1755,10 @@ static void windowing_and_mdct_ltp(AACContext *ac, float *out,
|
|||||||
} else {
|
} else {
|
||||||
memset(in, 0, 448 * sizeof(float));
|
memset(in, 0, 448 * sizeof(float));
|
||||||
ac->dsp.vector_fmul(in + 448, in + 448, swindow_prev, 128);
|
ac->dsp.vector_fmul(in + 448, in + 448, swindow_prev, 128);
|
||||||
memcpy(in + 576, in + 576, 448 * sizeof(float));
|
|
||||||
}
|
}
|
||||||
if (ics->window_sequence[0] != LONG_START_SEQUENCE) {
|
if (ics->window_sequence[0] != LONG_START_SEQUENCE) {
|
||||||
ac->dsp.vector_fmul_reverse(in + 1024, in + 1024, lwindow, 1024);
|
ac->dsp.vector_fmul_reverse(in + 1024, in + 1024, lwindow, 1024);
|
||||||
} else {
|
} else {
|
||||||
memcpy(in + 1024, in + 1024, 448 * sizeof(float));
|
|
||||||
ac->dsp.vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, swindow, 128);
|
ac->dsp.vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, swindow, 128);
|
||||||
memset(in + 1024 + 576, 0, 448 * sizeof(float));
|
memset(in + 1024 + 576, 0, 448 * sizeof(float));
|
||||||
}
|
}
|
||||||
@@ -2078,7 +2076,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
|||||||
ChannelElement *che = NULL, *che_prev = NULL;
|
ChannelElement *che = NULL, *che_prev = NULL;
|
||||||
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
|
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
|
||||||
int err, elem_id, data_size_tmp;
|
int err, elem_id, data_size_tmp;
|
||||||
int samples = 0, multiplier;
|
int samples = 0, multiplier, audio_found = 0;
|
||||||
|
|
||||||
if (show_bits(gb, 12) == 0xfff) {
|
if (show_bits(gb, 12) == 0xfff) {
|
||||||
if (parse_adts_frame_header(ac, gb) < 0) {
|
if (parse_adts_frame_header(ac, gb) < 0) {
|
||||||
@@ -2109,10 +2107,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
case TYPE_SCE:
|
case TYPE_SCE:
|
||||||
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
||||||
|
audio_found = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CPE:
|
case TYPE_CPE:
|
||||||
err = decode_cpe(ac, gb, che);
|
err = decode_cpe(ac, gb, che);
|
||||||
|
audio_found = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CCE:
|
case TYPE_CCE:
|
||||||
@@ -2121,6 +2121,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
case TYPE_LFE:
|
case TYPE_LFE:
|
||||||
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
||||||
|
audio_found = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_DSE:
|
case TYPE_DSE:
|
||||||
@@ -2197,7 +2198,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
|||||||
samples, avctx->channels);
|
samples, avctx->channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ac->output_configured)
|
if (ac->output_configured && audio_found)
|
||||||
ac->output_configured = OC_LOCKED;
|
ac->output_configured = OC_LOCKED;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -813,14 +813,17 @@ static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2
|
|||||||
const float (*H_LUT)[8][4] = (PS_BASELINE || ps->icc_mode < 3) ? HA : HB;
|
const float (*H_LUT)[8][4] = (PS_BASELINE || ps->icc_mode < 3) ? HA : HB;
|
||||||
|
|
||||||
//Remapping
|
//Remapping
|
||||||
memcpy(H11[0][0], H11[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[0][0][0]));
|
if (ps->num_env_old) {
|
||||||
memcpy(H11[1][0], H11[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[1][0][0]));
|
memcpy(H11[0][0], H11[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[0][0][0]));
|
||||||
memcpy(H12[0][0], H12[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[0][0][0]));
|
memcpy(H11[1][0], H11[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[1][0][0]));
|
||||||
memcpy(H12[1][0], H12[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[1][0][0]));
|
memcpy(H12[0][0], H12[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[0][0][0]));
|
||||||
memcpy(H21[0][0], H21[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[0][0][0]));
|
memcpy(H12[1][0], H12[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[1][0][0]));
|
||||||
memcpy(H21[1][0], H21[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[1][0][0]));
|
memcpy(H21[0][0], H21[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[0][0][0]));
|
||||||
memcpy(H22[0][0], H22[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[0][0][0]));
|
memcpy(H21[1][0], H21[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[1][0][0]));
|
||||||
memcpy(H22[1][0], H22[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[1][0][0]));
|
memcpy(H22[0][0], H22[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[0][0][0]));
|
||||||
|
memcpy(H22[1][0], H22[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[1][0][0]));
|
||||||
|
}
|
||||||
|
|
||||||
if (is34) {
|
if (is34) {
|
||||||
remap34(&iid_mapped, ps->iid_par, ps->nr_iid_par, ps->num_env, 1);
|
remap34(&iid_mapped, ps->iid_par, ps->nr_iid_par, ps->num_env, 1);
|
||||||
remap34(&icc_mapped, ps->icc_par, ps->nr_icc_par, ps->num_env, 1);
|
remap34(&icc_mapped, ps->icc_par, ps->nr_icc_par, ps->num_env, 1);
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "fft.h"
|
#include "fft.h"
|
||||||
#include "aacps.h"
|
#include "aacps.h"
|
||||||
#include "libavutil/libm.h"
|
#include "libavutil/libm.h"
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@@ -1457,6 +1458,7 @@ static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr,
|
|||||||
uint16_t *table = ch_data->bs_freq_res[e + 1] ? sbr->f_tablehigh : sbr->f_tablelow;
|
uint16_t *table = ch_data->bs_freq_res[e + 1] ? sbr->f_tablehigh : sbr->f_tablelow;
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
|
av_assert0(sbr->kx[1] <= table[0]);
|
||||||
for (i = 0; i < ilim; i++)
|
for (i = 0; i < ilim; i++)
|
||||||
for (m = table[i]; m < table[i + 1]; m++)
|
for (m = table[i]; m < table[i + 1]; m++)
|
||||||
sbr->e_origmapped[e][m - sbr->kx[1]] = ch_data->env_facs[e+1][i];
|
sbr->e_origmapped[e][m - sbr->kx[1]] = ch_data->env_facs[e+1][i];
|
||||||
|
@@ -94,7 +94,7 @@ typedef struct AC3BitAllocParameters {
|
|||||||
* Coded AC-3 header values up to the lfeon element, plus derived values.
|
* Coded AC-3 header values up to the lfeon element, plus derived values.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/** @defgroup coded Coded elements
|
/** @name Coded elements
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
uint16_t sync_word;
|
uint16_t sync_word;
|
||||||
@@ -112,7 +112,7 @@ typedef struct {
|
|||||||
int num_blocks; ///< number of audio blocks
|
int num_blocks; ///< number of audio blocks
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/** @defgroup derived Derived values
|
/** @name Derived values
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
uint8_t sr_shift;
|
uint8_t sr_shift;
|
||||||
|
@@ -69,7 +69,7 @@ typedef struct {
|
|||||||
AVCodecContext *avctx; ///< parent context
|
AVCodecContext *avctx; ///< parent context
|
||||||
GetBitContext gbc; ///< bitstream reader
|
GetBitContext gbc; ///< bitstream reader
|
||||||
|
|
||||||
///@defgroup bsi bit stream information
|
///@name Bit stream information
|
||||||
///@{
|
///@{
|
||||||
int frame_type; ///< frame type (strmtyp)
|
int frame_type; ///< frame type (strmtyp)
|
||||||
int substreamid; ///< substream identification
|
int substreamid; ///< substream identification
|
||||||
@@ -87,7 +87,7 @@ typedef struct {
|
|||||||
int eac3; ///< indicates if current frame is E-AC-3
|
int eac3; ///< indicates if current frame is E-AC-3
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup audfrm frame syntax parameters
|
///@name Frame syntax parameters
|
||||||
int snr_offset_strategy; ///< SNR offset strategy (snroffststr)
|
int snr_offset_strategy; ///< SNR offset strategy (snroffststr)
|
||||||
int block_switch_syntax; ///< block switch syntax enabled (blkswe)
|
int block_switch_syntax; ///< block switch syntax enabled (blkswe)
|
||||||
int dither_flag_syntax; ///< dither flag syntax enabled (dithflage)
|
int dither_flag_syntax; ///< dither flag syntax enabled (dithflage)
|
||||||
@@ -97,7 +97,7 @@ typedef struct {
|
|||||||
int skip_syntax; ///< skip field syntax enabled (skipflde)
|
int skip_syntax; ///< skip field syntax enabled (skipflde)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup cpl standard coupling
|
///@name Standard coupling
|
||||||
int cpl_in_use[AC3_MAX_BLOCKS]; ///< coupling in use (cplinu)
|
int cpl_in_use[AC3_MAX_BLOCKS]; ///< coupling in use (cplinu)
|
||||||
int cpl_strategy_exists[AC3_MAX_BLOCKS];///< coupling strategy exists (cplstre)
|
int cpl_strategy_exists[AC3_MAX_BLOCKS];///< coupling strategy exists (cplstre)
|
||||||
int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl)
|
int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl)
|
||||||
@@ -110,7 +110,7 @@ typedef struct {
|
|||||||
int cpl_coords[AC3_MAX_CHANNELS][AC3_MAX_CPL_BANDS]; ///< coupling coordinates (cplco)
|
int cpl_coords[AC3_MAX_CHANNELS][AC3_MAX_CPL_BANDS]; ///< coupling coordinates (cplco)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup spx spectral extension
|
///@name Spectral extension
|
||||||
///@{
|
///@{
|
||||||
int spx_in_use; ///< spectral extension in use (spxinu)
|
int spx_in_use; ///< spectral extension in use (spxinu)
|
||||||
uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx)
|
uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx)
|
||||||
@@ -126,12 +126,12 @@ typedef struct {
|
|||||||
float spx_signal_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS];///< spx signal blending factor (sblendfact)
|
float spx_signal_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS];///< spx signal blending factor (sblendfact)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup aht adaptive hybrid transform
|
///@name Adaptive hybrid transform
|
||||||
int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu)
|
int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu)
|
||||||
int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][AC3_MAX_BLOCKS]; ///< pre-IDCT mantissas
|
int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][AC3_MAX_BLOCKS]; ///< pre-IDCT mantissas
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup channel channel
|
///@name Channel
|
||||||
int fbw_channels; ///< number of full-bandwidth channels
|
int fbw_channels; ///< number of full-bandwidth channels
|
||||||
int channels; ///< number of total channels
|
int channels; ///< number of total channels
|
||||||
int lfe_ch; ///< index of LFE channel
|
int lfe_ch; ///< index of LFE channel
|
||||||
@@ -141,27 +141,27 @@ typedef struct {
|
|||||||
int out_channels; ///< number of output channels
|
int out_channels; ///< number of output channels
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup dynrng dynamic range
|
///@name Dynamic range
|
||||||
float dynamic_range[2]; ///< dynamic range
|
float dynamic_range[2]; ///< dynamic range
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup bandwidth bandwidth
|
///@name Bandwidth
|
||||||
int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant)
|
int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant)
|
||||||
int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant)
|
int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup rematrixing rematrixing
|
///@name Rematrixing
|
||||||
int num_rematrixing_bands; ///< number of rematrixing bands (nrematbnd)
|
int num_rematrixing_bands; ///< number of rematrixing bands (nrematbnd)
|
||||||
int rematrixing_flags[4]; ///< rematrixing flags (rematflg)
|
int rematrixing_flags[4]; ///< rematrixing flags (rematflg)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup exponents exponents
|
///@name Exponents
|
||||||
int num_exp_groups[AC3_MAX_CHANNELS]; ///< Number of exponent groups (nexpgrp)
|
int num_exp_groups[AC3_MAX_CHANNELS]; ///< Number of exponent groups (nexpgrp)
|
||||||
int8_t dexps[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< decoded exponents
|
int8_t dexps[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< decoded exponents
|
||||||
int exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS]; ///< exponent strategies (expstr)
|
int exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS]; ///< exponent strategies (expstr)
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup bitalloc bit allocation
|
///@name Bit allocation
|
||||||
AC3BitAllocParameters bit_alloc_params; ///< bit allocation parameters
|
AC3BitAllocParameters bit_alloc_params; ///< bit allocation parameters
|
||||||
int first_cpl_leak; ///< first coupling leak state (firstcplleak)
|
int first_cpl_leak; ///< first coupling leak state (firstcplleak)
|
||||||
int snr_offset[AC3_MAX_CHANNELS]; ///< signal-to-noise ratio offsets (snroffst)
|
int snr_offset[AC3_MAX_CHANNELS]; ///< signal-to-noise ratio offsets (snroffst)
|
||||||
@@ -177,25 +177,25 @@ typedef struct {
|
|||||||
uint8_t dba_values[AC3_MAX_CHANNELS][8]; ///< delta values for each segment
|
uint8_t dba_values[AC3_MAX_CHANNELS][8]; ///< delta values for each segment
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup dithering zero-mantissa dithering
|
///@name Zero-mantissa dithering
|
||||||
int dither_flag[AC3_MAX_CHANNELS]; ///< dither flags (dithflg)
|
int dither_flag[AC3_MAX_CHANNELS]; ///< dither flags (dithflg)
|
||||||
AVLFG dith_state; ///< for dither generation
|
AVLFG dith_state; ///< for dither generation
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup imdct IMDCT
|
///@name IMDCT
|
||||||
int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags (blksw)
|
int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags (blksw)
|
||||||
FFTContext imdct_512; ///< for 512 sample IMDCT
|
FFTContext imdct_512; ///< for 512 sample IMDCT
|
||||||
FFTContext imdct_256; ///< for 256 sample IMDCT
|
FFTContext imdct_256; ///< for 256 sample IMDCT
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup opt optimization
|
///@name Optimization
|
||||||
DSPContext dsp; ///< for optimization
|
DSPContext dsp; ///< for optimization
|
||||||
AC3DSPContext ac3dsp;
|
AC3DSPContext ac3dsp;
|
||||||
FmtConvertContext fmt_conv; ///< optimized conversion functions
|
FmtConvertContext fmt_conv; ///< optimized conversion functions
|
||||||
float mul_bias; ///< scaling for float_to_int16 conversion
|
float mul_bias; ///< scaling for float_to_int16 conversion
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
///@defgroup arrays aligned arrays
|
///@name Aligned arrays
|
||||||
DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients
|
DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients
|
||||||
DECLARE_ALIGNED(32, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients
|
DECLARE_ALIGNED(32, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients
|
||||||
DECLARE_ALIGNED(32, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block
|
DECLARE_ALIGNED(32, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block
|
||||||
|
@@ -1333,10 +1333,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
buf_size -= 128;
|
buf_size -= 128;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODEC_ID_ADPCM_IMA_EA_EACS:
|
case CODEC_ID_ADPCM_IMA_EA_EACS: {
|
||||||
|
unsigned header_size = 4 + (8<<st);
|
||||||
samples_in_chunk = bytestream_get_le32(&src) >> (1-st);
|
samples_in_chunk = bytestream_get_le32(&src) >> (1-st);
|
||||||
|
|
||||||
if (samples_in_chunk > buf_size-4-(8<<st)) {
|
if (buf_size < header_size || samples_in_chunk > buf_size - header_size) {
|
||||||
src += buf_size - 4;
|
src += buf_size - 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1351,6 +1352,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
*samples++ = adpcm_ima_expand_nibble(&c->status[st], *src&0x0F, 3);
|
*samples++ = adpcm_ima_expand_nibble(&c->status[st], *src&0x0F, 3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case CODEC_ID_ADPCM_IMA_EA_SEAD:
|
case CODEC_ID_ADPCM_IMA_EA_SEAD:
|
||||||
for (; src < buf+buf_size; src++) {
|
for (; src < buf+buf_size; src++) {
|
||||||
*samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] >> 4, 6);
|
*samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] >> 4, 6);
|
||||||
|
@@ -370,6 +370,7 @@ void avcodec_register_all(void)
|
|||||||
REGISTER_ENCDEC (XSUB, xsub);
|
REGISTER_ENCDEC (XSUB, xsub);
|
||||||
|
|
||||||
/* external libraries */
|
/* external libraries */
|
||||||
|
REGISTER_ENCODER (LIBAACPLUS, libaacplus);
|
||||||
REGISTER_DECODER (LIBCELT, libcelt);
|
REGISTER_DECODER (LIBCELT, libcelt);
|
||||||
REGISTER_ENCDEC (LIBDIRAC, libdirac);
|
REGISTER_ENCDEC (LIBDIRAC, libdirac);
|
||||||
REGISTER_ENCODER (LIBFAAC, libfaac);
|
REGISTER_ENCODER (LIBFAAC, libfaac);
|
||||||
@@ -380,7 +381,7 @@ void avcodec_register_all(void)
|
|||||||
REGISTER_DECODER (LIBOPENCORE_AMRWB, libopencore_amrwb);
|
REGISTER_DECODER (LIBOPENCORE_AMRWB, libopencore_amrwb);
|
||||||
REGISTER_DECODER (LIBOPENJPEG, libopenjpeg);
|
REGISTER_DECODER (LIBOPENJPEG, libopenjpeg);
|
||||||
REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger);
|
REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger);
|
||||||
REGISTER_DECODER (LIBSPEEX, libspeex);
|
REGISTER_ENCDEC (LIBSPEEX, libspeex);
|
||||||
REGISTER_ENCODER (LIBTHEORA, libtheora);
|
REGISTER_ENCODER (LIBTHEORA, libtheora);
|
||||||
REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc);
|
REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc);
|
||||||
REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc);
|
REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc);
|
||||||
|
@@ -204,7 +204,7 @@ static enum Mode unpack_bitstream(AMRContext *p, const uint8_t *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_lpc_decoding AMR pitch LPC coefficient decoding functions
|
/// @name AMR pitch LPC coefficient decoding functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -341,7 +341,7 @@ static void lsf2lsp_3(AMRContext *p)
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_pitch_vector_decoding AMR pitch vector decoding functions
|
/// @name AMR pitch vector decoding functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -403,7 +403,7 @@ static void decode_pitch_vector(AMRContext *p,
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_algebraic_code_book AMR algebraic code book (fixed) vector decoding functions
|
/// @name AMR algebraic code book (fixed) vector decoding functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -547,7 +547,7 @@ static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_gain_decoding AMR gain decoding functions
|
/// @name AMR gain decoding functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -633,7 +633,7 @@ static void decode_gains(AMRContext *p, const AMRNBSubframe *amr_subframe,
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_pre_processing AMR pre-processing functions
|
/// @name AMR preprocessing functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -751,7 +751,7 @@ static const float *anti_sparseness(AMRContext *p, AMRFixed *fixed_sparse,
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_synthesis AMR synthesis functions
|
/// @name AMR synthesis functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -812,7 +812,7 @@ static int synthesis(AMRContext *p, float *lpc,
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_update AMR update functions
|
/// @name AMR update functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -837,7 +837,7 @@ static void update_state(AMRContext *p)
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// @defgroup amr_postproc AMR Post processing functions
|
/// @name AMR Postprocessing functions
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -79,6 +79,8 @@ static inline int op(uint8_t **dst, const uint8_t *dst_end,
|
|||||||
int striplen = FFMIN(count, remaining);
|
int striplen = FFMIN(count, remaining);
|
||||||
if (buf) {
|
if (buf) {
|
||||||
striplen = FFMIN(striplen, buf_end - *buf);
|
striplen = FFMIN(striplen, buf_end - *buf);
|
||||||
|
if (*buf >= buf_end)
|
||||||
|
goto exhausted;
|
||||||
memcpy(*dst, *buf, striplen);
|
memcpy(*dst, *buf, striplen);
|
||||||
*buf += striplen;
|
*buf += striplen;
|
||||||
} else if (pixel >= 0)
|
} else if (pixel >= 0)
|
||||||
|
@@ -217,7 +217,7 @@ static av_cold int ape_decode_close(AVCodecContext * avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup rangecoder APE range decoder
|
* @name APE range decoding functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
vhsub.s16 \r0, \d0, \d1 @ t3, t4, t8, t7
|
vhsub.s16 \r0, \d0, \d1 @ t3, t4, t8, t7
|
||||||
vhsub.s16 \r1, \d1, \d0
|
vhsub.s16 \r1, \d1, \d0
|
||||||
vhadd.s16 \d0, \d0, \d1 @ t1, t2, t6, t5
|
vhadd.s16 \d0, \d0, \d1 @ t1, t2, t6, t5
|
||||||
vmov.i64 \d1, #0xffff<<32
|
vmov.i64 \d1, #0xffff00000000
|
||||||
vbit \r0, \r1, \d1
|
vbit \r0, \r1, \d1
|
||||||
vrev64.16 \r1, \r0 @ t7, t8, t4, t3
|
vrev64.16 \r1, \r0 @ t7, t8, t4, t3
|
||||||
vtrn.32 \r0, \r1 @ t3, t4, t7, t8
|
vtrn.32 \r0, \r1 @ t3, t4, t7, t8
|
||||||
|
@@ -25,8 +25,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default values for ASS style.
|
* @name Default values for ASS style
|
||||||
* @defgroup ass_default
|
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define ASS_DEFAULT_FONT "Arial"
|
#define ASS_DEFAULT_FONT "Arial"
|
||||||
|
@@ -33,6 +33,12 @@
|
|||||||
|
|
||||||
#include "libavcodec/version.h"
|
#include "libavcodec/version.h"
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
# define FF_INTERNALC_MEM_TYPE unsigned int
|
||||||
|
#else
|
||||||
|
# define FF_INTERNALC_MEM_TYPE size_t
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identify the syntax and semantics of the bitstream.
|
* Identify the syntax and semantics of the bitstream.
|
||||||
* The principle is roughly:
|
* The principle is roughly:
|
||||||
@@ -111,6 +117,9 @@ enum CodecID {
|
|||||||
CODEC_ID_QDRAW,
|
CODEC_ID_QDRAW,
|
||||||
CODEC_ID_VIXL,
|
CODEC_ID_VIXL,
|
||||||
CODEC_ID_QPEG,
|
CODEC_ID_QPEG,
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
CODEC_ID_XVID,
|
||||||
|
#endif
|
||||||
CODEC_ID_PNG,
|
CODEC_ID_PNG,
|
||||||
CODEC_ID_PPM,
|
CODEC_ID_PPM,
|
||||||
CODEC_ID_PBM,
|
CODEC_ID_PBM,
|
||||||
@@ -359,6 +368,18 @@ enum CodecID {
|
|||||||
CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information.
|
CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
#define CodecType AVMediaType
|
||||||
|
|
||||||
|
#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
|
||||||
|
#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
|
||||||
|
#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
|
||||||
|
#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
|
||||||
|
#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
|
||||||
|
#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
|
||||||
|
#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
|
||||||
|
#endif
|
||||||
|
|
||||||
#if FF_API_OLD_SAMPLE_FMT
|
#if FF_API_OLD_SAMPLE_FMT
|
||||||
#define SampleFormat AVSampleFormat
|
#define SampleFormat AVSampleFormat
|
||||||
|
|
||||||
@@ -1070,10 +1091,6 @@ typedef struct AVPanScan{
|
|||||||
#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
|
#define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
|
||||||
#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
|
#define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
|
||||||
|
|
||||||
enum AVPacketSideDataType {
|
|
||||||
AV_PKT_DATA_PALETTE,
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct AVPacket {
|
typedef struct AVPacket {
|
||||||
/**
|
/**
|
||||||
* Presentation timestamp in AVStream->time_base units; the time at which
|
* Presentation timestamp in AVStream->time_base units; the time at which
|
||||||
@@ -1095,17 +1112,6 @@ typedef struct AVPacket {
|
|||||||
int size;
|
int size;
|
||||||
int stream_index;
|
int stream_index;
|
||||||
int flags;
|
int flags;
|
||||||
/**
|
|
||||||
* Additional packet data that can be provided by the container.
|
|
||||||
* Packet can contain several types of side information.
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
uint8_t *data;
|
|
||||||
int size;
|
|
||||||
enum AVPacketSideDataType type;
|
|
||||||
} *side_data;
|
|
||||||
int side_data_elems;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duration of this packet in AVStream->time_base units, 0 if unknown.
|
* Duration of this packet in AVStream->time_base units, 0 if unknown.
|
||||||
* Equals next_pts - this_pts in presentation order.
|
* Equals next_pts - this_pts in presentation order.
|
||||||
@@ -1135,6 +1141,9 @@ typedef struct AVPacket {
|
|||||||
int64_t convergence_duration;
|
int64_t convergence_duration;
|
||||||
} AVPacket;
|
} AVPacket;
|
||||||
#define AV_PKT_FLAG_KEY 0x0001
|
#define AV_PKT_FLAG_KEY 0x0001
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Audio Video Frame.
|
* Audio Video Frame.
|
||||||
@@ -1255,6 +1264,16 @@ typedef struct AVCodecContext {
|
|||||||
*/
|
*/
|
||||||
enum PixelFormat pix_fmt;
|
enum PixelFormat pix_fmt;
|
||||||
|
|
||||||
|
#if FF_API_RATE_EMU
|
||||||
|
/**
|
||||||
|
* Frame rate emulation. If not zero, the lower layer (i.e. format handler)
|
||||||
|
* has to read frames at native frame rate.
|
||||||
|
* - encoding: Set by user.
|
||||||
|
* - decoding: unused
|
||||||
|
*/
|
||||||
|
attribute_deprecated int rate_emu;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If non NULL, 'draw_horiz_band' is called by the libavcodec
|
* If non NULL, 'draw_horiz_band' is called by the libavcodec
|
||||||
* decoder to draw a horizontal band. It improves cache usage. Not
|
* decoder to draw a horizontal band. It improves cache usage. Not
|
||||||
@@ -1299,6 +1318,9 @@ typedef struct AVCodecContext {
|
|||||||
*/
|
*/
|
||||||
int frame_size;
|
int frame_size;
|
||||||
int frame_number; ///< audio or video frame number
|
int frame_number; ///< audio or video frame number
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
int real_pict_num; ///< Returns the real picture number of previous encoded frame.
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of frames the decoded output will be delayed relative to
|
* Number of frames the decoded output will be delayed relative to
|
||||||
@@ -1356,6 +1378,16 @@ typedef struct AVCodecContext {
|
|||||||
|
|
||||||
int b_frame_strategy;
|
int b_frame_strategy;
|
||||||
|
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/**
|
||||||
|
* hurry up amount
|
||||||
|
* - encoding: unused
|
||||||
|
* - decoding: Set by user. 1-> Skip B-frames, 2-> Skip IDCT/dequant too, 5-> Skip everything except header
|
||||||
|
* @deprecated Deprecated in favor of skip_idct and skip_frame.
|
||||||
|
*/
|
||||||
|
attribute_deprecated int hurry_up;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct AVCodec *codec;
|
struct AVCodec *codec;
|
||||||
|
|
||||||
void *priv_data;
|
void *priv_data;
|
||||||
@@ -1473,6 +1505,9 @@ typedef struct AVCodecContext {
|
|||||||
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
|
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
|
||||||
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
|
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
|
||||||
#define FF_COMPLIANCE_NORMAL 0
|
#define FF_COMPLIANCE_NORMAL 0
|
||||||
|
#if FF_API_INOFFICIAL
|
||||||
|
#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions (deprecated - use FF_COMPLIANCE_UNOFFICIAL instead).
|
||||||
|
#endif
|
||||||
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
|
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
|
||||||
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
|
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
|
||||||
|
|
||||||
@@ -1746,6 +1781,25 @@ typedef struct AVCodecContext {
|
|||||||
*/
|
*/
|
||||||
unsigned dsp_mask;
|
unsigned dsp_mask;
|
||||||
|
|
||||||
|
#if FF_API_MM_FLAGS
|
||||||
|
#define FF_MM_FORCE AV_CPU_FLAG_FORCE
|
||||||
|
#define FF_MM_MMX AV_CPU_FLAG_MMX
|
||||||
|
#define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
|
||||||
|
#define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
|
||||||
|
#define FF_MM_MMX2 AV_CPU_FLAG_MMX2
|
||||||
|
#define FF_MM_SSE AV_CPU_FLAG_SSE
|
||||||
|
#define FF_MM_SSE2 AV_CPU_FLAG_SSE2
|
||||||
|
#define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
|
||||||
|
#define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
|
||||||
|
#define FF_MM_SSE3 AV_CPU_FLAG_SSE3
|
||||||
|
#define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
|
||||||
|
#define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
|
||||||
|
#define FF_MM_SSE4 AV_CPU_FLAG_SSE4
|
||||||
|
#define FF_MM_SSE42 AV_CPU_FLAG_SSE42
|
||||||
|
#define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
|
||||||
|
#define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bits per sample/pixel from the demuxer (needed for huffyuv).
|
* bits per sample/pixel from the demuxer (needed for huffyuv).
|
||||||
* - encoding: Set by libavcodec.
|
* - encoding: Set by libavcodec.
|
||||||
@@ -1820,6 +1874,22 @@ typedef struct AVCodecContext {
|
|||||||
*/
|
*/
|
||||||
uint64_t error[4];
|
uint64_t error[4];
|
||||||
|
|
||||||
|
#if FF_API_MB_Q
|
||||||
|
/**
|
||||||
|
* minimum MB quantizer
|
||||||
|
* - encoding: unused
|
||||||
|
* - decoding: unused
|
||||||
|
*/
|
||||||
|
attribute_deprecated int mb_qmin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* maximum MB quantizer
|
||||||
|
* - encoding: unused
|
||||||
|
* - decoding: unused
|
||||||
|
*/
|
||||||
|
attribute_deprecated int mb_qmax;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* motion estimation comparison function
|
* motion estimation comparison function
|
||||||
* - encoding: Set by user.
|
* - encoding: Set by user.
|
||||||
@@ -2521,6 +2591,23 @@ typedef struct AVCodecContext {
|
|||||||
int compression_level;
|
int compression_level;
|
||||||
#define FF_COMPRESSION_DEFAULT -1
|
#define FF_COMPRESSION_DEFAULT -1
|
||||||
|
|
||||||
|
#if FF_API_USE_LPC
|
||||||
|
/**
|
||||||
|
* Sets whether to use LPC mode - used by FLAC encoder.
|
||||||
|
* - encoding: Set by user.
|
||||||
|
* - decoding: unused
|
||||||
|
* @deprecated Deprecated in favor of lpc_type and lpc_passes.
|
||||||
|
*/
|
||||||
|
int use_lpc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LPC coefficient precision - used by FLAC encoder
|
||||||
|
* - encoding: Set by user.
|
||||||
|
* - decoding: unused
|
||||||
|
*/
|
||||||
|
int lpc_coeff_precision;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* - encoding: Set by user.
|
* - encoding: Set by user.
|
||||||
* - decoding: unused
|
* - decoding: unused
|
||||||
@@ -2535,18 +2622,11 @@ typedef struct AVCodecContext {
|
|||||||
|
|
||||||
#if FF_API_FLAC_GLOBAL_OPTS
|
#if FF_API_FLAC_GLOBAL_OPTS
|
||||||
/**
|
/**
|
||||||
* @defgroup flac_opts FLAC options
|
* @name FLAC options
|
||||||
* @deprecated Use FLAC encoder private options instead.
|
* @deprecated Use FLAC encoder private options instead.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* LPC coefficient precision - used by FLAC encoder
|
|
||||||
* - encoding: Set by user.
|
|
||||||
* - decoding: unused
|
|
||||||
*/
|
|
||||||
attribute_deprecated int lpc_coeff_precision;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* search method for selecting prediction order
|
* search method for selecting prediction order
|
||||||
* - encoding: Set by user.
|
* - encoding: Set by user.
|
||||||
@@ -2606,7 +2686,6 @@ typedef struct AVCodecContext {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bits per sample/pixel of internal libavcodec pixel/sample format.
|
* Bits per sample/pixel of internal libavcodec pixel/sample format.
|
||||||
* This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32.
|
|
||||||
* - encoding: set by user.
|
* - encoding: set by user.
|
||||||
* - decoding: set by libavcodec.
|
* - decoding: set by libavcodec.
|
||||||
*/
|
*/
|
||||||
@@ -2957,7 +3036,7 @@ typedef struct AVCodec {
|
|||||||
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
|
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup framethreading Frame-level threading support functions.
|
* @name Frame-level threading support functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
@@ -3211,33 +3290,6 @@ int av_dup_packet(AVPacket *pkt);
|
|||||||
*/
|
*/
|
||||||
void av_free_packet(AVPacket *pkt);
|
void av_free_packet(AVPacket *pkt);
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocate new information of a packet.
|
|
||||||
*
|
|
||||||
* @param pkt packet
|
|
||||||
* @param type side information type
|
|
||||||
* @param size side information size
|
|
||||||
* @return pointer to fresh allocated data or NULL otherwise
|
|
||||||
*/
|
|
||||||
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
|
||||||
int size);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get side information from packet.
|
|
||||||
*
|
|
||||||
* @param pkt packet
|
|
||||||
* @param type desired side information type
|
|
||||||
* @param size pointer for side information size to store (optional)
|
|
||||||
* @return pointer to data if present or NULL otherwise
|
|
||||||
*/
|
|
||||||
uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
|
||||||
int *size);
|
|
||||||
|
|
||||||
int av_packet_merge_side_data(AVPacket *pkt);
|
|
||||||
|
|
||||||
int av_packet_split_side_data(AVPacket *pkt);
|
|
||||||
|
|
||||||
|
|
||||||
/* resample.c */
|
/* resample.c */
|
||||||
|
|
||||||
struct ReSampleContext;
|
struct ReSampleContext;
|
||||||
@@ -3245,6 +3297,14 @@ struct AVResampleContext;
|
|||||||
|
|
||||||
typedef struct ReSampleContext ReSampleContext;
|
typedef struct ReSampleContext ReSampleContext;
|
||||||
|
|
||||||
|
#if FF_API_AUDIO_OLD
|
||||||
|
/**
|
||||||
|
* @deprecated Use av_audio_resample_init() instead.
|
||||||
|
*/
|
||||||
|
attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
|
||||||
|
int output_rate, int input_rate);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize audio resampling context.
|
* Initialize audio resampling context.
|
||||||
*
|
*
|
||||||
@@ -3408,6 +3468,23 @@ const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
|
|||||||
|
|
||||||
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
|
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* Return the pixel format corresponding to the name name.
|
||||||
|
*
|
||||||
|
* If there is no pixel format with name name, then look for a
|
||||||
|
* pixel format with the name corresponding to the native endian
|
||||||
|
* format of name.
|
||||||
|
* For example in a little-endian system, first look for "gray16",
|
||||||
|
* then for "gray16le".
|
||||||
|
*
|
||||||
|
* Finally if no pixel format has been found, return PIX_FMT_NONE.
|
||||||
|
*
|
||||||
|
* @deprecated Deprecated in favor of av_get_pix_fmt().
|
||||||
|
*/
|
||||||
|
attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a value representing the fourCC code associated to the
|
* Return a value representing the fourCC code associated to the
|
||||||
* pixel format pix_fmt, or 0 if no associated fourCC code can be
|
* pixel format pix_fmt, or 0 if no associated fourCC code can be
|
||||||
@@ -3476,6 +3553,14 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
|
|||||||
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
|
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
|
||||||
int has_alpha, int *loss_ptr);
|
int has_alpha, int *loss_ptr);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* @deprecated Use av_get_pix_fmt_string() instead.
|
||||||
|
*/
|
||||||
|
attribute_deprecated
|
||||||
|
void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
|
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
|
||||||
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
|
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
|
||||||
|
|
||||||
@@ -3526,6 +3611,13 @@ const char *avcodec_license(void);
|
|||||||
*/
|
*/
|
||||||
void avcodec_init(void);
|
void avcodec_init(void);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* @deprecated Deprecated in favor of avcodec_register().
|
||||||
|
*/
|
||||||
|
attribute_deprecated void register_avcodec(AVCodec *codec);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the codec codec and initialize libavcodec.
|
* Register the codec codec and initialize libavcodec.
|
||||||
*
|
*
|
||||||
@@ -3670,6 +3762,14 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
|
|||||||
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||||
int linesize_align[4]);
|
int linesize_align[4]);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* @deprecated Deprecated in favor of av_check_image_size().
|
||||||
|
*/
|
||||||
|
attribute_deprecated
|
||||||
|
int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
|
||||||
|
#endif
|
||||||
|
|
||||||
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
|
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
|
||||||
|
|
||||||
#if FF_API_THREAD_INIT
|
#if FF_API_THREAD_INIT
|
||||||
@@ -3678,8 +3778,8 @@ enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum
|
|||||||
*/
|
*/
|
||||||
attribute_deprecated
|
attribute_deprecated
|
||||||
int avcodec_thread_init(AVCodecContext *s, int thread_count);
|
int avcodec_thread_init(AVCodecContext *s, int thread_count);
|
||||||
|
void avcodec_thread_free(AVCodecContext *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
|
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
|
||||||
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
|
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
|
||||||
//FIXME func typedef
|
//FIXME func typedef
|
||||||
@@ -3713,6 +3813,25 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
|
|||||||
*/
|
*/
|
||||||
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
|
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
|
||||||
|
|
||||||
|
#if FF_API_AUDIO_OLD
|
||||||
|
/**
|
||||||
|
* Decode an audio frame from buf into samples.
|
||||||
|
* Wrapper function which calls avcodec_decode_audio3.
|
||||||
|
*
|
||||||
|
* @deprecated Use avcodec_decode_audio3 instead.
|
||||||
|
* @param avctx the codec context
|
||||||
|
* @param[out] samples the output buffer
|
||||||
|
* @param[in,out] frame_size_ptr the output buffer size in bytes
|
||||||
|
* @param[in] buf the input buffer
|
||||||
|
* @param[in] buf_size the input buffer size in bytes
|
||||||
|
* @return On error a negative value is returned, otherwise the number of bytes
|
||||||
|
* used or zero if no frame could be decompressed.
|
||||||
|
*/
|
||||||
|
attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
|
||||||
|
int *frame_size_ptr,
|
||||||
|
const uint8_t *buf, int buf_size);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode the audio frame of size avpkt->size from avpkt->data into samples.
|
* Decode the audio frame of size avpkt->size from avpkt->data into samples.
|
||||||
* Some decoders may support multiple frames in a single AVPacket, such
|
* Some decoders may support multiple frames in a single AVPacket, such
|
||||||
@@ -3756,6 +3875,25 @@ int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
|
|||||||
int *frame_size_ptr,
|
int *frame_size_ptr,
|
||||||
AVPacket *avpkt);
|
AVPacket *avpkt);
|
||||||
|
|
||||||
|
#if FF_API_VIDEO_OLD
|
||||||
|
/**
|
||||||
|
* Decode a video frame from buf into picture.
|
||||||
|
* Wrapper function which calls avcodec_decode_video2.
|
||||||
|
*
|
||||||
|
* @deprecated Use avcodec_decode_video2 instead.
|
||||||
|
* @param avctx the codec context
|
||||||
|
* @param[out] picture The AVFrame in which the decoded video frame will be stored.
|
||||||
|
* @param[in] buf the input buffer
|
||||||
|
* @param[in] buf_size the size of the input buffer in bytes
|
||||||
|
* @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
|
||||||
|
* @return On error a negative value is returned, otherwise the number of bytes
|
||||||
|
* used or zero if no frame could be decompressed.
|
||||||
|
*/
|
||||||
|
attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
|
||||||
|
int *got_picture_ptr,
|
||||||
|
const uint8_t *buf, int buf_size);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode the video frame of size avpkt->size from avpkt->data into picture.
|
* Decode the video frame of size avpkt->size from avpkt->data into picture.
|
||||||
* Some decoders may support multiple frames in a single AVPacket, such
|
* Some decoders may support multiple frames in a single AVPacket, such
|
||||||
@@ -3800,6 +3938,15 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
|
|||||||
int *got_picture_ptr,
|
int *got_picture_ptr,
|
||||||
AVPacket *avpkt);
|
AVPacket *avpkt);
|
||||||
|
|
||||||
|
#if FF_API_SUBTITLE_OLD
|
||||||
|
/* Decode a subtitle message. Return -1 if error, otherwise return the
|
||||||
|
* number of bytes used. If no subtitle could be decompressed,
|
||||||
|
* got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
|
||||||
|
attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
|
||||||
|
int *got_sub_ptr,
|
||||||
|
const uint8_t *buf, int buf_size);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode a subtitle message.
|
* Decode a subtitle message.
|
||||||
* Return a negative value on error, otherwise return the number of bytes used.
|
* Return a negative value on error, otherwise return the number of bytes used.
|
||||||
@@ -3915,7 +4062,7 @@ int av_get_bits_per_sample(enum CodecID codec_id);
|
|||||||
|
|
||||||
#if FF_API_OLD_SAMPLE_FMT
|
#if FF_API_OLD_SAMPLE_FMT
|
||||||
/**
|
/**
|
||||||
* @deprecated Use av_get_bits_per_sample_fmt() instead.
|
* @deprecated Use av_get_bytes_per_sample() instead.
|
||||||
*/
|
*/
|
||||||
attribute_deprecated
|
attribute_deprecated
|
||||||
int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
|
int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
|
||||||
@@ -4068,6 +4215,15 @@ AVCodecParser *av_parser_next(AVCodecParser *c);
|
|||||||
void av_register_codec_parser(AVCodecParser *parser);
|
void av_register_codec_parser(AVCodecParser *parser);
|
||||||
AVCodecParserContext *av_parser_init(int codec_id);
|
AVCodecParserContext *av_parser_init(int codec_id);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
attribute_deprecated
|
||||||
|
int av_parser_parse(AVCodecParserContext *s,
|
||||||
|
AVCodecContext *avctx,
|
||||||
|
uint8_t **poutbuf, int *poutbuf_size,
|
||||||
|
const uint8_t *buf, int buf_size,
|
||||||
|
int64_t pts, int64_t dts);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a packet.
|
* Parse a packet.
|
||||||
*
|
*
|
||||||
@@ -4146,7 +4302,7 @@ AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
|
|||||||
*
|
*
|
||||||
* @see av_realloc
|
* @see av_realloc
|
||||||
*/
|
*/
|
||||||
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
|
void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocate a buffer, reusing the given one if large enough.
|
* Allocate a buffer, reusing the given one if large enough.
|
||||||
@@ -4160,7 +4316,17 @@ void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
|
|||||||
* @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and
|
* @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and
|
||||||
* *size 0 if an error occurred.
|
* *size 0 if an error occurred.
|
||||||
*/
|
*/
|
||||||
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
|
void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* @deprecated Deprecated in favor of av_image_copy().
|
||||||
|
*/
|
||||||
|
attribute_deprecated
|
||||||
|
void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
|
||||||
|
uint8_t *src_data[4], int src_linesize[4],
|
||||||
|
enum PixelFormat pix_fmt, int width, int height);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy image src to dst. Wraps av_picture_data_copy() above.
|
* Copy image src to dst. Wraps av_picture_data_copy() above.
|
||||||
@@ -4189,6 +4355,22 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
|
|||||||
*/
|
*/
|
||||||
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
|
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* Parse str and put in width_ptr and height_ptr the detected values.
|
||||||
|
*
|
||||||
|
* @deprecated Deprecated in favor of av_parse_video_size().
|
||||||
|
*/
|
||||||
|
attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse str and store the detected values in *frame_rate.
|
||||||
|
*
|
||||||
|
* @deprecated Deprecated in favor of av_parse_video_rate().
|
||||||
|
*/
|
||||||
|
attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a generic warning message about a missing feature. This function is
|
* Logs a generic warning message about a missing feature. This function is
|
||||||
* intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
|
* intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
|
||||||
|
@@ -26,21 +26,12 @@
|
|||||||
void av_destruct_packet_nofree(AVPacket *pkt)
|
void av_destruct_packet_nofree(AVPacket *pkt)
|
||||||
{
|
{
|
||||||
pkt->data = NULL; pkt->size = 0;
|
pkt->data = NULL; pkt->size = 0;
|
||||||
pkt->side_data = NULL;
|
|
||||||
pkt->side_data_elems = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void av_destruct_packet(AVPacket *pkt)
|
void av_destruct_packet(AVPacket *pkt)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
av_free(pkt->data);
|
av_free(pkt->data);
|
||||||
pkt->data = NULL; pkt->size = 0;
|
pkt->data = NULL; pkt->size = 0;
|
||||||
|
|
||||||
for (i = 0; i < pkt->side_data_elems; i++)
|
|
||||||
av_free(pkt->side_data[i].data);
|
|
||||||
av_freep(&pkt->side_data);
|
|
||||||
pkt->side_data_elems = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void av_init_packet(AVPacket *pkt)
|
void av_init_packet(AVPacket *pkt)
|
||||||
@@ -53,8 +44,6 @@ void av_init_packet(AVPacket *pkt)
|
|||||||
pkt->flags = 0;
|
pkt->flags = 0;
|
||||||
pkt->stream_index = 0;
|
pkt->stream_index = 0;
|
||||||
pkt->destruct= NULL;
|
pkt->destruct= NULL;
|
||||||
pkt->side_data = NULL;
|
|
||||||
pkt->side_data_elems = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int av_new_packet(AVPacket *pkt, int size)
|
int av_new_packet(AVPacket *pkt, int size)
|
||||||
@@ -100,52 +89,23 @@ int av_grow_packet(AVPacket *pkt, int grow_by)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DUP_DATA(dst, src, size, padding) \
|
|
||||||
do { \
|
|
||||||
void *data; \
|
|
||||||
if (padding) { \
|
|
||||||
if ((unsigned)(size) > (unsigned)(size) + FF_INPUT_BUFFER_PADDING_SIZE) \
|
|
||||||
goto failed_alloc; \
|
|
||||||
data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); \
|
|
||||||
} else { \
|
|
||||||
data = av_malloc(size); \
|
|
||||||
} \
|
|
||||||
if (!data) \
|
|
||||||
goto failed_alloc; \
|
|
||||||
memcpy(data, src, size); \
|
|
||||||
if (padding) \
|
|
||||||
memset((uint8_t*)data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE); \
|
|
||||||
dst = data; \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
int av_dup_packet(AVPacket *pkt)
|
int av_dup_packet(AVPacket *pkt)
|
||||||
{
|
{
|
||||||
AVPacket tmp_pkt;
|
|
||||||
|
|
||||||
if (((pkt->destruct == av_destruct_packet_nofree) || (pkt->destruct == NULL)) && pkt->data) {
|
if (((pkt->destruct == av_destruct_packet_nofree) || (pkt->destruct == NULL)) && pkt->data) {
|
||||||
tmp_pkt = *pkt;
|
uint8_t *data;
|
||||||
|
/* We duplicate the packet and don't forget to add the padding again. */
|
||||||
pkt->data = NULL;
|
if((unsigned)pkt->size > (unsigned)pkt->size + FF_INPUT_BUFFER_PADDING_SIZE)
|
||||||
pkt->side_data = NULL;
|
return AVERROR(ENOMEM);
|
||||||
DUP_DATA(pkt->data, tmp_pkt.data, pkt->size, 1);
|
data = av_malloc(pkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
pkt->destruct = av_destruct_packet;
|
if (!data) {
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
if (pkt->side_data_elems) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
DUP_DATA(pkt->side_data, tmp_pkt.side_data,
|
|
||||||
pkt->side_data_elems * sizeof(*pkt->side_data), 0);
|
|
||||||
memset(pkt->side_data, 0, pkt->side_data_elems * sizeof(*pkt->side_data));
|
|
||||||
for (i = 0; i < pkt->side_data_elems; i++) {
|
|
||||||
DUP_DATA(pkt->side_data[i].data, tmp_pkt.side_data[i].data,
|
|
||||||
pkt->side_data[i].size, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
memcpy(data, pkt->data, pkt->size);
|
||||||
|
memset(data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
pkt->data = data;
|
||||||
|
pkt->destruct = av_destruct_packet;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
failed_alloc:
|
|
||||||
av_destruct_packet(pkt);
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void av_free_packet(AVPacket *pkt)
|
void av_free_packet(AVPacket *pkt)
|
||||||
@@ -153,125 +113,6 @@ void av_free_packet(AVPacket *pkt)
|
|||||||
if (pkt) {
|
if (pkt) {
|
||||||
if (pkt->destruct) pkt->destruct(pkt);
|
if (pkt->destruct) pkt->destruct(pkt);
|
||||||
pkt->data = NULL; pkt->size = 0;
|
pkt->data = NULL; pkt->size = 0;
|
||||||
pkt->side_data = NULL;
|
|
||||||
pkt->side_data_elems = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
|
||||||
int size)
|
|
||||||
{
|
|
||||||
int elems = pkt->side_data_elems;
|
|
||||||
|
|
||||||
if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data))
|
|
||||||
return NULL;
|
|
||||||
if ((unsigned)size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
pkt->side_data = av_realloc(pkt->side_data, (elems + 1) * sizeof(*pkt->side_data));
|
|
||||||
if (!pkt->side_data)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
pkt->side_data[elems].data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
if (!pkt->side_data[elems].data)
|
|
||||||
return NULL;
|
|
||||||
pkt->side_data[elems].size = size;
|
|
||||||
pkt->side_data[elems].type = type;
|
|
||||||
pkt->side_data_elems++;
|
|
||||||
|
|
||||||
return pkt->side_data[elems].data;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
|
||||||
int *size)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < pkt->side_data_elems; i++) {
|
|
||||||
if (pkt->side_data[i].type == type) {
|
|
||||||
if (size)
|
|
||||||
*size = pkt->side_data[i].size;
|
|
||||||
return pkt->side_data[i].data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL
|
|
||||||
|
|
||||||
int av_packet_merge_side_data(AVPacket *pkt){
|
|
||||||
if(pkt->side_data_elems){
|
|
||||||
int i;
|
|
||||||
uint8_t *p;
|
|
||||||
uint64_t size= pkt->size + 8LL + FF_INPUT_BUFFER_PADDING_SIZE;
|
|
||||||
AVPacket old= *pkt;
|
|
||||||
for (i=0; i<old.side_data_elems; i++) {
|
|
||||||
size += old.side_data[i].size + 5LL;
|
|
||||||
}
|
|
||||||
if (size > INT_MAX)
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
p = av_malloc(size);
|
|
||||||
if (!p)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
pkt->data = p;
|
|
||||||
pkt->destruct = av_destruct_packet;
|
|
||||||
pkt->size = size - FF_INPUT_BUFFER_PADDING_SIZE;
|
|
||||||
bytestream_put_buffer(&p, old.data, old.size);
|
|
||||||
for (i=old.side_data_elems-1; i>=0; i--) {
|
|
||||||
bytestream_put_buffer(&p, old.side_data[i].data, old.side_data[i].size);
|
|
||||||
bytestream_put_be32(&p, old.side_data[i].size);
|
|
||||||
*p++ = old.side_data[i].type | ((i==old.side_data_elems-1)*128);
|
|
||||||
}
|
|
||||||
bytestream_put_be64(&p, FF_MERGE_MARKER);
|
|
||||||
av_assert0(p-pkt->data == pkt->size);
|
|
||||||
memset(p, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
av_free_packet(&old);
|
|
||||||
pkt->side_data_elems = 0;
|
|
||||||
pkt->side_data = NULL;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int av_packet_split_side_data(AVPacket *pkt){
|
|
||||||
if (!pkt->side_data_elems && pkt->size >12 && AV_RB64(pkt->data + pkt->size - 8) == FF_MERGE_MARKER){
|
|
||||||
int i;
|
|
||||||
unsigned int size;
|
|
||||||
uint8_t *p= pkt->data + pkt->size - 8 - 5;
|
|
||||||
|
|
||||||
av_dup_packet(pkt);
|
|
||||||
|
|
||||||
for (i=1; ; i++){
|
|
||||||
size = AV_RB32(p);
|
|
||||||
if (size>INT_MAX || p - pkt->data <= size)
|
|
||||||
return 0;
|
|
||||||
if (p[4]&128)
|
|
||||||
break;
|
|
||||||
p-= size+5;
|
|
||||||
}
|
|
||||||
|
|
||||||
pkt->side_data = av_malloc(i * sizeof(*pkt->side_data));
|
|
||||||
if (!pkt->side_data)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
|
|
||||||
p= pkt->data + pkt->size - 8 - 5;
|
|
||||||
for (i=0; ; i++){
|
|
||||||
size= AV_RB32(p);
|
|
||||||
av_assert0(size<=INT_MAX && p - pkt->data > size);
|
|
||||||
pkt->side_data[i].data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
pkt->side_data[i].size = size;
|
|
||||||
pkt->side_data[i].type = p[4]&127;
|
|
||||||
if (!pkt->side_data[i].data)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
memcpy(pkt->side_data[i].data, p-size, size);
|
|
||||||
pkt->size -= size + 5;
|
|
||||||
if(p[4]&128)
|
|
||||||
break;
|
|
||||||
p-= size+5;
|
|
||||||
}
|
|
||||||
pkt->size -= 8;
|
|
||||||
pkt->side_data_elems = i+1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
@@ -47,6 +47,7 @@ avs_decode_frame(AVCodecContext * avctx,
|
|||||||
void *data, int *data_size, AVPacket *avpkt)
|
void *data, int *data_size, AVPacket *avpkt)
|
||||||
{
|
{
|
||||||
const uint8_t *buf = avpkt->data;
|
const uint8_t *buf = avpkt->data;
|
||||||
|
const uint8_t *buf_end = avpkt->data + avpkt->size;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
AvsContext *const avs = avctx->priv_data;
|
AvsContext *const avs = avctx->priv_data;
|
||||||
AVFrame *picture = data;
|
AVFrame *picture = data;
|
||||||
@@ -69,6 +70,8 @@ avs_decode_frame(AVCodecContext * avctx,
|
|||||||
out = avs->picture.data[0];
|
out = avs->picture.data[0];
|
||||||
stride = avs->picture.linesize[0];
|
stride = avs->picture.linesize[0];
|
||||||
|
|
||||||
|
if (buf_end - buf < 4)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
sub_type = buf[0];
|
sub_type = buf[0];
|
||||||
type = buf[1];
|
type = buf[1];
|
||||||
buf += 4;
|
buf += 4;
|
||||||
@@ -79,6 +82,8 @@ avs_decode_frame(AVCodecContext * avctx,
|
|||||||
|
|
||||||
first = AV_RL16(buf);
|
first = AV_RL16(buf);
|
||||||
last = first + AV_RL16(buf + 2);
|
last = first + AV_RL16(buf + 2);
|
||||||
|
if (first >= 256 || last > 256 || buf_end - buf < 4 + 4 + 3 * (last - first))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
buf += 4;
|
buf += 4;
|
||||||
for (i=first; i<last; i++, buf+=3)
|
for (i=first; i<last; i++, buf+=3)
|
||||||
pal[i] = (buf[0] << 18) | (buf[1] << 10) | (buf[2] << 2);
|
pal[i] = (buf[0] << 18) | (buf[1] << 10) | (buf[2] << 2);
|
||||||
@@ -114,16 +119,22 @@ avs_decode_frame(AVCodecContext * avctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buf_end - buf < 256 * vect_w * vect_h)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
table = buf + (256 * vect_w * vect_h);
|
table = buf + (256 * vect_w * vect_h);
|
||||||
if (sub_type != AVS_I_FRAME) {
|
if (sub_type != AVS_I_FRAME) {
|
||||||
int map_size = ((318 / vect_w + 7) / 8) * (198 / vect_h);
|
int map_size = ((318 / vect_w + 7) / 8) * (198 / vect_h);
|
||||||
init_get_bits(&change_map, table, map_size);
|
if (buf_end - table < map_size)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
init_get_bits(&change_map, table, map_size * 8);
|
||||||
table += map_size;
|
table += map_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (y=0; y<198; y+=vect_h) {
|
for (y=0; y<198; y+=vect_h) {
|
||||||
for (x=0; x<318; x+=vect_w) {
|
for (x=0; x<318; x+=vect_w) {
|
||||||
if (sub_type == AVS_I_FRAME || get_bits1(&change_map)) {
|
if (sub_type == AVS_I_FRAME || get_bits1(&change_map)) {
|
||||||
|
if (buf_end - table < 1)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
vect = &buf[*table++ * (vect_w * vect_h)];
|
vect = &buf[*table++ * (vect_w * vect_h)];
|
||||||
for (j=0; j<vect_w; j++) {
|
for (j=0; j<vect_w; j++) {
|
||||||
out[(y + 0) * stride + x + j] = vect[(0 * vect_w) + j];
|
out[(y + 0) * stride + x + j] = vect[(0 * vect_w) + j];
|
||||||
|
@@ -246,7 +246,7 @@ static void read_tree(GetBitContext *gb, Tree *tree)
|
|||||||
tree->syms[i] = get_bits(gb, 4);
|
tree->syms[i] = get_bits(gb, 4);
|
||||||
tmp1[tree->syms[i]] = 1;
|
tmp1[tree->syms[i]] = 1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16 && len < 16 - 1; i++)
|
||||||
if (!tmp1[i])
|
if (!tmp1[i])
|
||||||
tree->syms[++len] = i;
|
tree->syms[++len] = i;
|
||||||
} else {
|
} else {
|
||||||
@@ -343,14 +343,14 @@ static int read_motion_values(AVCodecContext *avctx, GetBitContext *gb, Bundle *
|
|||||||
memset(b->cur_dec, v, t);
|
memset(b->cur_dec, v, t);
|
||||||
b->cur_dec += t;
|
b->cur_dec += t;
|
||||||
} else {
|
} else {
|
||||||
do {
|
while (b->cur_dec < dec_end) {
|
||||||
v = GET_HUFF(gb, b->tree);
|
v = GET_HUFF(gb, b->tree);
|
||||||
if (v) {
|
if (v) {
|
||||||
sign = -get_bits1(gb);
|
sign = -get_bits1(gb);
|
||||||
v = (v ^ sign) - sign;
|
v = (v ^ sign) - sign;
|
||||||
}
|
}
|
||||||
*b->cur_dec++ = v;
|
*b->cur_dec++ = v;
|
||||||
} while (b->cur_dec < dec_end);
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -374,7 +374,7 @@ static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b)
|
|||||||
memset(b->cur_dec, v, t);
|
memset(b->cur_dec, v, t);
|
||||||
b->cur_dec += t;
|
b->cur_dec += t;
|
||||||
} else {
|
} else {
|
||||||
do {
|
while (b->cur_dec < dec_end) {
|
||||||
v = GET_HUFF(gb, b->tree);
|
v = GET_HUFF(gb, b->tree);
|
||||||
if (v < 12) {
|
if (v < 12) {
|
||||||
last = v;
|
last = v;
|
||||||
@@ -382,10 +382,12 @@ static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b)
|
|||||||
} else {
|
} else {
|
||||||
int run = bink_rlelens[v - 12];
|
int run = bink_rlelens[v - 12];
|
||||||
|
|
||||||
|
if (dec_end - b->cur_dec < run)
|
||||||
|
return -1;
|
||||||
memset(b->cur_dec, last, run);
|
memset(b->cur_dec, last, run);
|
||||||
b->cur_dec += run;
|
b->cur_dec += run;
|
||||||
}
|
}
|
||||||
} while (b->cur_dec < dec_end);
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -456,6 +458,7 @@ static int read_dcs(AVCodecContext *avctx, GetBitContext *gb, Bundle *b,
|
|||||||
{
|
{
|
||||||
int i, j, len, len2, bsize, sign, v, v2;
|
int i, j, len, len2, bsize, sign, v, v2;
|
||||||
int16_t *dst = (int16_t*)b->cur_dec;
|
int16_t *dst = (int16_t*)b->cur_dec;
|
||||||
|
int16_t *dst_end =( int16_t*)b->data_end;
|
||||||
|
|
||||||
CHECK_READ_VAL(gb, b, len);
|
CHECK_READ_VAL(gb, b, len);
|
||||||
v = get_bits(gb, start_bits - has_sign);
|
v = get_bits(gb, start_bits - has_sign);
|
||||||
@@ -463,10 +466,14 @@ static int read_dcs(AVCodecContext *avctx, GetBitContext *gb, Bundle *b,
|
|||||||
sign = -get_bits1(gb);
|
sign = -get_bits1(gb);
|
||||||
v = (v ^ sign) - sign;
|
v = (v ^ sign) - sign;
|
||||||
}
|
}
|
||||||
|
if (dst_end - dst < 1)
|
||||||
|
return -1;
|
||||||
*dst++ = v;
|
*dst++ = v;
|
||||||
len--;
|
len--;
|
||||||
for (i = 0; i < len; i += 8) {
|
for (i = 0; i < len; i += 8) {
|
||||||
len2 = FFMIN(len - i, 8);
|
len2 = FFMIN(len - i, 8);
|
||||||
|
if (dst_end - dst < len2)
|
||||||
|
return -1;
|
||||||
bsize = get_bits(gb, 4);
|
bsize = get_bits(gb, 4);
|
||||||
if (bsize) {
|
if (bsize) {
|
||||||
for (j = 0; j < len2; j++) {
|
for (j = 0; j < len2; j++) {
|
||||||
@@ -534,6 +541,8 @@ static int binkb_read_bundle(BinkContext *c, GetBitContext *gb, int bundle_num)
|
|||||||
int i, len;
|
int i, len;
|
||||||
|
|
||||||
CHECK_READ_VAL(gb, b, len);
|
CHECK_READ_VAL(gb, b, len);
|
||||||
|
if (b->data_end - b->cur_dec < len * (1 + (bits > 8)))
|
||||||
|
return -1;
|
||||||
if (bits <= 8) {
|
if (bits <= 8) {
|
||||||
if (!issigned) {
|
if (!issigned) {
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
@@ -571,6 +580,22 @@ static inline int binkb_get_value(BinkContext *c, int bundle_num)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline DCTELEM dequant(DCTELEM in, uint32_t quant, int dc)
|
||||||
|
{
|
||||||
|
/* Note: multiplication is unsigned but we want signed shift
|
||||||
|
* otherwise clipping breaks.
|
||||||
|
* TODO: The official decoder does not use clipping at all
|
||||||
|
* but instead uses the full 32-bit result.
|
||||||
|
* However clipping at least gets rid of the case that a
|
||||||
|
* half-black half-white intra block gets black and white swapped
|
||||||
|
* and should cause at most minor differences (except for DC). */
|
||||||
|
int32_t res = in * quant;
|
||||||
|
res >>= 11;
|
||||||
|
if (!dc)
|
||||||
|
res = av_clip_int16(res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read 8x8 block of DCT coefficients.
|
* Read 8x8 block of DCT coefficients.
|
||||||
*
|
*
|
||||||
@@ -669,10 +694,10 @@ static int read_dct_coeffs(GetBitContext *gb, DCTELEM block[64], const uint8_t *
|
|||||||
|
|
||||||
quant = quant_matrices[quant_idx];
|
quant = quant_matrices[quant_idx];
|
||||||
|
|
||||||
block[0] = (block[0] * quant[0]) >> 11;
|
block[0] = dequant(block[0], quant[0], 1);
|
||||||
for (i = 0; i < coef_count; i++) {
|
for (i = 0; i < coef_count; i++) {
|
||||||
int idx = coef_idx[i];
|
int idx = coef_idx[i];
|
||||||
block[scan[idx]] = (block[scan[idx]] * quant[idx]) >> 11;
|
block[scan[idx]] = dequant(block[scan[idx]], quant[idx], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -948,8 +973,9 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
|
|||||||
for (i = 0; i < BINK_NB_SRC; i++)
|
for (i = 0; i < BINK_NB_SRC; i++)
|
||||||
read_bundle(gb, c, i);
|
read_bundle(gb, c, i);
|
||||||
|
|
||||||
ref_start = c->last.data[plane_idx];
|
ref_start = c->last.data[plane_idx] ? c->last.data[plane_idx]
|
||||||
ref_end = c->last.data[plane_idx]
|
: c->pic.data[plane_idx];
|
||||||
|
ref_end = ref_start
|
||||||
+ (bw - 1 + c->last.linesize[plane_idx] * (bh - 1)) * 8;
|
+ (bw - 1 + c->last.linesize[plane_idx] * (bh - 1)) * 8;
|
||||||
|
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
@@ -978,7 +1004,8 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
|
|||||||
if (by == bh)
|
if (by == bh)
|
||||||
break;
|
break;
|
||||||
dst = c->pic.data[plane_idx] + 8*by*stride;
|
dst = c->pic.data[plane_idx] + 8*by*stride;
|
||||||
prev = c->last.data[plane_idx] + 8*by*stride;
|
prev = (c->last.data[plane_idx] ? c->last.data[plane_idx]
|
||||||
|
: c->pic.data[plane_idx]) + 8*by*stride;
|
||||||
for (bx = 0; bx < bw; bx++, dst += 8, prev += 8) {
|
for (bx = 0; bx < bw; bx++, dst += 8, prev += 8) {
|
||||||
blk = get_value(c, BINK_SRC_BLOCK_TYPES);
|
blk = get_value(c, BINK_SRC_BLOCK_TYPES);
|
||||||
// 16x16 block type on odd line means part of the already decoded block, so skip it
|
// 16x16 block type on odd line means part of the already decoded block, so skip it
|
||||||
|
@@ -109,8 +109,8 @@ static int alloc_table(VLC *vlc, int size, int use_static)
|
|||||||
if(use_static)
|
if(use_static)
|
||||||
abort(); //cant do anything, init_vlc() is used with too little memory
|
abort(); //cant do anything, init_vlc() is used with too little memory
|
||||||
vlc->table_allocated += (1 << vlc->bits);
|
vlc->table_allocated += (1 << vlc->bits);
|
||||||
vlc->table = av_realloc(vlc->table,
|
vlc->table = av_realloc_f(vlc->table,
|
||||||
sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
|
vlc->table_allocated, sizeof(VLC_TYPE) * 2);
|
||||||
if (!vlc->table)
|
if (!vlc->table)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -161,10 +161,14 @@ void ff_init_cabac_states(CABACContext *c){
|
|||||||
ff_h264_mps_state[2*i+1]= 2*mps_state[i]+1;
|
ff_h264_mps_state[2*i+1]= 2*mps_state[i]+1;
|
||||||
|
|
||||||
if( i ){
|
if( i ){
|
||||||
|
ff_h264_lps_state[2*i+0]=
|
||||||
ff_h264_mlps_state[128-2*i-1]= 2*lps_state[i]+0;
|
ff_h264_mlps_state[128-2*i-1]= 2*lps_state[i]+0;
|
||||||
|
ff_h264_lps_state[2*i+1]=
|
||||||
ff_h264_mlps_state[128-2*i-2]= 2*lps_state[i]+1;
|
ff_h264_mlps_state[128-2*i-2]= 2*lps_state[i]+1;
|
||||||
}else{
|
}else{
|
||||||
|
ff_h264_lps_state[2*i+0]=
|
||||||
ff_h264_mlps_state[128-2*i-1]= 1;
|
ff_h264_mlps_state[128-2*i-1]= 1;
|
||||||
|
ff_h264_lps_state[2*i+1]=
|
||||||
ff_h264_mlps_state[128-2*i-2]= 0;
|
ff_h264_mlps_state[128-2*i-2]= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,7 +194,8 @@ int main(void){
|
|||||||
ff_init_cabac_states(&c);
|
ff_init_cabac_states(&c);
|
||||||
|
|
||||||
for(i=0; i<SIZE; i++){
|
for(i=0; i<SIZE; i++){
|
||||||
r[i] = av_lfg_get(&prng) % 7;
|
if(2*i<SIZE) r[i] = av_lfg_get(&prng) % 7;
|
||||||
|
else r[i] = (i>>8)&1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0; i<SIZE; i++){
|
for(i=0; i<SIZE; i++){
|
||||||
@@ -205,6 +210,7 @@ START_TIMER
|
|||||||
STOP_TIMER("put_cabac")
|
STOP_TIMER("put_cabac")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
for(i=0; i<SIZE; i++){
|
for(i=0; i<SIZE; i++){
|
||||||
START_TIMER
|
START_TIMER
|
||||||
put_cabac_u(&c, state, r[i], 6, 3, i&1);
|
put_cabac_u(&c, state, r[i], 6, 3, i&1);
|
||||||
@@ -216,7 +222,7 @@ START_TIMER
|
|||||||
put_cabac_ueg(&c, state, r[i], 3, 0, 1, 2);
|
put_cabac_ueg(&c, state, r[i], 3, 0, 1, 2);
|
||||||
STOP_TIMER("put_cabac_ueg")
|
STOP_TIMER("put_cabac_ueg")
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
put_cabac_terminate(&c, 1);
|
put_cabac_terminate(&c, 1);
|
||||||
|
|
||||||
ff_init_cabac_decoder(&c, b, SIZE);
|
ff_init_cabac_decoder(&c, b, SIZE);
|
||||||
|
@@ -115,7 +115,8 @@ static inline int get_ue_code(GetBitContext *gb, int order) {
|
|||||||
static int decode_residual_block(AVSContext *h, GetBitContext *gb,
|
static int decode_residual_block(AVSContext *h, GetBitContext *gb,
|
||||||
const struct dec_2dvlc *r, int esc_golomb_order,
|
const struct dec_2dvlc *r, int esc_golomb_order,
|
||||||
int qp, uint8_t *dst, int stride) {
|
int qp, uint8_t *dst, int stride) {
|
||||||
int i, level_code, esc_code, level, run, mask;
|
int i, esc_code, level, mask;
|
||||||
|
unsigned int level_code, run;
|
||||||
DCTELEM level_buf[65];
|
DCTELEM level_buf[65];
|
||||||
uint8_t run_buf[65];
|
uint8_t run_buf[65];
|
||||||
DCTELEM *block = h->block;
|
DCTELEM *block = h->block;
|
||||||
@@ -124,6 +125,8 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
|
|||||||
level_code = get_ue_code(gb,r->golomb_order);
|
level_code = get_ue_code(gb,r->golomb_order);
|
||||||
if(level_code >= ESCAPE_CODE) {
|
if(level_code >= ESCAPE_CODE) {
|
||||||
run = ((level_code - ESCAPE_CODE) >> 1) + 1;
|
run = ((level_code - ESCAPE_CODE) >> 1) + 1;
|
||||||
|
if(run > 64)
|
||||||
|
return -1;
|
||||||
esc_code = get_ue_code(gb,esc_golomb_order);
|
esc_code = get_ue_code(gb,esc_golomb_order);
|
||||||
level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
|
level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
|
||||||
while(level > r->inc_limit)
|
while(level > r->inc_limit)
|
||||||
@@ -163,7 +166,7 @@ static inline int decode_residual_inter(AVSContext *h) {
|
|||||||
|
|
||||||
/* get coded block pattern */
|
/* get coded block pattern */
|
||||||
int cbp= get_ue_golomb(&h->s.gb);
|
int cbp= get_ue_golomb(&h->s.gb);
|
||||||
if(cbp > 63){
|
if(cbp > 63U){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "illegal inter cbp\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "illegal inter cbp\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -189,7 +192,8 @@ static inline int decode_residual_inter(AVSContext *h) {
|
|||||||
|
|
||||||
static int decode_mb_i(AVSContext *h, int cbp_code) {
|
static int decode_mb_i(AVSContext *h, int cbp_code) {
|
||||||
GetBitContext *gb = &h->s.gb;
|
GetBitContext *gb = &h->s.gb;
|
||||||
int block, pred_mode_uv;
|
unsigned pred_mode_uv;
|
||||||
|
int block;
|
||||||
uint8_t top[18];
|
uint8_t top[18];
|
||||||
uint8_t *left = NULL;
|
uint8_t *left = NULL;
|
||||||
uint8_t *d;
|
uint8_t *d;
|
||||||
@@ -222,7 +226,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
|
|||||||
/* get coded block pattern */
|
/* get coded block pattern */
|
||||||
if(h->pic_type == AV_PICTURE_TYPE_I)
|
if(h->pic_type == AV_PICTURE_TYPE_I)
|
||||||
cbp_code = get_ue_golomb(gb);
|
cbp_code = get_ue_golomb(gb);
|
||||||
if(cbp_code > 63){
|
if(cbp_code > 63U){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra cbp\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra cbp\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -445,6 +449,8 @@ static inline int check_for_slice(AVSContext *h) {
|
|||||||
if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) {
|
if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) {
|
||||||
skip_bits_long(gb,24+align);
|
skip_bits_long(gb,24+align);
|
||||||
h->stc = get_bits(gb,8);
|
h->stc = get_bits(gb,8);
|
||||||
|
if (h->stc >= h->mb_height)
|
||||||
|
return 0;
|
||||||
decode_slice_header(h,gb);
|
decode_slice_header(h,gb);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -659,7 +665,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
|
|||||||
buf_end = buf + buf_size;
|
buf_end = buf + buf_size;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc);
|
buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc);
|
||||||
if(stc & 0xFFFFFE00)
|
if((stc & 0xFFFFFE00) || buf_ptr == buf_end)
|
||||||
return FFMAX(0, buf_ptr - buf - s->parse_context.last_index);
|
return FFMAX(0, buf_ptr - buf - s->parse_context.last_index);
|
||||||
input_size = (buf_end - buf_ptr)*8;
|
input_size = (buf_end - buf_ptr)*8;
|
||||||
switch(stc) {
|
switch(stc) {
|
||||||
|
@@ -67,7 +67,6 @@ typedef struct CinepakContext {
|
|||||||
|
|
||||||
int sega_film_skip_bytes;
|
int sega_film_skip_bytes;
|
||||||
|
|
||||||
uint32_t pal[256];
|
|
||||||
} CinepakContext;
|
} CinepakContext;
|
||||||
|
|
||||||
static void cinepak_decode_codebook (cvid_codebook *codebook,
|
static void cinepak_decode_codebook (cvid_codebook *codebook,
|
||||||
@@ -336,7 +335,8 @@ static int cinepak_decode (CinepakContext *s)
|
|||||||
* If the frame header is followed by the bytes FE 00 00 06 00 00 then
|
* If the frame header is followed by the bytes FE 00 00 06 00 00 then
|
||||||
* this is probably one of the two known files that have 6 extra bytes
|
* this is probably one of the two known files that have 6 extra bytes
|
||||||
* after the frame header. Else, assume 2 extra bytes. */
|
* after the frame header. Else, assume 2 extra bytes. */
|
||||||
if ((s->data[10] == 0xFE) &&
|
if (s->size >= 16 &&
|
||||||
|
(s->data[10] == 0xFE) &&
|
||||||
(s->data[11] == 0x00) &&
|
(s->data[11] == 0x00) &&
|
||||||
(s->data[12] == 0x00) &&
|
(s->data[12] == 0x00) &&
|
||||||
(s->data[13] == 0x06) &&
|
(s->data[13] == 0x06) &&
|
||||||
@@ -396,7 +396,7 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx)
|
|||||||
s->sega_film_skip_bytes = -1; /* uninitialized state */
|
s->sega_film_skip_bytes = -1; /* uninitialized state */
|
||||||
|
|
||||||
// check for paletted data
|
// check for paletted data
|
||||||
if (avctx->bits_per_coded_sample != 8) {
|
if ((avctx->palctrl == NULL) || (avctx->bits_per_coded_sample == 40)) {
|
||||||
s->palette_video = 0;
|
s->palette_video = 0;
|
||||||
avctx->pix_fmt = PIX_FMT_YUV420P;
|
avctx->pix_fmt = PIX_FMT_YUV420P;
|
||||||
} else {
|
} else {
|
||||||
@@ -429,18 +429,16 @@ static int cinepak_decode_frame(AVCodecContext *avctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->palette_video) {
|
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
|
|
||||||
if (pal) {
|
|
||||||
s->frame.palette_has_changed = 1;
|
|
||||||
memcpy(s->pal, pal, AVPALETTE_SIZE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cinepak_decode(s);
|
cinepak_decode(s);
|
||||||
|
|
||||||
if (s->palette_video)
|
if (s->palette_video) {
|
||||||
memcpy (s->frame.data[1], s->pal, AVPALETTE_SIZE);
|
memcpy (s->frame.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||||
|
if (avctx->palctrl->palette_changed) {
|
||||||
|
s->frame.palette_has_changed = 1;
|
||||||
|
avctx->palctrl->palette_changed = 0;
|
||||||
|
} else
|
||||||
|
s->frame.palette_has_changed = 0;
|
||||||
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
*data_size = sizeof(AVFrame);
|
||||||
*(AVFrame*)data = s->frame;
|
*(AVFrame*)data = s->frame;
|
||||||
|
@@ -67,7 +67,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
p->pict_type= AV_PICTURE_TYPE_I;
|
p->pict_type= AV_PICTURE_TYPE_I;
|
||||||
p->key_frame= 1;
|
p->key_frame= 1;
|
||||||
|
|
||||||
init_get_bits(&a->gb, buf, buf_size);
|
init_get_bits(&a->gb, buf, buf_size * 8);
|
||||||
|
|
||||||
for(y=0; y<avctx->height; y++){
|
for(y=0; y<avctx->height; y++){
|
||||||
uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];
|
uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];
|
||||||
|
@@ -335,7 +335,7 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
|
|||||||
* Fill the gain array for the timedomain quantization.
|
* Fill the gain array for the timedomain quantization.
|
||||||
*
|
*
|
||||||
* @param gb pointer to the GetBitContext
|
* @param gb pointer to the GetBitContext
|
||||||
* @param gaininfo[9] array of gain indexes
|
* @param gaininfo array[9] of gain indexes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void decode_gain_info(GetBitContext *gb, int *gaininfo)
|
static void decode_gain_info(GetBitContext *gb, int *gaininfo)
|
||||||
@@ -1175,8 +1175,9 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((q->subpacket[s].js_vlc_bits > 6) || (q->subpacket[s].js_vlc_bits < 0)) {
|
if ((q->subpacket[s].js_vlc_bits > 6) || (q->subpacket[s].js_vlc_bits < 2*q->subpacket[s].joint_stereo)) {
|
||||||
av_log(avctx,AV_LOG_ERROR,"js_vlc_bits = %d, only >= 0 and <= 6 allowed!\n",q->subpacket[s].js_vlc_bits);
|
av_log(avctx,AV_LOG_ERROR,"js_vlc_bits = %d, only >= %d and <= 6 allowed!\n",
|
||||||
|
q->subpacket[s].js_vlc_bits, 2*q->subpacket[s].joint_stereo);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -898,6 +898,9 @@ static void qmf_32_subbands(DCAContext * s, int chans,
|
|||||||
else /* Perfect reconstruction */
|
else /* Perfect reconstruction */
|
||||||
prCoeff = fir_32bands_perfect;
|
prCoeff = fir_32bands_perfect;
|
||||||
|
|
||||||
|
for (i = sb_act; i < 32; i++)
|
||||||
|
s->raXin[i] = 0.0;
|
||||||
|
|
||||||
/* Reconstructed channel sample index */
|
/* Reconstructed channel sample index */
|
||||||
for (subindex = 0; subindex < 8; subindex++) {
|
for (subindex = 0; subindex < 8; subindex++) {
|
||||||
/* Load in one sample from each subband and clear inactive subbands */
|
/* Load in one sample from each subband and clear inactive subbands */
|
||||||
@@ -905,8 +908,6 @@ static void qmf_32_subbands(DCAContext * s, int chans,
|
|||||||
uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
|
uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
|
||||||
AV_WN32A(&s->raXin[i], v);
|
AV_WN32A(&s->raXin[i], v);
|
||||||
}
|
}
|
||||||
for (; i < 32; i++)
|
|
||||||
s->raXin[i] = 0.0;
|
|
||||||
|
|
||||||
s->synth.synth_filter_float(&s->imdct,
|
s->synth.synth_filter_float(&s->imdct,
|
||||||
s->subband_fir_hist[chans], &s->hist_index[chans],
|
s->subband_fir_hist[chans], &s->hist_index[chans],
|
||||||
@@ -1650,6 +1651,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
|
|||||||
//set AVCodec values with parsed data
|
//set AVCodec values with parsed data
|
||||||
avctx->sample_rate = s->sample_rate;
|
avctx->sample_rate = s->sample_rate;
|
||||||
avctx->bit_rate = s->bit_rate;
|
avctx->bit_rate = s->bit_rate;
|
||||||
|
avctx->frame_size = s->sample_blocks * 32;
|
||||||
|
|
||||||
s->profile = FF_PROFILE_DTS;
|
s->profile = FF_PROFILE_DTS;
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
// chroma subsampling
|
// chroma subsampling
|
||||||
if (get_bits1(gb))
|
if (get_bits1(gb))
|
||||||
source->chroma_format = svq3_get_ue_golomb(gb);
|
source->chroma_format = svq3_get_ue_golomb(gb);
|
||||||
if (source->chroma_format > 2) {
|
if (source->chroma_format > 2U) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Unknown chroma format %d\n",
|
av_log(avctx, AV_LOG_ERROR, "Unknown chroma format %d\n",
|
||||||
source->chroma_format);
|
source->chroma_format);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -128,14 +128,14 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
|
|
||||||
if (get_bits1(gb))
|
if (get_bits1(gb))
|
||||||
source->interlaced = svq3_get_ue_golomb(gb);
|
source->interlaced = svq3_get_ue_golomb(gb);
|
||||||
if (source->interlaced > 1)
|
if (source->interlaced > 1U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// frame rate
|
// frame rate
|
||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
source->frame_rate_index = svq3_get_ue_golomb(gb);
|
source->frame_rate_index = svq3_get_ue_golomb(gb);
|
||||||
|
|
||||||
if (source->frame_rate_index > 10)
|
if (source->frame_rate_index > 10U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!source->frame_rate_index) {
|
if (!source->frame_rate_index) {
|
||||||
@@ -156,7 +156,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
source->aspect_ratio_index = svq3_get_ue_golomb(gb);
|
source->aspect_ratio_index = svq3_get_ue_golomb(gb);
|
||||||
|
|
||||||
if (source->aspect_ratio_index > 6)
|
if (source->aspect_ratio_index > 6U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!source->aspect_ratio_index) {
|
if (!source->aspect_ratio_index) {
|
||||||
@@ -179,7 +179,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
source->pixel_range_index = svq3_get_ue_golomb(gb);
|
source->pixel_range_index = svq3_get_ue_golomb(gb);
|
||||||
|
|
||||||
if (source->pixel_range_index > 4)
|
if (source->pixel_range_index > 4U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// This assumes either fullrange or MPEG levels only
|
// This assumes either fullrange or MPEG levels only
|
||||||
@@ -207,7 +207,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
idx = source->color_spec_index = svq3_get_ue_golomb(gb);
|
idx = source->color_spec_index = svq3_get_ue_golomb(gb);
|
||||||
|
|
||||||
if (source->color_spec_index > 4)
|
if (source->color_spec_index > 4U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
avctx->color_primaries = dirac_color_presets[idx].color_primaries;
|
avctx->color_primaries = dirac_color_presets[idx].color_primaries;
|
||||||
@@ -217,7 +217,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
if (!source->color_spec_index) {
|
if (!source->color_spec_index) {
|
||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
idx = svq3_get_ue_golomb(gb);
|
idx = svq3_get_ue_golomb(gb);
|
||||||
if (idx < 3)
|
if (idx < 3U)
|
||||||
avctx->color_primaries = dirac_primaries[idx];
|
avctx->color_primaries = dirac_primaries[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
else if (version_major > 2)
|
else if (version_major > 2)
|
||||||
av_log(avctx, AV_LOG_WARNING, "Stream may have unhandled features\n");
|
av_log(avctx, AV_LOG_WARNING, "Stream may have unhandled features\n");
|
||||||
|
|
||||||
if (video_format > 20)
|
if (video_format > 20U)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Fill in defaults for the source parameters.
|
// Fill in defaults for the source parameters.
|
||||||
|
@@ -217,7 +217,11 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
bitmap_frame_size = buf_size - 4;
|
bitmap_frame_size = buf_size - 4;
|
||||||
|
|
||||||
/* handle palette */
|
/* handle palette */
|
||||||
|
if (bitmap_frame_size < palette_colors_count * (3 + (palette_type != 0)))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (palette_type == 0) {
|
if (palette_type == 0) {
|
||||||
|
if (palette_colors_count > 256)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
for (i = 0; i < palette_colors_count; ++i) {
|
for (i = 0; i < palette_colors_count; ++i) {
|
||||||
cin->palette[i] = bytestream_get_le24(&buf);
|
cin->palette[i] = bytestream_get_le24(&buf);
|
||||||
bitmap_frame_size -= 3;
|
bitmap_frame_size -= 3;
|
||||||
|
@@ -120,6 +120,14 @@ void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
|
|||||||
void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
|
void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
|
||||||
|
|
||||||
/* 1/2^n downscaling functions from imgconvert.c */
|
/* 1/2^n downscaling functions from imgconvert.c */
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
/**
|
||||||
|
* @deprecated Use av_image_copy_plane() instead.
|
||||||
|
*/
|
||||||
|
attribute_deprecated
|
||||||
|
void ff_img_copy_plane(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||||
|
#endif
|
||||||
|
|
||||||
void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||||
void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||||
void ff_shrink88(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
void ff_shrink88(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
|
||||||
|
@@ -1360,7 +1360,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
|
|||||||
rect->y = display->y_pos + offset_y;
|
rect->y = display->y_pos + offset_y;
|
||||||
rect->w = region->width;
|
rect->w = region->width;
|
||||||
rect->h = region->height;
|
rect->h = region->height;
|
||||||
rect->nb_colors = 16;
|
rect->nb_colors = (1 << region->depth);
|
||||||
rect->type = SUBTITLE_BITMAP;
|
rect->type = SUBTITLE_BITMAP;
|
||||||
rect->pict.linesize[0] = region->width;
|
rect->pict.linesize[0] = region->width;
|
||||||
|
|
||||||
|
@@ -158,9 +158,10 @@ static void fill_scaling_lists(const H264Context *h, DXVA_Qmatrix_H264 *qm)
|
|||||||
for (j = 0; j < 16; j++)
|
for (j = 0; j < 16; j++)
|
||||||
qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]];
|
qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]];
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (j = 0; j < 64; j++) {
|
||||||
for (j = 0; j < 64; j++)
|
qm->bScalingLists8x8[0][j] = h->pps.scaling_matrix8[0][ff_zigzag_direct[j]];
|
||||||
qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][ff_zigzag_direct[j]];
|
qm->bScalingLists8x8[1][j] = h->pps.scaling_matrix8[3][ff_zigzag_direct[j]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_slice_short(struct dxva_context *ctx)
|
static int is_slice_short(struct dxva_context *ctx)
|
||||||
|
@@ -56,7 +56,7 @@ static void cmv_decode_intra(CmvContext * s, const uint8_t *buf, const uint8_t *
|
|||||||
unsigned char *dst = s->frame.data[0];
|
unsigned char *dst = s->frame.data[0];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i < s->avctx->height && buf+s->avctx->width<=buf_end; i++) {
|
for (i=0; i < s->avctx->height && buf_end - buf >= s->avctx->width; i++) {
|
||||||
memcpy(dst, buf, s->avctx->width);
|
memcpy(dst, buf, s->avctx->width);
|
||||||
dst += s->frame.linesize[0];
|
dst += s->frame.linesize[0];
|
||||||
buf += s->avctx->width;
|
buf += s->avctx->width;
|
||||||
@@ -88,7 +88,7 @@ static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
for(y=0; y<s->avctx->height/4; y++)
|
for(y=0; y<s->avctx->height/4; y++)
|
||||||
for(x=0; x<s->avctx->width/4 && buf+i<buf_end; x++) {
|
for(x=0; x<s->avctx->width/4 && buf_end - buf > i; x++) {
|
||||||
if (buf[i]==0xFF) {
|
if (buf[i]==0xFF) {
|
||||||
unsigned char *dst = s->frame.data[0] + (y*4)*s->frame.linesize[0] + x*4;
|
unsigned char *dst = s->frame.data[0] + (y*4)*s->frame.linesize[0] + x*4;
|
||||||
if (raw+16<buf_end && *raw==0xFF) { /* intra */
|
if (raw+16<buf_end && *raw==0xFF) { /* intra */
|
||||||
@@ -110,9 +110,10 @@ static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *
|
|||||||
}else{ /* inter using last frame as reference */
|
}else{ /* inter using last frame as reference */
|
||||||
int xoffset = (buf[i] & 0xF) - 7;
|
int xoffset = (buf[i] & 0xF) - 7;
|
||||||
int yoffset = ((buf[i] >> 4)) - 7;
|
int yoffset = ((buf[i] >> 4)) - 7;
|
||||||
cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
|
if (s->last_frame.data[0])
|
||||||
s->last_frame.data[0], s->last_frame.linesize[0],
|
cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
|
||||||
x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);
|
s->last_frame.data[0], s->last_frame.linesize[0],
|
||||||
|
x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@@ -122,7 +123,7 @@ static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t
|
|||||||
{
|
{
|
||||||
int pal_start, pal_count, i;
|
int pal_start, pal_count, i;
|
||||||
|
|
||||||
if(buf+16>=buf_end) {
|
if(buf_end - buf < 16) {
|
||||||
av_log(s->avctx, AV_LOG_WARNING, "truncated header\n");
|
av_log(s->avctx, AV_LOG_WARNING, "truncated header\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -139,7 +140,7 @@ static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t
|
|||||||
pal_count = AV_RL16(&buf[14]);
|
pal_count = AV_RL16(&buf[14]);
|
||||||
|
|
||||||
buf += 16;
|
buf += 16;
|
||||||
for (i=pal_start; i<pal_start+pal_count && i<AVPALETTE_COUNT && buf+2<buf_end; i++) {
|
for (i=pal_start; i<pal_start+pal_count && i<AVPALETTE_COUNT && buf_end - buf >= 3; i++) {
|
||||||
s->palette[i] = AV_RB24(buf);
|
s->palette[i] = AV_RB24(buf);
|
||||||
buf += 3;
|
buf += 3;
|
||||||
}
|
}
|
||||||
@@ -157,6 +158,9 @@ static int cmv_decode_frame(AVCodecContext *avctx,
|
|||||||
CmvContext *s = avctx->priv_data;
|
CmvContext *s = avctx->priv_data;
|
||||||
const uint8_t *buf_end = buf + buf_size;
|
const uint8_t *buf_end = buf + buf_size;
|
||||||
|
|
||||||
|
if (buf_end - buf < EA_PREAMBLE_SIZE)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) {
|
if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) {
|
||||||
cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end);
|
cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end);
|
||||||
return buf_size;
|
return buf_size;
|
||||||
|
@@ -660,7 +660,7 @@ static int is_intra_more_likely(MpegEncContext *s){
|
|||||||
|
|
||||||
if(s->codec_id == CODEC_ID_H264){
|
if(s->codec_id == CODEC_ID_H264){
|
||||||
H264Context *h= (void*)s;
|
H264Context *h= (void*)s;
|
||||||
if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0])
|
if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1805,7 +1805,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
bytes_read = c->bytestream - c->bytestream_start - 1;
|
bytes_read = c->bytestream - c->bytestream_start - 1;
|
||||||
if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME
|
if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME
|
||||||
//printf("pos=%d\n", bytes_read);
|
//printf("pos=%d\n", bytes_read);
|
||||||
init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, buf_size - bytes_read);
|
init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, (buf_size - bytes_read) * 8);
|
||||||
} else {
|
} else {
|
||||||
bytes_read = 0; /* avoid warning */
|
bytes_read = 0; /* avoid warning */
|
||||||
}
|
}
|
||||||
@@ -1822,7 +1822,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
if(fs->ac){
|
if(fs->ac){
|
||||||
ff_init_range_decoder(&fs->c, buf_p, v);
|
ff_init_range_decoder(&fs->c, buf_p, v);
|
||||||
}else{
|
}else{
|
||||||
init_get_bits(&fs->gb, buf_p, v);
|
init_get_bits(&fs->gb, buf_p, v * 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -228,9 +228,11 @@ static int get_metadata_size(const uint8_t *buf, int buf_size)
|
|||||||
|
|
||||||
buf += 4;
|
buf += 4;
|
||||||
do {
|
do {
|
||||||
|
if (buf_end - buf < 4)
|
||||||
|
return 0;
|
||||||
ff_flac_parse_block_header(buf, &metadata_last, NULL, &metadata_size);
|
ff_flac_parse_block_header(buf, &metadata_last, NULL, &metadata_size);
|
||||||
buf += 4;
|
buf += 4;
|
||||||
if (buf + metadata_size > buf_end) {
|
if (buf_end - buf < metadata_size) {
|
||||||
/* need more data in order to read the complete header */
|
/* need more data in order to read the complete header */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -296,6 +296,17 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
|
|||||||
s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level];
|
s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level];
|
||||||
|
|
||||||
/* set compression option overrides from AVCodecContext */
|
/* set compression option overrides from AVCodecContext */
|
||||||
|
#if FF_API_USE_LPC
|
||||||
|
/* for compatibility with deprecated AVCodecContext.use_lpc */
|
||||||
|
if (avctx->use_lpc == 0) {
|
||||||
|
s->options.lpc_type = AV_LPC_TYPE_FIXED;
|
||||||
|
} else if (avctx->use_lpc == 1) {
|
||||||
|
s->options.lpc_type = AV_LPC_TYPE_LEVINSON;
|
||||||
|
} else if (avctx->use_lpc > 1) {
|
||||||
|
s->options.lpc_type = AV_LPC_TYPE_CHOLESKY;
|
||||||
|
s->options.lpc_passes = avctx->use_lpc - 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if FF_API_FLAC_GLOBAL_OPTS
|
#if FF_API_FLAC_GLOBAL_OPTS
|
||||||
if (avctx->lpc_type > FF_LPC_TYPE_DEFAULT) {
|
if (avctx->lpc_type > FF_LPC_TYPE_DEFAULT) {
|
||||||
if (avctx->lpc_type > FF_LPC_TYPE_CHOLESKY) {
|
if (avctx->lpc_type > FF_LPC_TYPE_CHOLESKY) {
|
||||||
|
@@ -132,7 +132,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
FlicDecodeContext *s = avctx->priv_data;
|
FlicDecodeContext *s = avctx->priv_data;
|
||||||
|
|
||||||
int stream_ptr = 0;
|
int stream_ptr = 0;
|
||||||
int stream_ptr_after_color_chunk;
|
|
||||||
int pixel_ptr;
|
int pixel_ptr;
|
||||||
int palette_ptr;
|
int palette_ptr;
|
||||||
unsigned char palette_idx1;
|
unsigned char palette_idx1;
|
||||||
@@ -172,7 +171,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
pixels = s->frame.data[0];
|
pixels = s->frame.data[0];
|
||||||
pixel_limit = s->avctx->height * s->frame.linesize[0];
|
pixel_limit = s->avctx->height * s->frame.linesize[0];
|
||||||
|
|
||||||
|
if (buf_size < 16 || buf_size > INT_MAX - (3 * 256 + FF_INPUT_BUFFER_PADDING_SIZE))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
frame_size = AV_RL32(&buf[stream_ptr]);
|
frame_size = AV_RL32(&buf[stream_ptr]);
|
||||||
|
if (frame_size > buf_size)
|
||||||
|
frame_size = buf_size;
|
||||||
stream_ptr += 6; /* skip the magic number */
|
stream_ptr += 6; /* skip the magic number */
|
||||||
num_chunks = AV_RL16(&buf[stream_ptr]);
|
num_chunks = AV_RL16(&buf[stream_ptr]);
|
||||||
stream_ptr += 10; /* skip padding */
|
stream_ptr += 10; /* skip padding */
|
||||||
@@ -180,13 +183,16 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
frame_size -= 16;
|
frame_size -= 16;
|
||||||
|
|
||||||
/* iterate through the chunks */
|
/* iterate through the chunks */
|
||||||
while ((frame_size > 0) && (num_chunks > 0)) {
|
while ((frame_size >= 6) && (num_chunks > 0)) {
|
||||||
|
int stream_ptr_after_chunk;
|
||||||
chunk_size = AV_RL32(&buf[stream_ptr]);
|
chunk_size = AV_RL32(&buf[stream_ptr]);
|
||||||
if (chunk_size > frame_size) {
|
if (chunk_size > frame_size) {
|
||||||
av_log(avctx, AV_LOG_WARNING,
|
av_log(avctx, AV_LOG_WARNING,
|
||||||
"Invalid chunk_size = %u > frame_size = %u\n", chunk_size, frame_size);
|
"Invalid chunk_size = %u > frame_size = %u\n", chunk_size, frame_size);
|
||||||
chunk_size = frame_size;
|
chunk_size = frame_size;
|
||||||
}
|
}
|
||||||
|
stream_ptr_after_chunk = stream_ptr + chunk_size;
|
||||||
|
|
||||||
stream_ptr += 4;
|
stream_ptr += 4;
|
||||||
chunk_type = AV_RL16(&buf[stream_ptr]);
|
chunk_type = AV_RL16(&buf[stream_ptr]);
|
||||||
stream_ptr += 2;
|
stream_ptr += 2;
|
||||||
@@ -194,8 +200,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
switch (chunk_type) {
|
switch (chunk_type) {
|
||||||
case FLI_256_COLOR:
|
case FLI_256_COLOR:
|
||||||
case FLI_COLOR:
|
case FLI_COLOR:
|
||||||
stream_ptr_after_color_chunk = stream_ptr + chunk_size - 6;
|
|
||||||
|
|
||||||
/* check special case: If this file is from the Magic Carpet
|
/* check special case: If this file is from the Magic Carpet
|
||||||
* game and uses 6-bit colors even though it reports 256-color
|
* game and uses 6-bit colors even though it reports 256-color
|
||||||
* chunks in a 0xAF12-type file (fli_type is set to 0xAF13 during
|
* chunks in a 0xAF12-type file (fli_type is set to 0xAF13 during
|
||||||
@@ -219,6 +223,9 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
if (color_changes == 0)
|
if (color_changes == 0)
|
||||||
color_changes = 256;
|
color_changes = 256;
|
||||||
|
|
||||||
|
if (stream_ptr + color_changes * 3 > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
|
|
||||||
for (j = 0; j < color_changes; j++) {
|
for (j = 0; j < color_changes; j++) {
|
||||||
unsigned int entry;
|
unsigned int entry;
|
||||||
|
|
||||||
@@ -235,13 +242,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
s->palette[palette_ptr++] = entry;
|
s->palette[palette_ptr++] = entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* color chunks sometimes have weird 16-bit alignment issues;
|
|
||||||
* therefore, take the hardline approach and set the stream_ptr
|
|
||||||
* to the value calculated w.r.t. the size specified by the color
|
|
||||||
* chunk header */
|
|
||||||
stream_ptr = stream_ptr_after_color_chunk;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FLI_DELTA:
|
case FLI_DELTA:
|
||||||
@@ -249,6 +249,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
compressed_lines = AV_RL16(&buf[stream_ptr]);
|
compressed_lines = AV_RL16(&buf[stream_ptr]);
|
||||||
stream_ptr += 2;
|
stream_ptr += 2;
|
||||||
while (compressed_lines > 0) {
|
while (compressed_lines > 0) {
|
||||||
|
if (stream_ptr + 2 > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
line_packets = AV_RL16(&buf[stream_ptr]);
|
line_packets = AV_RL16(&buf[stream_ptr]);
|
||||||
stream_ptr += 2;
|
stream_ptr += 2;
|
||||||
if ((line_packets & 0xC000) == 0xC000) {
|
if ((line_packets & 0xC000) == 0xC000) {
|
||||||
@@ -268,6 +270,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
CHECK_PIXEL_PTR(0);
|
CHECK_PIXEL_PTR(0);
|
||||||
pixel_countdown = s->avctx->width;
|
pixel_countdown = s->avctx->width;
|
||||||
for (i = 0; i < line_packets; i++) {
|
for (i = 0; i < line_packets; i++) {
|
||||||
|
if (stream_ptr + 2 > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
/* account for the skip bytes */
|
/* account for the skip bytes */
|
||||||
pixel_skip = buf[stream_ptr++];
|
pixel_skip = buf[stream_ptr++];
|
||||||
pixel_ptr += pixel_skip;
|
pixel_ptr += pixel_skip;
|
||||||
@@ -284,6 +288,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CHECK_PIXEL_PTR(byte_run * 2);
|
CHECK_PIXEL_PTR(byte_run * 2);
|
||||||
|
if (stream_ptr + byte_run * 2 > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
for (j = 0; j < byte_run * 2; j++, pixel_countdown--) {
|
for (j = 0; j < byte_run * 2; j++, pixel_countdown--) {
|
||||||
palette_idx1 = buf[stream_ptr++];
|
palette_idx1 = buf[stream_ptr++];
|
||||||
pixels[pixel_ptr++] = palette_idx1;
|
pixels[pixel_ptr++] = palette_idx1;
|
||||||
@@ -310,6 +316,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
CHECK_PIXEL_PTR(0);
|
CHECK_PIXEL_PTR(0);
|
||||||
pixel_countdown = s->avctx->width;
|
pixel_countdown = s->avctx->width;
|
||||||
line_packets = buf[stream_ptr++];
|
line_packets = buf[stream_ptr++];
|
||||||
|
if (stream_ptr + 2 * line_packets > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
if (line_packets > 0) {
|
if (line_packets > 0) {
|
||||||
for (i = 0; i < line_packets; i++) {
|
for (i = 0; i < line_packets; i++) {
|
||||||
/* account for the skip bytes */
|
/* account for the skip bytes */
|
||||||
@@ -319,6 +327,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
byte_run = (signed char)(buf[stream_ptr++]);
|
byte_run = (signed char)(buf[stream_ptr++]);
|
||||||
if (byte_run > 0) {
|
if (byte_run > 0) {
|
||||||
CHECK_PIXEL_PTR(byte_run);
|
CHECK_PIXEL_PTR(byte_run);
|
||||||
|
if (stream_ptr + byte_run > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
for (j = 0; j < byte_run; j++, pixel_countdown--) {
|
for (j = 0; j < byte_run; j++, pixel_countdown--) {
|
||||||
palette_idx1 = buf[stream_ptr++];
|
palette_idx1 = buf[stream_ptr++];
|
||||||
pixels[pixel_ptr++] = palette_idx1;
|
pixels[pixel_ptr++] = palette_idx1;
|
||||||
@@ -356,6 +366,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
stream_ptr++;
|
stream_ptr++;
|
||||||
pixel_countdown = s->avctx->width;
|
pixel_countdown = s->avctx->width;
|
||||||
while (pixel_countdown > 0) {
|
while (pixel_countdown > 0) {
|
||||||
|
if (stream_ptr + 1 > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
byte_run = (signed char)(buf[stream_ptr++]);
|
byte_run = (signed char)(buf[stream_ptr++]);
|
||||||
if (byte_run > 0) {
|
if (byte_run > 0) {
|
||||||
palette_idx1 = buf[stream_ptr++];
|
palette_idx1 = buf[stream_ptr++];
|
||||||
@@ -370,6 +382,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
} else { /* copy bytes if byte_run < 0 */
|
} else { /* copy bytes if byte_run < 0 */
|
||||||
byte_run = -byte_run;
|
byte_run = -byte_run;
|
||||||
CHECK_PIXEL_PTR(byte_run);
|
CHECK_PIXEL_PTR(byte_run);
|
||||||
|
if (stream_ptr + byte_run > stream_ptr_after_chunk)
|
||||||
|
break;
|
||||||
for (j = 0; j < byte_run; j++) {
|
for (j = 0; j < byte_run; j++) {
|
||||||
palette_idx1 = buf[stream_ptr++];
|
palette_idx1 = buf[stream_ptr++];
|
||||||
pixels[pixel_ptr++] = palette_idx1;
|
pixels[pixel_ptr++] = palette_idx1;
|
||||||
@@ -387,10 +401,9 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
|
|
||||||
case FLI_COPY:
|
case FLI_COPY:
|
||||||
/* copy the chunk (uncompressed frame) */
|
/* copy the chunk (uncompressed frame) */
|
||||||
if (chunk_size - 6 > s->avctx->width * s->avctx->height) {
|
if (chunk_size - 6 != s->avctx->width * s->avctx->height) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "In chunk FLI_COPY : source data (%d bytes) " \
|
av_log(avctx, AV_LOG_ERROR, "In chunk FLI_COPY : source data (%d bytes) " \
|
||||||
"bigger than image, skipping chunk\n", chunk_size - 6);
|
"has incorrect size, skipping chunk\n", chunk_size - 6);
|
||||||
stream_ptr += chunk_size - 6;
|
|
||||||
} else {
|
} else {
|
||||||
for (y_ptr = 0; y_ptr < s->frame.linesize[0] * s->avctx->height;
|
for (y_ptr = 0; y_ptr < s->frame.linesize[0] * s->avctx->height;
|
||||||
y_ptr += s->frame.linesize[0]) {
|
y_ptr += s->frame.linesize[0]) {
|
||||||
@@ -403,7 +416,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
|
|
||||||
case FLI_MINI:
|
case FLI_MINI:
|
||||||
/* some sort of a thumbnail? disregard this chunk... */
|
/* some sort of a thumbnail? disregard this chunk... */
|
||||||
stream_ptr += chunk_size - 6;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -411,6 +423,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream_ptr = stream_ptr_after_chunk;
|
||||||
|
|
||||||
frame_size -= chunk_size;
|
frame_size -= chunk_size;
|
||||||
num_chunks--;
|
num_chunks--;
|
||||||
}
|
}
|
||||||
|
@@ -599,6 +599,10 @@ retry:
|
|||||||
s->current_picture.pict_type= s->pict_type;
|
s->current_picture.pict_type= s->pict_type;
|
||||||
s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
|
s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
|
||||||
|
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/* skip everything if we are in a hurry>=5 */
|
||||||
|
if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);
|
||||||
|
#endif
|
||||||
if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
|
if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
|
||||||
||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
|
||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
|
||||||
|| avctx->skip_frame >= AVDISCARD_ALL)
|
|| avctx->skip_frame >= AVDISCARD_ALL)
|
||||||
|
@@ -380,7 +380,7 @@ uint64_t time= rdtsc();
|
|||||||
|
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if(s->divx_packed && s->xvid_build>=0 && s->bitstream_buffer_size){
|
if(s->divx_packed && s->bitstream_buffer_size){
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<buf_size-3; i++){
|
for(i=0; i<buf_size-3; i++){
|
||||||
if(buf[i]==0 && buf[i+1]==0 && buf[i+2]==1){
|
if(buf[i]==0 && buf[i+1]==0 && buf[i+2]==1){
|
||||||
@@ -598,10 +598,18 @@ retry:
|
|||||||
|
|
||||||
/* skip B-frames if we don't have reference frames */
|
/* skip B-frames if we don't have reference frames */
|
||||||
if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)) return get_consumed_bytes(s, buf_size);
|
if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)) return get_consumed_bytes(s, buf_size);
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/* skip b frames if we are in a hurry */
|
||||||
|
if(avctx->hurry_up && s->pict_type==FF_B_TYPE) return get_consumed_bytes(s, buf_size);
|
||||||
|
#endif
|
||||||
if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
|
if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
|
||||||
|| (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
|
|| (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
|
||||||
|| avctx->skip_frame >= AVDISCARD_ALL)
|
|| avctx->skip_frame >= AVDISCARD_ALL)
|
||||||
return get_consumed_bytes(s, buf_size);
|
return get_consumed_bytes(s, buf_size);
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/* skip everything if we are in a hurry>=5 */
|
||||||
|
if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(s->next_p_frame_damaged){
|
if(s->next_p_frame_damaged){
|
||||||
if(s->pict_type==AV_PICTURE_TYPE_B)
|
if(s->pict_type==AV_PICTURE_TYPE_B)
|
||||||
@@ -681,7 +689,7 @@ frame_end:
|
|||||||
int current_pos= s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb)>>3);
|
int current_pos= s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb)>>3);
|
||||||
int startcode_found=0;
|
int startcode_found=0;
|
||||||
|
|
||||||
if(buf_size - current_pos > 5){
|
if(buf_size - current_pos > 7){
|
||||||
int i;
|
int i;
|
||||||
for(i=current_pos; i<buf_size-4; i++){
|
for(i=current_pos; i<buf_size-4; i++){
|
||||||
if(buf[i]==0 && buf[i+1]==0 && buf[i+2]==1 && buf[i+3]==0xB6){
|
if(buf[i]==0 && buf[i+1]==0 && buf[i+2]==1 && buf[i+3]==0xB6){
|
||||||
|
@@ -106,12 +106,9 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} //FIXME cleanup like ff_h264_check_intra_pred_mode
|
} //FIXME cleanup like check_intra_pred_mode
|
||||||
|
|
||||||
/**
|
static int check_intra_pred_mode(H264Context *h, int mode, int is_chroma){
|
||||||
* checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
|
|
||||||
*/
|
|
||||||
int ff_h264_check_intra_pred_mode(H264Context *h, int mode){
|
|
||||||
MpegEncContext * const s = &h->s;
|
MpegEncContext * const s = &h->s;
|
||||||
static const int8_t top [7]= {LEFT_DC_PRED8x8, 1,-1,-1};
|
static const int8_t top [7]= {LEFT_DC_PRED8x8, 1,-1,-1};
|
||||||
static const int8_t left[7]= { TOP_DC_PRED8x8,-1, 2,-1,DC_128_PRED8x8};
|
static const int8_t left[7]= { TOP_DC_PRED8x8,-1, 2,-1,DC_128_PRED8x8};
|
||||||
@@ -131,7 +128,7 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode){
|
|||||||
|
|
||||||
if((h->left_samples_available&0x8080) != 0x8080){
|
if((h->left_samples_available&0x8080) != 0x8080){
|
||||||
mode= left[ mode ];
|
mode= left[ mode ];
|
||||||
if(h->left_samples_available&0x8080){ //mad cow disease mode, aka MBAFF + constrained_intra_pred
|
if(is_chroma && (h->left_samples_available&0x8080)){ //mad cow disease mode, aka MBAFF + constrained_intra_pred
|
||||||
mode= ALZHEIMER_DC_L0T_PRED8x8 + (!(h->left_samples_available&0x8000)) + 2*(mode == DC_128_PRED8x8);
|
mode= ALZHEIMER_DC_L0T_PRED8x8 + (!(h->left_samples_available&0x8000)) + 2*(mode == DC_128_PRED8x8);
|
||||||
}
|
}
|
||||||
if(mode<0){
|
if(mode<0){
|
||||||
@@ -143,6 +140,23 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode){
|
|||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
|
||||||
|
*/
|
||||||
|
int ff_h264_check_intra16x16_pred_mode(H264Context *h, int mode)
|
||||||
|
{
|
||||||
|
return check_intra_pred_mode(h, mode, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
|
||||||
|
*/
|
||||||
|
int ff_h264_check_intra_chroma_pred_mode(H264Context *h, int mode)
|
||||||
|
{
|
||||||
|
return check_intra_pred_mode(h, mode, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){
|
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){
|
||||||
int i, si, di;
|
int i, si, di;
|
||||||
uint8_t *dst;
|
uint8_t *dst;
|
||||||
@@ -183,20 +197,28 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l
|
|||||||
i-= RS;
|
i-= RS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(i>=length-1){ //no escaped 0
|
|
||||||
*dst_length= length;
|
|
||||||
*consumed= length+1; //+1 for the header
|
|
||||||
return src;
|
|
||||||
}
|
|
||||||
|
|
||||||
bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data
|
bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data
|
||||||
av_fast_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE);
|
si=h->rbsp_buffer_size[bufidx];
|
||||||
|
av_fast_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE+MAX_MBPAIR_SIZE);
|
||||||
dst= h->rbsp_buffer[bufidx];
|
dst= h->rbsp_buffer[bufidx];
|
||||||
|
if(si != h->rbsp_buffer_size[bufidx])
|
||||||
|
memset(dst + length, 0, FF_INPUT_BUFFER_PADDING_SIZE+MAX_MBPAIR_SIZE);
|
||||||
|
|
||||||
if (dst == NULL){
|
if (dst == NULL){
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(i>=length-1){ //no escaped 0
|
||||||
|
*dst_length= length;
|
||||||
|
*consumed= length+1; //+1 for the header
|
||||||
|
if(h->s.avctx->flags2 & CODEC_FLAG2_FAST){
|
||||||
|
return src;
|
||||||
|
}else{
|
||||||
|
memcpy(dst, src, length);
|
||||||
|
return dst;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//printf("decoding esc\n");
|
//printf("decoding esc\n");
|
||||||
memcpy(dst, src, i);
|
memcpy(dst, src, i);
|
||||||
si=di=i;
|
si=di=i;
|
||||||
@@ -1010,17 +1032,20 @@ static av_cold void common_init(H264Context *h){
|
|||||||
memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t));
|
memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_h264_decode_extradata(H264Context *h)
|
int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size)
|
||||||
{
|
{
|
||||||
AVCodecContext *avctx = h->s.avctx;
|
AVCodecContext *avctx = h->s.avctx;
|
||||||
|
|
||||||
if(avctx->extradata[0] == 1){
|
if(!buf || size <= 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if(buf[0] == 1){
|
||||||
int i, cnt, nalsize;
|
int i, cnt, nalsize;
|
||||||
unsigned char *p = avctx->extradata;
|
const unsigned char *p = buf;
|
||||||
|
|
||||||
h->is_avc = 1;
|
h->is_avc = 1;
|
||||||
|
|
||||||
if(avctx->extradata_size < 7) {
|
if(size < 7) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "avcC too short\n");
|
av_log(avctx, AV_LOG_ERROR, "avcC too short\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -1032,6 +1057,8 @@ int ff_h264_decode_extradata(H264Context *h)
|
|||||||
p += 6;
|
p += 6;
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
nalsize = AV_RB16(p) + 2;
|
nalsize = AV_RB16(p) + 2;
|
||||||
|
if(nalsize > size - (p-buf))
|
||||||
|
return -1;
|
||||||
if(decode_nal_units(h, p, nalsize) < 0) {
|
if(decode_nal_units(h, p, nalsize) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i);
|
av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1042,6 +1069,8 @@ int ff_h264_decode_extradata(H264Context *h)
|
|||||||
cnt = *(p++); // Number of pps
|
cnt = *(p++); // Number of pps
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
nalsize = AV_RB16(p) + 2;
|
nalsize = AV_RB16(p) + 2;
|
||||||
|
if(nalsize > size - (p-buf))
|
||||||
|
return -1;
|
||||||
if (decode_nal_units(h, p, nalsize) < 0) {
|
if (decode_nal_units(h, p, nalsize) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i);
|
av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1049,10 +1078,10 @@ int ff_h264_decode_extradata(H264Context *h)
|
|||||||
p += nalsize;
|
p += nalsize;
|
||||||
}
|
}
|
||||||
// Now store right nal length size, that will be use to parse all other nals
|
// Now store right nal length size, that will be use to parse all other nals
|
||||||
h->nal_length_size = (avctx->extradata[4] & 0x03) + 1;
|
h->nal_length_size = (buf[4] & 0x03) + 1;
|
||||||
} else {
|
} else {
|
||||||
h->is_avc = 0;
|
h->is_avc = 0;
|
||||||
if(decode_nal_units(h, avctx->extradata, avctx->extradata_size) < 0)
|
if(decode_nal_units(h, buf, size) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1096,7 +1125,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(avctx->extradata_size > 0 && avctx->extradata &&
|
if(avctx->extradata_size > 0 && avctx->extradata &&
|
||||||
ff_h264_decode_extradata(h))
|
ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
|
if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
|
||||||
@@ -1165,7 +1194,10 @@ static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContex
|
|||||||
memcpy(&h->s + 1, &h1->s + 1, sizeof(H264Context) - sizeof(MpegEncContext)); //copy all fields after MpegEnc
|
memcpy(&h->s + 1, &h1->s + 1, sizeof(H264Context) - sizeof(MpegEncContext)); //copy all fields after MpegEnc
|
||||||
memset(h->sps_buffers, 0, sizeof(h->sps_buffers));
|
memset(h->sps_buffers, 0, sizeof(h->sps_buffers));
|
||||||
memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
|
memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
|
||||||
ff_h264_alloc_tables(h);
|
if (ff_h264_alloc_tables(h) < 0) {
|
||||||
|
av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n");
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
context_init(h);
|
context_init(h);
|
||||||
|
|
||||||
for(i=0; i<2; i++){
|
for(i=0; i<2; i++){
|
||||||
@@ -1403,7 +1435,7 @@ static void decode_postinit(H264Context *h, int setup_finished){
|
|||||||
pics = 0;
|
pics = 0;
|
||||||
while(h->delayed_pic[pics]) pics++;
|
while(h->delayed_pic[pics]) pics++;
|
||||||
|
|
||||||
assert(pics <= MAX_DELAYED_PIC_COUNT);
|
av_assert0(pics <= MAX_DELAYED_PIC_COUNT);
|
||||||
|
|
||||||
h->delayed_pic[pics++] = cur;
|
h->delayed_pic[pics++] = cur;
|
||||||
if(cur->reference == 0)
|
if(cur->reference == 0)
|
||||||
@@ -1682,7 +1714,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_ty
|
|||||||
uint64_t tr_high;
|
uint64_t tr_high;
|
||||||
if(dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED){
|
if(dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED){
|
||||||
const int topright_avail= (h->topright_samples_available<<i)&0x8000;
|
const int topright_avail= (h->topright_samples_available<<i)&0x8000;
|
||||||
assert(mb_y || linesize <= block_offset[i]);
|
assert(s->mb_y || linesize <= block_offset[i]);
|
||||||
if(!topright_avail){
|
if(!topright_avail){
|
||||||
if (pixel_shift) {
|
if (pixel_shift) {
|
||||||
tr_high= ((uint16_t*)ptr)[3 - linesize/2]*0x0001000100010001ULL;
|
tr_high= ((uint16_t*)ptr)[3 - linesize/2]*0x0001000100010001ULL;
|
||||||
@@ -1848,15 +1880,30 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
|
|||||||
tmp_y[j] = get_bits(&gb, bit_depth);
|
tmp_y[j] = get_bits(&gb, bit_depth);
|
||||||
}
|
}
|
||||||
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
|
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
|
||||||
for (i = 0; i < 8; i++) {
|
if (!h->sps.chroma_format_idc) {
|
||||||
uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize);
|
for (i = 0; i < 8; i++) {
|
||||||
for (j = 0; j < 8; j++)
|
uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize);
|
||||||
tmp_cb[j] = get_bits(&gb, bit_depth);
|
for (j = 0; j < 8; j++) {
|
||||||
}
|
tmp_cb[j] = 1 << (bit_depth - 1);
|
||||||
for (i = 0; i < 8; i++) {
|
}
|
||||||
uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize);
|
}
|
||||||
for (j = 0; j < 8; j++)
|
for (i = 0; i < 8; i++) {
|
||||||
tmp_cr[j] = get_bits(&gb, bit_depth);
|
uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize);
|
||||||
|
for (j = 0; j < 8; j++) {
|
||||||
|
tmp_cr[j] = 1 << (bit_depth - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize);
|
||||||
|
for (j = 0; j < 8; j++)
|
||||||
|
tmp_cb[j] = get_bits(&gb, bit_depth);
|
||||||
|
}
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize);
|
||||||
|
for (j = 0; j < 8; j++)
|
||||||
|
tmp_cr[j] = get_bits(&gb, bit_depth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1864,9 +1911,16 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
|
|||||||
memcpy(dest_y + i* linesize, h->mb + i*8, 16);
|
memcpy(dest_y + i* linesize, h->mb + i*8, 16);
|
||||||
}
|
}
|
||||||
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
|
if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
|
||||||
for (i=0; i<8; i++) {
|
if (!h->sps.chroma_format_idc) {
|
||||||
memcpy(dest_cb+ i*uvlinesize, h->mb + 128 + i*4, 8);
|
for (i = 0; i < 8; i++) {
|
||||||
memcpy(dest_cr+ i*uvlinesize, h->mb + 160 + i*4, 8);
|
memset(dest_cb + i*uvlinesize, 128, 8);
|
||||||
|
memset(dest_cr + i*uvlinesize, 128, 8);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < 8; i++) {
|
||||||
|
memcpy(dest_cb + i*uvlinesize, h->mb + 128 + i*4, 8);
|
||||||
|
memcpy(dest_cr + i*uvlinesize, h->mb + 160 + i*4, 8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2198,15 +2252,17 @@ static void implicit_weight_table(H264Context *h, int field){
|
|||||||
for(ref0=ref_start; ref0 < ref_count0; ref0++){
|
for(ref0=ref_start; ref0 < ref_count0; ref0++){
|
||||||
int poc0 = h->ref_list[0][ref0].poc;
|
int poc0 = h->ref_list[0][ref0].poc;
|
||||||
for(ref1=ref_start; ref1 < ref_count1; ref1++){
|
for(ref1=ref_start; ref1 < ref_count1; ref1++){
|
||||||
int poc1 = h->ref_list[1][ref1].poc;
|
int w = 32;
|
||||||
int td = av_clip(poc1 - poc0, -128, 127);
|
if (!h->ref_list[0][ref0].long_ref && !h->ref_list[1][ref1].long_ref) {
|
||||||
int w= 32;
|
int poc1 = h->ref_list[1][ref1].poc;
|
||||||
if(td){
|
int td = av_clip(poc1 - poc0, -128, 127);
|
||||||
int tb = av_clip(cur_poc - poc0, -128, 127);
|
if(td){
|
||||||
int tx = (16384 + (FFABS(td) >> 1)) / td;
|
int tb = av_clip(cur_poc - poc0, -128, 127);
|
||||||
int dist_scale_factor = (tb*tx + 32) >> 8;
|
int tx = (16384 + (FFABS(td) >> 1)) / td;
|
||||||
if(dist_scale_factor >= -64 && dist_scale_factor <= 128)
|
int dist_scale_factor = (tb*tx + 32) >> 8;
|
||||||
w = 64 - dist_scale_factor;
|
if(dist_scale_factor >= -64 && dist_scale_factor <= 128)
|
||||||
|
w = 64 - dist_scale_factor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(field<0){
|
if(field<0){
|
||||||
h->implicit_weight[ref0][ref1][0]=
|
h->implicit_weight[ref0][ref1][0]=
|
||||||
@@ -2233,7 +2289,7 @@ static void idr(H264Context *h){
|
|||||||
static void flush_dpb(AVCodecContext *avctx){
|
static void flush_dpb(AVCodecContext *avctx){
|
||||||
H264Context *h= avctx->priv_data;
|
H264Context *h= avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<MAX_DELAYED_PIC_COUNT; i++) {
|
for(i=0; i<=MAX_DELAYED_PIC_COUNT; i++) {
|
||||||
if(h->delayed_pic[i])
|
if(h->delayed_pic[i])
|
||||||
h->delayed_pic[i]->reference= 0;
|
h->delayed_pic[i]->reference= 0;
|
||||||
h->delayed_pic[i]= NULL;
|
h->delayed_pic[i]= NULL;
|
||||||
@@ -2488,7 +2544,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
|||||||
|
|
||||||
s->dropable= h->nal_ref_idc == 0;
|
s->dropable= h->nal_ref_idc == 0;
|
||||||
|
|
||||||
if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc){
|
/* FIXME: 2tap qpel isn't implemented for high bit depth. */
|
||||||
|
if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc && !h->pixel_shift){
|
||||||
s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
|
s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
|
||||||
s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
|
s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
|
||||||
}else{
|
}else{
|
||||||
@@ -2637,7 +2694,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
|||||||
h->prev_interlaced_frame = 1;
|
h->prev_interlaced_frame = 1;
|
||||||
|
|
||||||
init_scan_tables(h);
|
init_scan_tables(h);
|
||||||
ff_h264_alloc_tables(h);
|
if (ff_h264_alloc_tables(h) < 0) {
|
||||||
|
av_log(h->s.avctx, AV_LOG_ERROR, "Could not allocate memory for h264\n");
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_SLICE)) {
|
if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_SLICE)) {
|
||||||
if (context_init(h) < 0) {
|
if (context_init(h) < 0) {
|
||||||
@@ -2833,6 +2893,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
|||||||
h->ref_count[1]= h->pps.ref_count[1];
|
h->ref_count[1]= h->pps.ref_count[1];
|
||||||
|
|
||||||
if(h->slice_type_nos != AV_PICTURE_TYPE_I){
|
if(h->slice_type_nos != AV_PICTURE_TYPE_I){
|
||||||
|
unsigned max= (16<<(s->picture_structure != PICT_FRAME))-1;
|
||||||
if(h->slice_type_nos == AV_PICTURE_TYPE_B){
|
if(h->slice_type_nos == AV_PICTURE_TYPE_B){
|
||||||
h->direct_spatial_mv_pred= get_bits1(&s->gb);
|
h->direct_spatial_mv_pred= get_bits1(&s->gb);
|
||||||
}
|
}
|
||||||
@@ -2843,25 +2904,27 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
|||||||
if(h->slice_type_nos==AV_PICTURE_TYPE_B)
|
if(h->slice_type_nos==AV_PICTURE_TYPE_B)
|
||||||
h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
|
h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
|
||||||
|
|
||||||
if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
|
}
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
|
if(h->ref_count[0]-1 > max || h->ref_count[1]-1 > max){
|
||||||
h->ref_count[0]= h->ref_count[1]= 1;
|
av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
|
||||||
return -1;
|
h->ref_count[0]= h->ref_count[1]= 1;
|
||||||
}
|
return -1;
|
||||||
}
|
}
|
||||||
if(h->slice_type_nos == AV_PICTURE_TYPE_B)
|
if(h->slice_type_nos == AV_PICTURE_TYPE_B)
|
||||||
h->list_count= 2;
|
h->list_count= 2;
|
||||||
else
|
else
|
||||||
h->list_count= 1;
|
h->list_count= 1;
|
||||||
}else
|
}else
|
||||||
h->list_count= 0;
|
h->ref_count[1]= h->ref_count[0]= h->list_count= 0;
|
||||||
|
|
||||||
if(!default_ref_list_done){
|
if(!default_ref_list_done){
|
||||||
ff_h264_fill_default_ref_list(h);
|
ff_h264_fill_default_ref_list(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0)
|
if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) {
|
||||||
|
h->ref_count[1]= h->ref_count[0]= 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
|
if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
|
||||||
s->last_picture_ptr= &h->ref_list[0][0];
|
s->last_picture_ptr= &h->ref_list[0][0];
|
||||||
@@ -3303,8 +3366,8 @@ static void loop_filter(H264Context *h, int start_x, int end_x){
|
|||||||
uvlinesize = h->mb_uvlinesize = s->uvlinesize * 2;
|
uvlinesize = h->mb_uvlinesize = s->uvlinesize * 2;
|
||||||
if(mb_y&1){ //FIXME move out of this function?
|
if(mb_y&1){ //FIXME move out of this function?
|
||||||
dest_y -= s->linesize*15;
|
dest_y -= s->linesize*15;
|
||||||
dest_cb-= s->uvlinesize*7;
|
dest_cb-= s->uvlinesize*((8 << CHROMA444)-1);
|
||||||
dest_cr-= s->uvlinesize*7;
|
dest_cr-= s->uvlinesize*((8 << CHROMA444)-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
linesize = h->mb_linesize = s->linesize;
|
linesize = h->mb_linesize = s->linesize;
|
||||||
@@ -3667,7 +3730,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
|||||||
s->workaround_bugs |= FF_BUG_TRUNCATED;
|
s->workaround_bugs |= FF_BUG_TRUNCATED;
|
||||||
|
|
||||||
if(!(s->workaround_bugs & FF_BUG_TRUNCATED)){
|
if(!(s->workaround_bugs & FF_BUG_TRUNCATED)){
|
||||||
while(ptr[dst_length - 1] == 0 && dst_length > 0)
|
while(dst_length > 0 && ptr[dst_length - 1] == 0)
|
||||||
dst_length--;
|
dst_length--;
|
||||||
}
|
}
|
||||||
bit_length= !dst_length ? 0 : (8*dst_length - ff_h264_decode_rbsp_trailing(h, ptr + dst_length - 1));
|
bit_length= !dst_length ? 0 : (8*dst_length - ff_h264_decode_rbsp_trailing(h, ptr + dst_length - 1));
|
||||||
@@ -3698,7 +3761,11 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//FIXME do not discard SEI id
|
//FIXME do not discard SEI id
|
||||||
if(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)
|
if(
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
(s->hurry_up == 1 && h->nal_ref_idc == 0) ||
|
||||||
|
#endif
|
||||||
|
(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
@@ -3735,6 +3802,9 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(hx->redundant_pic_count==0
|
if(hx->redundant_pic_count==0
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
&& hx->s.hurry_up < 5
|
||||||
|
#endif
|
||||||
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
|
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
|
||||||
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
|
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
|
||||||
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
|
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
|
||||||
@@ -3772,6 +3842,9 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
|||||||
|
|
||||||
if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
|
if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
|
||||||
&& s->context_initialized
|
&& s->context_initialized
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
&& s->hurry_up < 5
|
||||||
|
#endif
|
||||||
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
|
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
|
||||||
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
|
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
|
||||||
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
|
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
|
||||||
@@ -3910,7 +3983,11 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
|
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
|
||||||
if (avctx->skip_frame >= AVDISCARD_NONREF)
|
if (avctx->skip_frame >= AVDISCARD_NONREF
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
|| s->hurry_up
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return 0;
|
return 0;
|
||||||
av_log(avctx, AV_LOG_ERROR, "no frame!\n");
|
av_log(avctx, AV_LOG_ERROR, "no frame!\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
#define MAX_DELAYED_PIC_COUNT 16
|
#define MAX_DELAYED_PIC_COUNT 16
|
||||||
|
|
||||||
|
#define MAX_MBPAIR_SIZE (256*1024) // a tighter bound could be calculated if someone cares about a few bytes
|
||||||
|
|
||||||
/* Compiling in interlaced support reduces the speed
|
/* Compiling in interlaced support reduces the speed
|
||||||
* of progressive decoding by about 2%. */
|
* of progressive decoding by about 2%. */
|
||||||
#define ALLOW_INTERLACE
|
#define ALLOW_INTERLACE
|
||||||
@@ -99,7 +101,7 @@
|
|||||||
*/
|
*/
|
||||||
#define DELAYED_PIC_REF 4
|
#define DELAYED_PIC_REF 4
|
||||||
|
|
||||||
#define QP_MAX_NUM (51 + 2*6) // The maximum supported qp
|
#define QP_MAX_NUM (51 + 4*6) // The maximum supported qp
|
||||||
|
|
||||||
/* NAL unit types */
|
/* NAL unit types */
|
||||||
enum {
|
enum {
|
||||||
@@ -507,7 +509,7 @@ typedef struct H264Context{
|
|||||||
int cabac_init_idc;
|
int cabac_init_idc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup multithreading Members for slice based multithreading
|
* @name Members for slice based multithreading
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
struct H264Context *thread_context[MAX_THREADS];
|
struct H264Context *thread_context[MAX_THREADS];
|
||||||
@@ -582,7 +584,7 @@ typedef struct H264Context{
|
|||||||
}H264Context;
|
}H264Context;
|
||||||
|
|
||||||
|
|
||||||
extern const uint8_t ff_h264_chroma_qp[3][QP_MAX_NUM+1]; ///< One chroma qp table for each supported bit depth (8, 9, 10).
|
extern const uint8_t ff_h264_chroma_qp[5][QP_MAX_NUM+1]; ///< One chroma qp table for each possible bit depth (8-12).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode SEI
|
* Decode SEI
|
||||||
@@ -656,12 +658,17 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h);
|
|||||||
/**
|
/**
|
||||||
* Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
|
* Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
|
||||||
*/
|
*/
|
||||||
int ff_h264_check_intra_pred_mode(H264Context *h, int mode);
|
int ff_h264_check_intra16x16_pred_mode(H264Context *h, int mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
|
||||||
|
*/
|
||||||
|
int ff_h264_check_intra_chroma_pred_mode(H264Context *h, int mode);
|
||||||
|
|
||||||
void ff_h264_write_back_intra_pred_mode(H264Context *h);
|
void ff_h264_write_back_intra_pred_mode(H264Context *h);
|
||||||
void ff_h264_hl_decode_mb(H264Context *h);
|
void ff_h264_hl_decode_mb(H264Context *h);
|
||||||
int ff_h264_frame_start(H264Context *h);
|
int ff_h264_frame_start(H264Context *h);
|
||||||
int ff_h264_decode_extradata(H264Context *h);
|
int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size);
|
||||||
av_cold int ff_h264_decode_init(AVCodecContext *avctx);
|
av_cold int ff_h264_decode_init(AVCodecContext *avctx);
|
||||||
av_cold int ff_h264_decode_end(AVCodecContext *avctx);
|
av_cold int ff_h264_decode_end(AVCodecContext *avctx);
|
||||||
av_cold void ff_h264_decode_init_vlc(void);
|
av_cold void ff_h264_decode_init_vlc(void);
|
||||||
|
@@ -2003,14 +2003,14 @@ decode_intra_mb:
|
|||||||
ff_h264_write_back_intra_pred_mode(h);
|
ff_h264_write_back_intra_pred_mode(h);
|
||||||
if( ff_h264_check_intra4x4_pred_mode(h) < 0 ) return -1;
|
if( ff_h264_check_intra4x4_pred_mode(h) < 0 ) return -1;
|
||||||
} else {
|
} else {
|
||||||
h->intra16x16_pred_mode= ff_h264_check_intra_pred_mode( h, h->intra16x16_pred_mode );
|
h->intra16x16_pred_mode= ff_h264_check_intra16x16_pred_mode( h, h->intra16x16_pred_mode );
|
||||||
if( h->intra16x16_pred_mode < 0 ) return -1;
|
if( h->intra16x16_pred_mode < 0 ) return -1;
|
||||||
}
|
}
|
||||||
if(decode_chroma){
|
if(decode_chroma){
|
||||||
h->chroma_pred_mode_table[mb_xy] =
|
h->chroma_pred_mode_table[mb_xy] =
|
||||||
pred_mode = decode_cabac_mb_chroma_pre_mode( h );
|
pred_mode = decode_cabac_mb_chroma_pre_mode( h );
|
||||||
|
|
||||||
pred_mode= ff_h264_check_intra_pred_mode( h, pred_mode );
|
pred_mode= ff_h264_check_intra_chroma_pred_mode( h, pred_mode );
|
||||||
if( pred_mode < 0 ) return -1;
|
if( pred_mode < 0 ) return -1;
|
||||||
h->chroma_pred_mode= pred_mode;
|
h->chroma_pred_mode= pred_mode;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -735,12 +735,12 @@ decode_intra_mb:
|
|||||||
if( ff_h264_check_intra4x4_pred_mode(h) < 0)
|
if( ff_h264_check_intra4x4_pred_mode(h) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}else{
|
}else{
|
||||||
h->intra16x16_pred_mode= ff_h264_check_intra_pred_mode(h, h->intra16x16_pred_mode);
|
h->intra16x16_pred_mode= ff_h264_check_intra16x16_pred_mode(h, h->intra16x16_pred_mode);
|
||||||
if(h->intra16x16_pred_mode < 0)
|
if(h->intra16x16_pred_mode < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(decode_chroma){
|
if(decode_chroma){
|
||||||
pred_mode= ff_h264_check_intra_pred_mode(h, get_ue_golomb_31(&s->gb));
|
pred_mode= ff_h264_check_intra_chroma_pred_mode(h, get_ue_golomb_31(&s->gb));
|
||||||
if(pred_mode < 0)
|
if(pred_mode < 0)
|
||||||
return -1;
|
return -1;
|
||||||
h->chroma_pred_mode= pred_mode;
|
h->chroma_pred_mode= pred_mode;
|
||||||
|
@@ -393,10 +393,10 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
|
|||||||
AV_WN64A(bS, 0x0003000300030003ULL);
|
AV_WN64A(bS, 0x0003000300030003ULL);
|
||||||
} else {
|
} else {
|
||||||
if(!CABAC && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])){
|
if(!CABAC && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])){
|
||||||
bS[0]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+0]);
|
bS[0]= 1+((h->cbp_table[mbn_xy] & 0x4000)||h->non_zero_count_cache[scan8[0]+0]);
|
||||||
bS[1]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+1]);
|
bS[1]= 1+((h->cbp_table[mbn_xy] & 0x4000)||h->non_zero_count_cache[scan8[0]+1]);
|
||||||
bS[2]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+2]);
|
bS[2]= 1+((h->cbp_table[mbn_xy] & 0x8000)||h->non_zero_count_cache[scan8[0]+2]);
|
||||||
bS[3]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+3]);
|
bS[3]= 1+((h->cbp_table[mbn_xy] & 0x8000)||h->non_zero_count_cache[scan8[0]+3]);
|
||||||
}else{
|
}else{
|
||||||
const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 3*4;
|
const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 3*4;
|
||||||
int i;
|
int i;
|
||||||
@@ -635,7 +635,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
|
|||||||
else{
|
else{
|
||||||
bS[i] = 1 + !!(h->non_zero_count_cache[12+8*(i>>1)] |
|
bS[i] = 1 + !!(h->non_zero_count_cache[12+8*(i>>1)] |
|
||||||
((!h->pps.cabac && IS_8x8DCT(mbn_type)) ?
|
((!h->pps.cabac && IS_8x8DCT(mbn_type)) ?
|
||||||
(h->cbp_table[mbn_xy] & ((MB_FIELD ? (i&2) : (mb_y&1)) ? 8 : 2))
|
(h->cbp_table[mbn_xy] & (((MB_FIELD ? (i&2) : (mb_y&1)) ? 8 : 2) << 12))
|
||||||
:
|
:
|
||||||
h->non_zero_count[mbn_xy][ off[i] ]));
|
h->non_zero_count[mbn_xy][ off[i] ]));
|
||||||
}
|
}
|
||||||
@@ -663,19 +663,33 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
|
|||||||
filter_mb_mbaff_edgev ( h, img_y , linesize, bS , 1, qp [0] );
|
filter_mb_mbaff_edgev ( h, img_y , linesize, bS , 1, qp [0] );
|
||||||
filter_mb_mbaff_edgev ( h, img_y + 8* linesize, linesize, bS+4, 1, qp [1] );
|
filter_mb_mbaff_edgev ( h, img_y + 8* linesize, linesize, bS+4, 1, qp [1] );
|
||||||
if (chroma){
|
if (chroma){
|
||||||
filter_mb_mbaff_edgecv( h, img_cb, uvlinesize, bS , 1, bqp[0] );
|
if (CHROMA444) {
|
||||||
filter_mb_mbaff_edgecv( h, img_cb + 4*uvlinesize, uvlinesize, bS+4, 1, bqp[1] );
|
filter_mb_mbaff_edgev ( h, img_cb, uvlinesize, bS , 1, bqp[0] );
|
||||||
filter_mb_mbaff_edgecv( h, img_cr, uvlinesize, bS , 1, rqp[0] );
|
filter_mb_mbaff_edgev ( h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1] );
|
||||||
filter_mb_mbaff_edgecv( h, img_cr + 4*uvlinesize, uvlinesize, bS+4, 1, rqp[1] );
|
filter_mb_mbaff_edgev ( h, img_cr, uvlinesize, bS , 1, rqp[0] );
|
||||||
|
filter_mb_mbaff_edgev ( h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1] );
|
||||||
|
}else{
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cb, uvlinesize, bS , 1, bqp[0] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cb + 4*uvlinesize, uvlinesize, bS+4, 1, bqp[1] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cr, uvlinesize, bS , 1, rqp[0] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cr + 4*uvlinesize, uvlinesize, bS+4, 1, rqp[1] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
filter_mb_mbaff_edgev ( h, img_y , 2* linesize, bS , 2, qp [0] );
|
filter_mb_mbaff_edgev ( h, img_y , 2* linesize, bS , 2, qp [0] );
|
||||||
filter_mb_mbaff_edgev ( h, img_y + linesize, 2* linesize, bS+1, 2, qp [1] );
|
filter_mb_mbaff_edgev ( h, img_y + linesize, 2* linesize, bS+1, 2, qp [1] );
|
||||||
if (chroma){
|
if (chroma){
|
||||||
filter_mb_mbaff_edgecv( h, img_cb, 2*uvlinesize, bS , 2, bqp[0] );
|
if (CHROMA444) {
|
||||||
filter_mb_mbaff_edgecv( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1] );
|
filter_mb_mbaff_edgev ( h, img_cb, 2*uvlinesize, bS , 2, bqp[0] );
|
||||||
filter_mb_mbaff_edgecv( h, img_cr, 2*uvlinesize, bS , 2, rqp[0] );
|
filter_mb_mbaff_edgev ( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1] );
|
||||||
filter_mb_mbaff_edgecv( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1] );
|
filter_mb_mbaff_edgev ( h, img_cr, 2*uvlinesize, bS , 2, rqp[0] );
|
||||||
|
filter_mb_mbaff_edgev ( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1] );
|
||||||
|
}else{
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cb, 2*uvlinesize, bS , 2, bqp[0] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cr, 2*uvlinesize, bS , 2, rqp[0] );
|
||||||
|
filter_mb_mbaff_edgecv( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -251,7 +251,7 @@ static int h264_parse(AVCodecParserContext *s,
|
|||||||
h->got_first = 1;
|
h->got_first = 1;
|
||||||
if (avctx->extradata_size) {
|
if (avctx->extradata_size) {
|
||||||
h->s.avctx = avctx;
|
h->s.avctx = avctx;
|
||||||
ff_h264_decode_extradata(h);
|
ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ static const AVRational pixel_aspect[17]={
|
|||||||
QP(37,d), QP(37,d), QP(37,d), QP(38,d), QP(38,d), QP(38,d),\
|
QP(37,d), QP(37,d), QP(37,d), QP(38,d), QP(38,d), QP(38,d),\
|
||||||
QP(39,d), QP(39,d), QP(39,d), QP(39,d)
|
QP(39,d), QP(39,d), QP(39,d), QP(39,d)
|
||||||
|
|
||||||
const uint8_t ff_h264_chroma_qp[3][QP_MAX_NUM+1] = {
|
const uint8_t ff_h264_chroma_qp[5][QP_MAX_NUM+1] = {
|
||||||
{
|
{
|
||||||
CHROMA_QP_TABLE_END(8)
|
CHROMA_QP_TABLE_END(8)
|
||||||
},
|
},
|
||||||
@@ -83,6 +83,19 @@ const uint8_t ff_h264_chroma_qp[3][QP_MAX_NUM+1] = {
|
|||||||
6, 7, 8, 9, 10, 11,
|
6, 7, 8, 9, 10, 11,
|
||||||
CHROMA_QP_TABLE_END(10)
|
CHROMA_QP_TABLE_END(10)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
0, 1, 2, 3, 4, 5,
|
||||||
|
6, 7, 8, 9, 10, 11,
|
||||||
|
12,13,14,15, 16, 17,
|
||||||
|
CHROMA_QP_TABLE_END(11)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 1, 2, 3, 4, 5,
|
||||||
|
6, 7, 8, 9, 10, 11,
|
||||||
|
12,13,14,15, 16, 17,
|
||||||
|
18,19,20,21, 22, 23,
|
||||||
|
CHROMA_QP_TABLE_END(12)
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t default_scaling4[2][16]={
|
static const uint8_t default_scaling4[2][16]={
|
||||||
@@ -281,12 +294,12 @@ static void decode_scaling_matrices(H264Context *h, SPS *sps, PPS *pps, int is_s
|
|||||||
decode_scaling_list(h,scaling_matrix4[5],16,default_scaling4[1],scaling_matrix4[4]); // Inter, Cb
|
decode_scaling_list(h,scaling_matrix4[5],16,default_scaling4[1],scaling_matrix4[4]); // Inter, Cb
|
||||||
if(is_sps || pps->transform_8x8_mode){
|
if(is_sps || pps->transform_8x8_mode){
|
||||||
decode_scaling_list(h,scaling_matrix8[0],64,default_scaling8[0],fallback[2]); // Intra, Y
|
decode_scaling_list(h,scaling_matrix8[0],64,default_scaling8[0],fallback[2]); // Intra, Y
|
||||||
if(h->sps.chroma_format_idc == 3){
|
if(sps->chroma_format_idc == 3){
|
||||||
decode_scaling_list(h,scaling_matrix8[1],64,default_scaling8[0],scaling_matrix8[0]); // Intra, Cr
|
decode_scaling_list(h,scaling_matrix8[1],64,default_scaling8[0],scaling_matrix8[0]); // Intra, Cr
|
||||||
decode_scaling_list(h,scaling_matrix8[2],64,default_scaling8[0],scaling_matrix8[1]); // Intra, Cb
|
decode_scaling_list(h,scaling_matrix8[2],64,default_scaling8[0],scaling_matrix8[1]); // Intra, Cb
|
||||||
}
|
}
|
||||||
decode_scaling_list(h,scaling_matrix8[3],64,default_scaling8[1],fallback[3]); // Inter, Y
|
decode_scaling_list(h,scaling_matrix8[3],64,default_scaling8[1],fallback[3]); // Inter, Y
|
||||||
if(h->sps.chroma_format_idc == 3){
|
if(sps->chroma_format_idc == 3){
|
||||||
decode_scaling_list(h,scaling_matrix8[4],64,default_scaling8[1],scaling_matrix8[3]); // Inter, Cr
|
decode_scaling_list(h,scaling_matrix8[4],64,default_scaling8[1],scaling_matrix8[3]); // Inter, Cr
|
||||||
decode_scaling_list(h,scaling_matrix8[5],64,default_scaling8[1],scaling_matrix8[4]); // Inter, Cb
|
decode_scaling_list(h,scaling_matrix8[5],64,default_scaling8[1],scaling_matrix8[4]); // Inter, Cb
|
||||||
}
|
}
|
||||||
@@ -333,6 +346,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||||||
sps->residual_color_transform_flag = get_bits1(&s->gb);
|
sps->residual_color_transform_flag = get_bits1(&s->gb);
|
||||||
sps->bit_depth_luma = get_ue_golomb(&s->gb) + 8;
|
sps->bit_depth_luma = get_ue_golomb(&s->gb) + 8;
|
||||||
sps->bit_depth_chroma = get_ue_golomb(&s->gb) + 8;
|
sps->bit_depth_chroma = get_ue_golomb(&s->gb) + 8;
|
||||||
|
if (sps->bit_depth_luma > 12U || sps->bit_depth_chroma > 12U) {
|
||||||
|
av_log(h->s.avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n",
|
||||||
|
sps->bit_depth_luma, sps->bit_depth_chroma);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
sps->transform_bypass = get_bits1(&s->gb);
|
sps->transform_bypass = get_bits1(&s->gb);
|
||||||
decode_scaling_matrices(h, sps, NULL, 1, sps->scaling_matrix4, sps->scaling_matrix8);
|
decode_scaling_matrices(h, sps, NULL, 1, sps->scaling_matrix4, sps->scaling_matrix8);
|
||||||
}else{
|
}else{
|
||||||
@@ -365,7 +383,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||||||
}
|
}
|
||||||
|
|
||||||
sps->ref_frame_count= get_ue_golomb_31(&s->gb);
|
sps->ref_frame_count= get_ue_golomb_31(&s->gb);
|
||||||
if(sps->ref_frame_count > MAX_PICTURE_COUNT-2 || sps->ref_frame_count >= 32U){
|
if(sps->ref_frame_count > MAX_PICTURE_COUNT-2 || sps->ref_frame_count > 16U){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "too many reference frames\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "too many reference frames\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -396,6 +414,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||||||
#endif
|
#endif
|
||||||
sps->crop= get_bits1(&s->gb);
|
sps->crop= get_bits1(&s->gb);
|
||||||
if(sps->crop){
|
if(sps->crop){
|
||||||
|
int crop_limit = sps->chroma_format_idc == 3 ? 16 : 8;
|
||||||
sps->crop_left = get_ue_golomb(&s->gb);
|
sps->crop_left = get_ue_golomb(&s->gb);
|
||||||
sps->crop_right = get_ue_golomb(&s->gb);
|
sps->crop_right = get_ue_golomb(&s->gb);
|
||||||
sps->crop_top = get_ue_golomb(&s->gb);
|
sps->crop_top = get_ue_golomb(&s->gb);
|
||||||
@@ -403,7 +422,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||||||
if(sps->crop_left || sps->crop_top){
|
if(sps->crop_left || sps->crop_top){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ...\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ...\n");
|
||||||
}
|
}
|
||||||
if(sps->crop_right >= (8<<CHROMA444) || sps->crop_bottom >= (8<<CHROMA444)){
|
if(sps->crop_right >= crop_limit || sps->crop_bottom >= crop_limit){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@@ -301,7 +301,7 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h){
|
|||||||
|
|
||||||
void ff_h264_fill_mbaff_ref_list(H264Context *h){
|
void ff_h264_fill_mbaff_ref_list(H264Context *h){
|
||||||
int list, i, j;
|
int list, i, j;
|
||||||
for(list=0; list<2; list++){ //FIXME try list_count
|
for(list=0; list<h->list_count; list++){
|
||||||
for(i=0; i<h->ref_count[list]; i++){
|
for(i=0; i<h->ref_count[list]; i++){
|
||||||
Picture *frame = &h->ref_list[list][i];
|
Picture *frame = &h->ref_list[list][i];
|
||||||
Picture *field = &h->ref_list[list][16+2*i];
|
Picture *field = &h->ref_list[list][16+2*i];
|
||||||
@@ -678,7 +678,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb){
|
|||||||
}
|
}
|
||||||
if(opcode==MMCO_SHORT2LONG || opcode==MMCO_LONG2UNUSED || opcode==MMCO_LONG || opcode==MMCO_SET_MAX_LONG){
|
if(opcode==MMCO_SHORT2LONG || opcode==MMCO_LONG2UNUSED || opcode==MMCO_LONG || opcode==MMCO_SET_MAX_LONG){
|
||||||
unsigned int long_arg= get_ue_golomb_31(gb);
|
unsigned int long_arg= get_ue_golomb_31(gb);
|
||||||
if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){
|
if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "illegal long ref in memory management control operation %d\n", opcode);
|
av_log(h->s.avctx, AV_LOG_ERROR, "illegal long ref in memory management control operation %d\n", opcode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -237,7 +237,6 @@ void FUNCC(ff_h264_idct_add8)(uint8_t **dest, const int *block_offset, DCTELEM *
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* IDCT transforms the 16 dc values and dequantizes them.
|
* IDCT transforms the 16 dc values and dequantizes them.
|
||||||
* @param qp quantization parameter
|
|
||||||
*/
|
*/
|
||||||
void FUNCC(ff_h264_luma_dc_dequant_idct)(DCTELEM *p_output, DCTELEM *p_input, int qmul){
|
void FUNCC(ff_h264_luma_dc_dequant_idct)(DCTELEM *p_output, DCTELEM *p_input, int qmul){
|
||||||
#define stride 16
|
#define stride 16
|
||||||
|
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Libav.
|
||||||
|
*
|
||||||
|
* Libav 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.
|
||||||
|
*
|
||||||
|
* Libav 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 Libav; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
|
|
||||||
#ifndef BIT_DEPTH
|
#ifndef BIT_DEPTH
|
||||||
|
@@ -72,7 +72,6 @@ typedef struct IdcinContext {
|
|||||||
hnode huff_nodes[256][HUF_TOKENS*2];
|
hnode huff_nodes[256][HUF_TOKENS*2];
|
||||||
int num_huff_nodes[256];
|
int num_huff_nodes[256];
|
||||||
|
|
||||||
uint32_t pal[256];
|
|
||||||
} IdcinContext;
|
} IdcinContext;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -215,7 +214,7 @@ static int idcin_decode_frame(AVCodecContext *avctx,
|
|||||||
const uint8_t *buf = avpkt->data;
|
const uint8_t *buf = avpkt->data;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
IdcinContext *s = avctx->priv_data;
|
IdcinContext *s = avctx->priv_data;
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
|
AVPaletteControl *palette_control = avctx->palctrl;
|
||||||
|
|
||||||
s->buf = buf;
|
s->buf = buf;
|
||||||
s->size = buf_size;
|
s->size = buf_size;
|
||||||
@@ -230,12 +229,13 @@ static int idcin_decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
idcin_decode_vlcs(s);
|
idcin_decode_vlcs(s);
|
||||||
|
|
||||||
if (pal) {
|
|
||||||
s->frame.palette_has_changed = 1;
|
|
||||||
memcpy(s->pal, pal, AVPALETTE_SIZE);
|
|
||||||
}
|
|
||||||
/* make the palette available on the way out */
|
/* make the palette available on the way out */
|
||||||
memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE);
|
memcpy(s->frame.data[1], palette_control->palette, PALETTE_COUNT * 4);
|
||||||
|
/* If palette changed inform application*/
|
||||||
|
if (palette_control->palette_changed) {
|
||||||
|
palette_control->palette_changed = 0;
|
||||||
|
s->frame.palette_has_changed = 1;
|
||||||
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
*data_size = sizeof(AVFrame);
|
||||||
*(AVFrame*)data = s->frame;
|
*(AVFrame*)data = s->frame;
|
||||||
|
@@ -424,11 +424,40 @@ const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
enum PixelFormat avcodec_get_pix_fmt(const char *name)
|
||||||
|
{
|
||||||
|
return av_get_pix_fmt(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt)
|
||||||
|
{
|
||||||
|
av_get_pix_fmt_string(buf, buf_size, pix_fmt);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt)
|
int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt)
|
||||||
{
|
{
|
||||||
return av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL;
|
return av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){
|
||||||
|
return ff_set_systematic_pal2(pal, pix_fmt);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ff_fill_linesize(AVPicture *picture, enum PixelFormat pix_fmt, int width)
|
||||||
|
{
|
||||||
|
return av_image_fill_linesizes(picture->linesize, pix_fmt, width);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt,
|
||||||
|
int height)
|
||||||
|
{
|
||||||
|
return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int avpicture_fill(AVPicture *picture, uint8_t *ptr,
|
int avpicture_fill(AVPicture *picture, uint8_t *ptr,
|
||||||
enum PixelFormat pix_fmt, int width, int height)
|
enum PixelFormat pix_fmt, int width, int height)
|
||||||
{
|
{
|
||||||
@@ -663,6 +692,28 @@ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelForma
|
|||||||
return dst_pix_fmt;
|
return dst_pix_fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 53
|
||||||
|
void ff_img_copy_plane(uint8_t *dst, int dst_wrap,
|
||||||
|
const uint8_t *src, int src_wrap,
|
||||||
|
int width, int height)
|
||||||
|
{
|
||||||
|
av_image_copy_plane(dst, dst_wrap, src, src_wrap, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane)
|
||||||
|
{
|
||||||
|
return av_image_get_linesize(pix_fmt, width, plane);
|
||||||
|
}
|
||||||
|
|
||||||
|
void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
|
||||||
|
uint8_t *src_data[4], int src_linesize[4],
|
||||||
|
enum PixelFormat pix_fmt, int width, int height)
|
||||||
|
{
|
||||||
|
av_image_copy(dst_data, dst_linesize, src_data, src_linesize,
|
||||||
|
pix_fmt, width, height);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void av_picture_copy(AVPicture *dst, const AVPicture *src,
|
void av_picture_copy(AVPicture *dst, const AVPicture *src,
|
||||||
enum PixelFormat pix_fmt, int width, int height)
|
enum PixelFormat pix_fmt, int width, int height)
|
||||||
{
|
{
|
||||||
|
@@ -153,6 +153,13 @@ static int ir2_decode_frame(AVCodecContext *avctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start = 48; /* hardcoded for now */
|
||||||
|
|
||||||
|
if (start >= buf_size) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "input buffer size too small (%d)\n", buf_size);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
s->decode_delta = buf[18];
|
s->decode_delta = buf[18];
|
||||||
|
|
||||||
/* decide whether frame uses deltas or not */
|
/* decide whether frame uses deltas or not */
|
||||||
@@ -160,9 +167,8 @@ static int ir2_decode_frame(AVCodecContext *avctx,
|
|||||||
for (i = 0; i < buf_size; i++)
|
for (i = 0; i < buf_size; i++)
|
||||||
buf[i] = av_reverse[buf[i]];
|
buf[i] = av_reverse[buf[i]];
|
||||||
#endif
|
#endif
|
||||||
start = 48; /* hardcoded for now */
|
|
||||||
|
|
||||||
init_get_bits(&s->gb, buf + start, buf_size - start);
|
init_get_bits(&s->gb, buf + start, (buf_size - start) * 8);
|
||||||
|
|
||||||
if (s->decode_delta) { /* intraframe */
|
if (s->decode_delta) { /* intraframe */
|
||||||
ir2_decode_plane(s, avctx->width, avctx->height,
|
ir2_decode_plane(s, avctx->width, avctx->height,
|
||||||
|
@@ -69,7 +69,6 @@ typedef struct IpvideoContext {
|
|||||||
int stride;
|
int stride;
|
||||||
int upper_motion_limit_offset;
|
int upper_motion_limit_offset;
|
||||||
|
|
||||||
uint32_t pal[256];
|
|
||||||
} IpvideoContext;
|
} IpvideoContext;
|
||||||
|
|
||||||
#define CHECK_STREAM_PTR(stream_ptr, stream_end, n) \
|
#define CHECK_STREAM_PTR(stream_ptr, stream_end, n) \
|
||||||
@@ -962,7 +961,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
|
|||||||
|
|
||||||
if (!s->is_16bpp) {
|
if (!s->is_16bpp) {
|
||||||
/* this is PAL8, so make the palette available */
|
/* this is PAL8, so make the palette available */
|
||||||
memcpy(s->current_frame.data[1], s->pal, AVPALETTE_SIZE);
|
memcpy(s->current_frame.data[1], s->avctx->palctrl->palette, PALETTE_COUNT * 4);
|
||||||
|
|
||||||
s->stride = s->current_frame.linesize[0];
|
s->stride = s->current_frame.linesize[0];
|
||||||
s->stream_ptr = s->buf + 14; /* data starts 14 bytes in */
|
s->stream_ptr = s->buf + 14; /* data starts 14 bytes in */
|
||||||
@@ -1016,6 +1015,10 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
s->is_16bpp = avctx->bits_per_coded_sample == 16;
|
s->is_16bpp = avctx->bits_per_coded_sample == 16;
|
||||||
avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
|
avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
|
||||||
|
if (!s->is_16bpp && s->avctx->palctrl == NULL) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, " Interplay video: palette expected.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
dsputil_init(&s->dsp, avctx);
|
dsputil_init(&s->dsp, avctx);
|
||||||
|
|
||||||
@@ -1038,6 +1041,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
const uint8_t *buf = avpkt->data;
|
const uint8_t *buf = avpkt->data;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
IpvideoContext *s = avctx->priv_data;
|
IpvideoContext *s = avctx->priv_data;
|
||||||
|
AVPaletteControl *palette_control = avctx->palctrl;
|
||||||
|
|
||||||
/* compressed buffer needs to be large enough to at least hold an entire
|
/* compressed buffer needs to be large enough to at least hold an entire
|
||||||
* decoding map */
|
* decoding map */
|
||||||
@@ -1054,16 +1058,13 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s->is_16bpp) {
|
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
|
|
||||||
if (pal) {
|
|
||||||
s->current_frame.palette_has_changed = 1;
|
|
||||||
memcpy(s->pal, pal, AVPALETTE_SIZE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ipvideo_decode_opcodes(s);
|
ipvideo_decode_opcodes(s);
|
||||||
|
|
||||||
|
if (!s->is_16bpp && palette_control->palette_changed) {
|
||||||
|
palette_control->palette_changed = 0;
|
||||||
|
s->current_frame.palette_has_changed = 1;
|
||||||
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
*data_size = sizeof(AVFrame);
|
||||||
*(AVFrame*)data = s->current_frame;
|
*(AVFrame*)data = s->current_frame;
|
||||||
|
|
||||||
|
@@ -321,6 +321,8 @@ int ff_j2k_dwt_init(DWTContext *s, uint16_t border[2][2], int decomp_levels, int
|
|||||||
int i, j, lev = decomp_levels, maxlen,
|
int i, j, lev = decomp_levels, maxlen,
|
||||||
b[2][2];
|
b[2][2];
|
||||||
|
|
||||||
|
if (decomp_levels >= FF_DWT_MAX_DECLVLS)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
s->ndeclevels = decomp_levels;
|
s->ndeclevels = decomp_levels;
|
||||||
s->type = type;
|
s->type = type;
|
||||||
|
|
||||||
|
@@ -961,18 +961,20 @@ static int decode_codestream(J2kDecoderContext *s)
|
|||||||
|
|
||||||
static int jp2_find_codestream(J2kDecoderContext *s)
|
static int jp2_find_codestream(J2kDecoderContext *s)
|
||||||
{
|
{
|
||||||
int32_t atom_size;
|
uint32_t atom_size;
|
||||||
int found_codestream = 0, search_range = 10;
|
int found_codestream = 0, search_range = 10;
|
||||||
|
|
||||||
// skip jpeg2k signature atom
|
// skip jpeg2k signature atom
|
||||||
s->buf += 12;
|
s->buf += 12;
|
||||||
|
|
||||||
while(!found_codestream && search_range) {
|
while(!found_codestream && search_range && s->buf_end - s->buf >= 8) {
|
||||||
atom_size = AV_RB32(s->buf);
|
atom_size = AV_RB32(s->buf);
|
||||||
if(AV_RB32(s->buf + 4) == JP2_CODESTREAM) {
|
if(AV_RB32(s->buf + 4) == JP2_CODESTREAM) {
|
||||||
found_codestream = 1;
|
found_codestream = 1;
|
||||||
s->buf += 8;
|
s->buf += 8;
|
||||||
} else {
|
} else {
|
||||||
|
if (s->buf_end - s->buf < atom_size)
|
||||||
|
return 0;
|
||||||
s->buf += atom_size;
|
s->buf += atom_size;
|
||||||
search_range--;
|
search_range--;
|
||||||
}
|
}
|
||||||
@@ -1005,7 +1007,8 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
// check if the image is in jp2 format
|
// check if the image is in jp2 format
|
||||||
if((AV_RB32(s->buf) == 12) && (AV_RB32(s->buf + 4) == JP2_SIG_TYPE) &&
|
if(s->buf_end - s->buf >= 12 &&
|
||||||
|
(AV_RB32(s->buf) == 12) && (AV_RB32(s->buf + 4) == JP2_SIG_TYPE) &&
|
||||||
(AV_RB32(s->buf + 8) == JP2_SIG_VALUE)) {
|
(AV_RB32(s->buf + 8) == JP2_SIG_VALUE)) {
|
||||||
if(!jp2_find_codestream(s)) {
|
if(!jp2_find_codestream(s)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "couldn't find jpeg2k codestream atom\n");
|
av_log(avctx, AV_LOG_ERROR, "couldn't find jpeg2k codestream atom\n");
|
||||||
|
@@ -86,6 +86,8 @@ static inline void ff_jpegls_downscale_state(JLSState *state, int Q){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int ff_jpegls_update_state_regular(JLSState *state, int Q, int err){
|
static inline int ff_jpegls_update_state_regular(JLSState *state, int Q, int err){
|
||||||
|
if(FFABS(err) > 0xFFFF)
|
||||||
|
return -0x10000;
|
||||||
state->A[Q] += FFABS(err);
|
state->A[Q] += FFABS(err);
|
||||||
err *= state->twonear;
|
err *= state->twonear;
|
||||||
state->B[Q] += err;
|
state->B[Q] += err;
|
||||||
|
@@ -150,7 +150,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
if (video_type == 0 || video_type == 1) {
|
if (video_type == 0 || video_type == 1) {
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
init_get_bits(&gb, buf, FFMIN(video_size, buf_end - buf));
|
init_get_bits(&gb, buf, FFMIN(video_size, (buf_end - buf) * 8));
|
||||||
|
|
||||||
for (j = 0; j < avctx->height; j += 8)
|
for (j = 0; j < avctx->height; j += 8)
|
||||||
for (i = 0; i < avctx->width; i += 8)
|
for (i = 0; i < avctx->width; i += 8)
|
||||||
|
@@ -174,6 +174,5 @@ AVCodec ff_kgv1_decoder = {
|
|||||||
NULL,
|
NULL,
|
||||||
decode_end,
|
decode_end,
|
||||||
decode_frame,
|
decode_frame,
|
||||||
.max_lowres = 1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
|
.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
|
||||||
};
|
};
|
||||||
|
@@ -233,7 +233,6 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
|
|||||||
int i;
|
int i;
|
||||||
int header;
|
int header;
|
||||||
int blocksize;
|
int blocksize;
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
|
|
||||||
|
|
||||||
if (ctx->pic.data[0])
|
if (ctx->pic.data[0])
|
||||||
avctx->release_buffer(avctx, &ctx->pic);
|
avctx->release_buffer(avctx, &ctx->pic);
|
||||||
@@ -265,6 +264,13 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
|
|||||||
ctx->pic.pict_type = AV_PICTURE_TYPE_P;
|
ctx->pic.pict_type = AV_PICTURE_TYPE_P;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if palette has been changed, copy it from palctrl */
|
||||||
|
if (ctx->avctx->palctrl && ctx->avctx->palctrl->palette_changed) {
|
||||||
|
memcpy(ctx->pal, ctx->avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||||
|
ctx->setpal = 1;
|
||||||
|
ctx->avctx->palctrl->palette_changed = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (header & KMVC_PALETTE) {
|
if (header & KMVC_PALETTE) {
|
||||||
ctx->pic.palette_has_changed = 1;
|
ctx->pic.palette_has_changed = 1;
|
||||||
// palette starts from index 1 and has 127 entries
|
// palette starts from index 1 and has 127 entries
|
||||||
@@ -273,11 +279,6 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pal) {
|
|
||||||
ctx->pic.palette_has_changed = 1;
|
|
||||||
memcpy(ctx->pal, pal, AVPALETTE_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx->setpal) {
|
if (ctx->setpal) {
|
||||||
ctx->setpal = 0;
|
ctx->setpal = 0;
|
||||||
ctx->pic.palette_has_changed = 1;
|
ctx->pic.palette_has_changed = 1;
|
||||||
@@ -373,6 +374,9 @@ static av_cold int decode_init(AVCodecContext * avctx)
|
|||||||
src += 4;
|
src += 4;
|
||||||
}
|
}
|
||||||
c->setpal = 1;
|
c->setpal = 1;
|
||||||
|
if (c->avctx->palctrl) {
|
||||||
|
c->avctx->palctrl->palette_changed = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&c->pic);
|
avcodec_get_frame_defaults(&c->pic);
|
||||||
|
136
libavcodec/libaacplus.c
Normal file
136
libavcodec/libaacplus.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* Interface to libaacplus for aac+ (sbr+ps) encoding
|
||||||
|
* Copyright (c) 2010 tipok <piratfm@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of FFmpeg.
|
||||||
|
*
|
||||||
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Interface to libaacplus for aac+ (sbr+ps) encoding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "avcodec.h"
|
||||||
|
#include <aacplus.h>
|
||||||
|
|
||||||
|
typedef struct aacPlusAudioContext {
|
||||||
|
aacplusEncHandle aacplus_handle;
|
||||||
|
} aacPlusAudioContext;
|
||||||
|
|
||||||
|
static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
aacPlusAudioContext *s = avctx->priv_data;
|
||||||
|
aacplusEncConfiguration *aacplus_cfg;
|
||||||
|
unsigned long samples_input, max_bytes_output;
|
||||||
|
|
||||||
|
/* number of channels */
|
||||||
|
if (avctx->channels < 1 || avctx->channels > 2) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
s->aacplus_handle = aacplusEncOpen(avctx->sample_rate,
|
||||||
|
avctx->channels,
|
||||||
|
&samples_input, &max_bytes_output);
|
||||||
|
if(!s->aacplus_handle) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "can't open encoder\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check aacplus version */
|
||||||
|
aacplus_cfg = aacplusEncGetCurrentConfiguration(s->aacplus_handle);
|
||||||
|
|
||||||
|
/* put the options in the configuration struct */
|
||||||
|
if(avctx->profile != FF_PROFILE_AAC_LOW && avctx->profile != FF_PROFILE_UNKNOWN) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "invalid AAC profile: %d, only LC supported\n", avctx->profile);
|
||||||
|
aacplusEncClose(s->aacplus_handle);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
aacplus_cfg->bitRate = avctx->bit_rate;
|
||||||
|
aacplus_cfg->bandWidth = avctx->cutoff;
|
||||||
|
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
|
||||||
|
aacplus_cfg->outputFormat = 0; //raw aac
|
||||||
|
}
|
||||||
|
aacplus_cfg->inputFormat = AACPLUS_INPUT_16BIT;
|
||||||
|
if (!aacplusEncSetConfiguration(s->aacplus_handle, aacplus_cfg)) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "libaacplus doesn't support this output format!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
avctx->frame_size = samples_input / avctx->channels;
|
||||||
|
|
||||||
|
avctx->coded_frame= avcodec_alloc_frame();
|
||||||
|
avctx->coded_frame->key_frame= 1;
|
||||||
|
|
||||||
|
/* Set decoder specific info */
|
||||||
|
avctx->extradata_size = 0;
|
||||||
|
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
|
||||||
|
|
||||||
|
unsigned char *buffer = NULL;
|
||||||
|
unsigned long decoder_specific_info_size;
|
||||||
|
|
||||||
|
if (aacplusEncGetDecoderSpecificInfo(s->aacplus_handle, &buffer,
|
||||||
|
&decoder_specific_info_size) == 1) {
|
||||||
|
avctx->extradata = av_malloc(decoder_specific_info_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
avctx->extradata_size = decoder_specific_info_size;
|
||||||
|
memcpy(avctx->extradata, buffer, avctx->extradata_size);
|
||||||
|
}
|
||||||
|
#undef free
|
||||||
|
free(buffer);
|
||||||
|
#define free please_use_av_free
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int aacPlus_encode_frame(AVCodecContext *avctx,
|
||||||
|
unsigned char *frame, int buf_size, void *data)
|
||||||
|
{
|
||||||
|
aacPlusAudioContext *s = avctx->priv_data;
|
||||||
|
int bytes_written;
|
||||||
|
|
||||||
|
bytes_written = aacplusEncEncode(s->aacplus_handle,
|
||||||
|
data,
|
||||||
|
avctx->frame_size * avctx->channels,
|
||||||
|
frame,
|
||||||
|
buf_size);
|
||||||
|
|
||||||
|
return bytes_written;
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_cold int aacPlus_encode_close(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
aacPlusAudioContext *s = avctx->priv_data;
|
||||||
|
|
||||||
|
av_freep(&avctx->coded_frame);
|
||||||
|
av_freep(&avctx->extradata);
|
||||||
|
|
||||||
|
aacplusEncClose(s->aacplus_handle);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
AVCodec ff_libaacplus_encoder = {
|
||||||
|
"libaacplus",
|
||||||
|
AVMEDIA_TYPE_AUDIO,
|
||||||
|
CODEC_ID_AAC,
|
||||||
|
sizeof(aacPlusAudioContext),
|
||||||
|
aacPlus_encode_init,
|
||||||
|
aacPlus_encode_frame,
|
||||||
|
aacPlus_encode_close,
|
||||||
|
.sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("libaacplus AAC+ (Advanced Audio Codec with SBR+PS)"),
|
||||||
|
};
|
178
libavcodec/libspeexenc.c
Normal file
178
libavcodec/libspeexenc.c
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2009 by Xuggle Incorporated. All rights reserved.
|
||||||
|
* This file is part of FFmpeg.
|
||||||
|
*
|
||||||
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
|
#include <speex/speex.h>
|
||||||
|
#include <speex/speex_header.h>
|
||||||
|
#include <speex/speex_stereo.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
SpeexBits bits;
|
||||||
|
void *enc_state;
|
||||||
|
SpeexHeader header;
|
||||||
|
} LibSpeexEncContext;
|
||||||
|
|
||||||
|
|
||||||
|
static av_cold int libspeex_encode_init(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
LibSpeexEncContext *s = (LibSpeexEncContext*)avctx->priv_data;
|
||||||
|
const SpeexMode *mode;
|
||||||
|
|
||||||
|
if ((avctx->sample_fmt != SAMPLE_FMT_S16 && avctx->sample_fmt != SAMPLE_FMT_FLT) ||
|
||||||
|
avctx->sample_rate <= 0 ||
|
||||||
|
avctx->channels <= 0 ||
|
||||||
|
avctx->channels > 2)
|
||||||
|
{
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Unsupported sample format, rate, or channels for speex");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avctx->sample_rate <= 8000)
|
||||||
|
mode = &speex_nb_mode;
|
||||||
|
else if (avctx->sample_rate <= 16000)
|
||||||
|
mode = &speex_wb_mode;
|
||||||
|
else
|
||||||
|
mode = &speex_uwb_mode;
|
||||||
|
|
||||||
|
speex_bits_init(&s->bits);
|
||||||
|
s->enc_state = speex_encoder_init(mode);
|
||||||
|
if (!s->enc_state)
|
||||||
|
{
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "could not initialize speex encoder");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// initialize the header
|
||||||
|
speex_init_header(&s->header, avctx->sample_rate,
|
||||||
|
avctx->channels, mode);
|
||||||
|
|
||||||
|
// TODO: It'd be nice to support VBR here, but
|
||||||
|
// I'm uncertain what AVCodecContext options to use
|
||||||
|
// to signal whether to turn it on.
|
||||||
|
if (avctx->flags & CODEC_FLAG_QSCALE) {
|
||||||
|
spx_int32_t quality = 0;
|
||||||
|
// Map global_quality's mpeg 1/2/4 scale into Speex's 0-10 scale
|
||||||
|
if (avctx->global_quality > FF_LAMBDA_MAX)
|
||||||
|
quality = 0; // lowest possible quality
|
||||||
|
else
|
||||||
|
quality = (spx_int32_t)((FF_LAMBDA_MAX-avctx->global_quality)*10.0/FF_LAMBDA_MAX);
|
||||||
|
speex_encoder_ctl(s->enc_state, SPEEX_SET_QUALITY, &quality);
|
||||||
|
} else {
|
||||||
|
// default to CBR
|
||||||
|
if (avctx->bit_rate > 0)
|
||||||
|
speex_encoder_ctl(s->enc_state, SPEEX_SET_BITRATE, &avctx->bit_rate);
|
||||||
|
// otherwise just take the default quality setting
|
||||||
|
}
|
||||||
|
// reset the bit-rate to the actual bit rate speex will use
|
||||||
|
speex_encoder_ctl(s->enc_state, SPEEX_GET_BITRATE, &s->header.bitrate);
|
||||||
|
avctx->bit_rate = s->header.bitrate;
|
||||||
|
|
||||||
|
// get the actual sample rate
|
||||||
|
speex_encoder_ctl(s->enc_state, SPEEX_GET_SAMPLING_RATE, &s->header.rate);
|
||||||
|
avctx->sample_rate = s->header.rate;
|
||||||
|
|
||||||
|
// get the frame-size. To align with FLV, we're going to put 2 frames
|
||||||
|
// per packet. If someone can tell me how to make this configurable
|
||||||
|
// from the avcodec contents, I'll mod this so it's not hard-coded.
|
||||||
|
// but without this, FLV files with speex data won't play correctly
|
||||||
|
// in flash player 10.
|
||||||
|
speex_encoder_ctl(s->enc_state, SPEEX_GET_FRAME_SIZE, &s->header.frame_size);
|
||||||
|
s->header.frames_per_packet = 2; // Need for FLV container support
|
||||||
|
avctx->frame_size = s->header.frame_size*s->header.frames_per_packet;
|
||||||
|
|
||||||
|
// and we'll put a speex header packet into extradata so that muxers
|
||||||
|
// can use it.
|
||||||
|
avctx->extradata = speex_header_to_packet(&s->header, &avctx->extradata_size);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_cold int libspeex_encode_frame(
|
||||||
|
AVCodecContext *avctx, uint8_t *frame,
|
||||||
|
int buf_size, void *data)
|
||||||
|
{
|
||||||
|
LibSpeexEncContext *s = (LibSpeexEncContext*)avctx->priv_data;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
// nothing to flush
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
speex_bits_reset(&s->bits);
|
||||||
|
for(i = 0; i < s->header.frames_per_packet; i++)
|
||||||
|
{
|
||||||
|
if (avctx->sample_fmt == SAMPLE_FMT_FLT)
|
||||||
|
{
|
||||||
|
if (avctx->channels == 2) {
|
||||||
|
speex_encode_stereo(
|
||||||
|
(float*)data+i*s->header.frame_size,
|
||||||
|
s->header.frame_size,
|
||||||
|
&s->bits);
|
||||||
|
}
|
||||||
|
speex_encode(s->enc_state,
|
||||||
|
(float*)data+i*s->header.frame_size, &s->bits);
|
||||||
|
} else {
|
||||||
|
if (avctx->channels == 2) {
|
||||||
|
speex_encode_stereo_int(
|
||||||
|
(spx_int16_t*)data+i*s->header.frame_size,
|
||||||
|
s->header.frame_size,
|
||||||
|
&s->bits);
|
||||||
|
}
|
||||||
|
speex_encode_int(s->enc_state,
|
||||||
|
(spx_int16_t*)data+i*s->header.frame_size, &s->bits);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// put in a terminator so this will fit in a OGG or FLV packet
|
||||||
|
speex_bits_insert_terminator(&s->bits);
|
||||||
|
|
||||||
|
if (buf_size >= speex_bits_nbytes(&s->bits)) {
|
||||||
|
return speex_bits_write(&s->bits, frame, buf_size);
|
||||||
|
} else {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "output buffer too small");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_cold int libspeex_encode_close(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
LibSpeexEncContext *s = (LibSpeexEncContext*)avctx->priv_data;
|
||||||
|
|
||||||
|
speex_bits_destroy(&s->bits);
|
||||||
|
speex_encoder_destroy(s->enc_state);
|
||||||
|
s->enc_state = 0;
|
||||||
|
if (avctx->extradata)
|
||||||
|
speex_header_free(avctx->extradata);
|
||||||
|
avctx->extradata = 0;
|
||||||
|
avctx->extradata_size = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
AVCodec ff_libspeex_encoder = {
|
||||||
|
"libspeex",
|
||||||
|
AVMEDIA_TYPE_AUDIO,
|
||||||
|
CODEC_ID_SPEEX,
|
||||||
|
sizeof(LibSpeexEncContext),
|
||||||
|
libspeex_encode_init,
|
||||||
|
libspeex_encode_frame,
|
||||||
|
libspeex_encode_close,
|
||||||
|
0,
|
||||||
|
.capabilities = CODEC_CAP_DELAY,
|
||||||
|
.supported_samplerates = (const int[]){8000, 16000, 32000, 0},
|
||||||
|
.sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_FLT,SAMPLE_FMT_NONE},
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("libspeex Speex Encoder"),
|
||||||
|
};
|
@@ -30,6 +30,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "vorbis.h"
|
#include "vorbis.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
|
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "libavutil/base64.h"
|
#include "libavutil/base64.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Portion of struct vpx_codec_cx_pkt from vpx_encoder.h.
|
* Portion of struct vpx_codec_cx_pkt from vpx_encoder.h.
|
||||||
@@ -480,8 +481,8 @@ static int queue_frames(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
|||||||
break;
|
break;
|
||||||
case VPX_CODEC_STATS_PKT: {
|
case VPX_CODEC_STATS_PKT: {
|
||||||
struct vpx_fixed_buf *stats = &ctx->twopass_stats;
|
struct vpx_fixed_buf *stats = &ctx->twopass_stats;
|
||||||
stats->buf = av_realloc(stats->buf,
|
stats->buf = av_realloc_f(stats->buf, 1,
|
||||||
stats->sz + pkt->data.twopass_stats.sz);
|
stats->sz + pkt->data.twopass_stats.sz);
|
||||||
if (!stats->buf) {
|
if (!stats->buf) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Stat buffer realloc failed\n");
|
av_log(avctx, AV_LOG_ERROR, "Stat buffer realloc failed\n");
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
@@ -70,9 +70,14 @@ static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size,
|
|||||||
|
|
||||||
/* Write the SEI as part of the first frame. */
|
/* Write the SEI as part of the first frame. */
|
||||||
if (x4->sei_size > 0 && nnal > 0) {
|
if (x4->sei_size > 0 && nnal > 0) {
|
||||||
|
if (x4->sei_size > size) {
|
||||||
|
av_log(ctx, AV_LOG_ERROR, "Error: nal buffer is too small\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
memcpy(p, x4->sei, x4->sei_size);
|
memcpy(p, x4->sei, x4->sei_size);
|
||||||
p += x4->sei_size;
|
p += x4->sei_size;
|
||||||
x4->sei_size = 0;
|
x4->sei_size = 0;
|
||||||
|
// why is x4->sei not freed?
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < nnal; i++){
|
for (i = 0; i < nnal; i++){
|
||||||
@@ -83,6 +88,11 @@ static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size,
|
|||||||
memcpy(x4->sei, nals[i].p_payload, nals[i].i_payload);
|
memcpy(x4->sei, nals[i].p_payload, nals[i].i_payload);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (nals[i].i_payload > (size - (p - buf))) {
|
||||||
|
// return only complete nals which fit in buf
|
||||||
|
av_log(ctx, AV_LOG_ERROR, "Error: nal buffer is too small\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
memcpy(p, nals[i].p_payload, nals[i].i_payload);
|
memcpy(p, nals[i].p_payload, nals[i].i_payload);
|
||||||
p += nals[i].i_payload;
|
p += nals[i].i_payload;
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "libavutil/cpu.h"
|
#include "libavutil/cpu.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
#include "libxvid_internal.h"
|
#include "libxvid_internal.h"
|
||||||
#if !HAVE_MKSTEMP
|
#if !HAVE_MKSTEMP
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -528,6 +529,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
|
|||||||
if( x->twopassbuffer != NULL ) {
|
if( x->twopassbuffer != NULL ) {
|
||||||
av_free(x->twopassbuffer);
|
av_free(x->twopassbuffer);
|
||||||
av_free(x->old_twopassbuffer);
|
av_free(x->old_twopassbuffer);
|
||||||
|
avctx->stats_out = NULL;
|
||||||
}
|
}
|
||||||
av_free(x->twopassfile);
|
av_free(x->twopassfile);
|
||||||
av_free(x->intra_matrix);
|
av_free(x->intra_matrix);
|
||||||
|
@@ -318,8 +318,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
|||||||
case 0x11111100:
|
case 0x11111100:
|
||||||
if(s->rgb){
|
if(s->rgb){
|
||||||
s->avctx->pix_fmt = PIX_FMT_BGRA;
|
s->avctx->pix_fmt = PIX_FMT_BGRA;
|
||||||
}else
|
}else{
|
||||||
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
|
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
|
||||||
|
s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
|
||||||
|
}
|
||||||
assert(s->nb_components==3);
|
assert(s->nb_components==3);
|
||||||
break;
|
break;
|
||||||
case 0x11000000:
|
case 0x11000000:
|
||||||
@@ -327,12 +329,15 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
|||||||
break;
|
break;
|
||||||
case 0x12111100:
|
case 0x12111100:
|
||||||
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV440P : PIX_FMT_YUVJ440P;
|
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV440P : PIX_FMT_YUVJ440P;
|
||||||
|
s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
|
||||||
break;
|
break;
|
||||||
case 0x21111100:
|
case 0x21111100:
|
||||||
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV422P : PIX_FMT_YUVJ422P;
|
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV422P : PIX_FMT_YUVJ422P;
|
||||||
|
s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
|
||||||
break;
|
break;
|
||||||
case 0x22111100:
|
case 0x22111100:
|
||||||
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV420P : PIX_FMT_YUVJ420P;
|
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV420P : PIX_FMT_YUVJ420P;
|
||||||
|
s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id);
|
av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id);
|
||||||
@@ -881,14 +886,19 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->restart_interval && show_bits(&s->gb, 8) == 0xFF){/* skip RSTn */
|
if (s->restart_interval) --s->restart_count;
|
||||||
--s->restart_count;
|
i= 8+((-get_bits_count(&s->gb))&7);
|
||||||
|
if (s->restart_interval && show_bits(&s->gb, i) == (1<<i)-1){ /* skip RSTn */
|
||||||
|
int pos= get_bits_count(&s->gb);
|
||||||
align_get_bits(&s->gb);
|
align_get_bits(&s->gb);
|
||||||
while(show_bits(&s->gb, 8) == 0xFF)
|
while(show_bits(&s->gb, 8) == 0xFF)
|
||||||
skip_bits(&s->gb, 8);
|
skip_bits(&s->gb, 8);
|
||||||
skip_bits(&s->gb, 8);
|
if((get_bits(&s->gb, 8)&0xF8) == 0xD0){
|
||||||
for (i=0; i<nb_components; i++) /* reset dc */
|
for (i=0; i<nb_components; i++) /* reset dc */
|
||||||
s->last_dc[i] = 1024;
|
s->last_dc[i] = 1024;
|
||||||
|
}else{
|
||||||
|
skip_bits_long(&s->gb, pos - get_bits_count(&s->gb));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -992,8 +992,8 @@ static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dm
|
|||||||
return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
|
return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\param P[10][2] a list of candidate mvs to check before starting the
|
@param P a list of candidate mvs to check before starting the
|
||||||
iterative search. If one of the candidates is close to the optimal mv, then
|
iterative search. If one of the candidates is close to the optimal mv, then
|
||||||
it takes fewer iterations. And it increases the chance that we find the
|
it takes fewer iterations. And it increases the chance that we find the
|
||||||
optimal mv.
|
optimal mv.
|
||||||
|
@@ -52,14 +52,16 @@ typedef struct MotionPixelsContext {
|
|||||||
static av_cold int mp_decode_init(AVCodecContext *avctx)
|
static av_cold int mp_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
MotionPixelsContext *mp = avctx->priv_data;
|
MotionPixelsContext *mp = avctx->priv_data;
|
||||||
|
int w4 = (avctx->width + 3) & ~3;
|
||||||
|
int h4 = (avctx->height + 3) & ~3;
|
||||||
|
|
||||||
motionpixels_tableinit();
|
motionpixels_tableinit();
|
||||||
mp->avctx = avctx;
|
mp->avctx = avctx;
|
||||||
dsputil_init(&mp->dsp, avctx);
|
dsputil_init(&mp->dsp, avctx);
|
||||||
mp->changes_map = av_mallocz(avctx->width * avctx->height);
|
mp->changes_map = av_mallocz(avctx->width * h4);
|
||||||
mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1;
|
mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1;
|
||||||
mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel));
|
mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel));
|
||||||
mp->hpt = av_mallocz(avctx->height * avctx->width / 16 * sizeof(YuvPixel));
|
mp->hpt = av_mallocz(h4 * w4 / 16 * sizeof(YuvPixel));
|
||||||
avctx->pix_fmt = PIX_FMT_RGB555;
|
avctx->pix_fmt = PIX_FMT_RGB555;
|
||||||
avcodec_get_frame_defaults(&mp->frame);
|
avcodec_get_frame_defaults(&mp->frame);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -253,6 +255,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
|
|||||||
mp->dsp.bswap_buf((uint32_t *)mp->bswapbuf, (const uint32_t *)buf, buf_size / 4);
|
mp->dsp.bswap_buf((uint32_t *)mp->bswapbuf, (const uint32_t *)buf, buf_size / 4);
|
||||||
if (buf_size & 3)
|
if (buf_size & 3)
|
||||||
memcpy(mp->bswapbuf + (buf_size & ~3), buf + (buf_size & ~3), buf_size & 3);
|
memcpy(mp->bswapbuf + (buf_size & ~3), buf + (buf_size & ~3), buf_size & 3);
|
||||||
|
memset(mp->bswapbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
init_get_bits(&gb, mp->bswapbuf, buf_size * 8);
|
init_get_bits(&gb, mp->bswapbuf, buf_size * 8);
|
||||||
|
|
||||||
memset(mp->changes_map, 0, avctx->width * avctx->height);
|
memset(mp->changes_map, 0, avctx->width * avctx->height);
|
||||||
@@ -279,7 +282,10 @@ static int mp_decode_frame(AVCodecContext *avctx,
|
|||||||
if (sz == 0)
|
if (sz == 0)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0);
|
if (mp->max_codes_bits <= 0)
|
||||||
|
goto end;
|
||||||
|
if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0))
|
||||||
|
goto end;
|
||||||
mp_decode_frame_helper(mp, &gb);
|
mp_decode_frame_helper(mp, &gb);
|
||||||
free_vlc(&mp->vlc);
|
free_vlc(&mp->vlc);
|
||||||
|
|
||||||
|
@@ -127,6 +127,8 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
|
|||||||
|
|
||||||
skip_bits(&gb, 3);//sample rate
|
skip_bits(&gb, 3);//sample rate
|
||||||
c->maxbands = get_bits(&gb, 5) + 1;
|
c->maxbands = get_bits(&gb, 5) + 1;
|
||||||
|
if (c->maxbands >= BANDS)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
channels = get_bits(&gb, 4) + 1;
|
channels = get_bits(&gb, 4) + 1;
|
||||||
if (channels > 2) {
|
if (channels > 2) {
|
||||||
av_log_missing_feature(avctx, "Multichannel MPC SV8", 1);
|
av_log_missing_feature(avctx, "Multichannel MPC SV8", 1);
|
||||||
@@ -260,6 +262,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx,
|
|||||||
maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2);
|
maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2);
|
||||||
if(maxband > 32) maxband -= 33;
|
if(maxband > 32) maxband -= 33;
|
||||||
}
|
}
|
||||||
|
if(maxband > c->maxbands)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
c->last_max_band = maxband;
|
c->last_max_band = maxband;
|
||||||
|
|
||||||
/* read subband indexes */
|
/* read subband indexes */
|
||||||
|
@@ -2475,10 +2475,18 @@ static int decode_chunks(AVCodecContext *avctx,
|
|||||||
/* Skip P-frames if we do not have a reference frame or we have an invalid header. */
|
/* Skip P-frames if we do not have a reference frame or we have an invalid header. */
|
||||||
if(s2->pict_type==AV_PICTURE_TYPE_P && !s->sync) break;
|
if(s2->pict_type==AV_PICTURE_TYPE_P && !s->sync) break;
|
||||||
}
|
}
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/* Skip B-frames if we are in a hurry. */
|
||||||
|
if(avctx->hurry_up && s2->pict_type==FF_B_TYPE) break;
|
||||||
|
#endif
|
||||||
if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==AV_PICTURE_TYPE_B)
|
if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==AV_PICTURE_TYPE_B)
|
||||||
||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=AV_PICTURE_TYPE_I)
|
||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=AV_PICTURE_TYPE_I)
|
||||||
|| avctx->skip_frame >= AVDISCARD_ALL)
|
|| avctx->skip_frame >= AVDISCARD_ALL)
|
||||||
break;
|
break;
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
/* Skip everything if we are in a hurry>=5. */
|
||||||
|
if(avctx->hurry_up>=5) break;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!s->mpeg_enc_ctx_allocated) break;
|
if (!s->mpeg_enc_ctx_allocated) break;
|
||||||
|
|
||||||
|
@@ -898,8 +898,8 @@ static void mpeg4_encode_gop_header(MpegEncContext * s){
|
|||||||
s->last_time_base= FFUDIV(time, s->avctx->time_base.den);
|
s->last_time_base= FFUDIV(time, s->avctx->time_base.den);
|
||||||
|
|
||||||
seconds= FFUDIV(time, s->avctx->time_base.den);
|
seconds= FFUDIV(time, s->avctx->time_base.den);
|
||||||
minutes= FFUDIV(seconds, 60); FFUMOD(seconds, 60);
|
minutes= FFUDIV(seconds, 60); seconds = FFUMOD(seconds, 60);
|
||||||
hours = FFUDIV(minutes, 60); FFUMOD(minutes, 60);
|
hours = FFUDIV(minutes, 60); minutes = FFUMOD(minutes, 60);
|
||||||
hours = FFUMOD(hours , 24);
|
hours = FFUMOD(hours , 24);
|
||||||
|
|
||||||
put_bits(&s->pb, 5, hours);
|
put_bits(&s->pb, 5, hours);
|
||||||
|
@@ -1809,7 +1809,7 @@ static int decode_frame(AVCodecContext * avctx,
|
|||||||
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
|
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
|
||||||
return -1;
|
return -1;
|
||||||
}else if(s->frame_size < buf_size){
|
}else if(s->frame_size < buf_size){
|
||||||
av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n");
|
av_log(avctx, AV_LOG_DEBUG, "incorrect frame size - multiple frames in buffer?\n");
|
||||||
buf_size= s->frame_size;
|
buf_size= s->frame_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -285,9 +285,10 @@ int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){
|
|||||||
}
|
}
|
||||||
|
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, pic->mbskip_table , mb_array_size * sizeof(uint8_t)+2, fail) //the +2 is for the slice end check
|
FF_ALLOCZ_OR_GOTO(s->avctx, pic->mbskip_table , mb_array_size * sizeof(uint8_t)+2, fail) //the +2 is for the slice end check
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table , mb_array_size * sizeof(uint8_t) , fail)
|
FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table_base , (big_mb_num + s->mb_stride) * sizeof(uint8_t) , fail)
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_type_base , (big_mb_num + s->mb_stride) * sizeof(uint32_t), fail)
|
FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_type_base , (big_mb_num + s->mb_stride) * sizeof(uint32_t), fail)
|
||||||
pic->mb_type= pic->mb_type_base + 2*s->mb_stride+1;
|
pic->mb_type= pic->mb_type_base + 2*s->mb_stride+1;
|
||||||
|
pic->qscale_table = pic->qscale_table_base + 2*s->mb_stride + 1;
|
||||||
if(s->out_format == FMT_H264){
|
if(s->out_format == FMT_H264){
|
||||||
for(i=0; i<2; i++){
|
for(i=0; i<2; i++){
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], 2 * (b4_array_size+4) * sizeof(int16_t), fail)
|
FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], 2 * (b4_array_size+4) * sizeof(int16_t), fail)
|
||||||
@@ -339,7 +340,7 @@ static void free_picture(MpegEncContext *s, Picture *pic){
|
|||||||
av_freep(&pic->mc_mb_var);
|
av_freep(&pic->mc_mb_var);
|
||||||
av_freep(&pic->mb_mean);
|
av_freep(&pic->mb_mean);
|
||||||
av_freep(&pic->mbskip_table);
|
av_freep(&pic->mbskip_table);
|
||||||
av_freep(&pic->qscale_table);
|
av_freep(&pic->qscale_table_base);
|
||||||
av_freep(&pic->mb_type_base);
|
av_freep(&pic->mb_type_base);
|
||||||
av_freep(&pic->dct_coeff);
|
av_freep(&pic->dct_coeff);
|
||||||
av_freep(&pic->pan_scan);
|
av_freep(&pic->pan_scan);
|
||||||
@@ -365,8 +366,8 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
// edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
|
// edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, s->allocated_edge_emu_buffer, (s->width+64)*2*21*2, fail); //(width + edge + align)*interlaced*MBsize*tolerance
|
FF_ALLOCZ_OR_GOTO(s->avctx, s->allocated_edge_emu_buffer, (s->width+64)*2*21*2*2, fail); //(width + edge + align)*interlaced*MBsize*tolerance
|
||||||
s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21;
|
s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21*2;
|
||||||
|
|
||||||
//FIXME should be linesize instead of s->width*2 but that is not known before get_buffer()
|
//FIXME should be linesize instead of s->width*2 but that is not known before get_buffer()
|
||||||
FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t), fail)
|
FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t), fail)
|
||||||
@@ -1138,6 +1139,9 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
s->hurry_up= s->avctx->hurry_up;
|
||||||
|
#endif
|
||||||
s->error_recognition= avctx->error_recognition;
|
s->error_recognition= avctx->error_recognition;
|
||||||
|
|
||||||
/* set dequantizer, we can't do it during init as it might change for mpeg4
|
/* set dequantizer, we can't do it during init as it might change for mpeg4
|
||||||
@@ -2147,6 +2151,9 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* skip dequant / idct if we are really late ;) */
|
/* skip dequant / idct if we are really late ;) */
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
if(s->hurry_up>1) goto skip_idct;
|
||||||
|
#endif
|
||||||
if(s->avctx->skip_idct){
|
if(s->avctx->skip_idct){
|
||||||
if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B)
|
if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B)
|
||||||
||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I)
|
||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I)
|
||||||
|
@@ -88,6 +88,7 @@ typedef struct Picture{
|
|||||||
* halfpel luma planes.
|
* halfpel luma planes.
|
||||||
*/
|
*/
|
||||||
uint8_t *interpolated[3];
|
uint8_t *interpolated[3];
|
||||||
|
int8_t *qscale_table_base;
|
||||||
int16_t (*motion_val_base[2])[2];
|
int16_t (*motion_val_base[2])[2];
|
||||||
uint32_t *mb_type_base;
|
uint32_t *mb_type_base;
|
||||||
#define MB_TYPE_INTRA MB_TYPE_INTRA4x4 //default mb_type if there is just one type
|
#define MB_TYPE_INTRA MB_TYPE_INTRA4x4 //default mb_type if there is just one type
|
||||||
@@ -122,7 +123,7 @@ typedef struct Picture{
|
|||||||
int pic_id; /**< h264 pic_num (short -> no wrap version of pic_num,
|
int pic_id; /**< h264 pic_num (short -> no wrap version of pic_num,
|
||||||
pic_num & max_pic_num; long -> long_pic_num) */
|
pic_num & max_pic_num; long -> long_pic_num) */
|
||||||
int long_ref; ///< 1->long term reference 0->short term reference
|
int long_ref; ///< 1->long term reference 0->short term reference
|
||||||
int ref_poc[2][2][16]; ///< h264 POCs of the frames used as reference (FIXME need per slice)
|
int ref_poc[2][2][32]; ///< h264 POCs of the frames/fields used as reference (FIXME need per slice)
|
||||||
int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice)
|
int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice)
|
||||||
int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF
|
int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF
|
||||||
int field_picture; ///< whether or not the picture was encoded in seperate fields
|
int field_picture; ///< whether or not the picture was encoded in seperate fields
|
||||||
@@ -391,6 +392,11 @@ typedef struct MpegEncContext {
|
|||||||
int no_rounding; /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
|
int no_rounding; /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
|
||||||
for b-frames rounding mode is always 0 */
|
for b-frames rounding mode is always 0 */
|
||||||
|
|
||||||
|
#if FF_API_HURRY_UP
|
||||||
|
int hurry_up; /**< when set to 1 during decoding, b frames will be skipped
|
||||||
|
when set to 2 idct/dequant will be skipped too */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* macroblock layer */
|
/* macroblock layer */
|
||||||
int mb_x, mb_y;
|
int mb_x, mb_y;
|
||||||
int mb_skip_run;
|
int mb_skip_run;
|
||||||
|
@@ -411,9 +411,10 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
|||||||
if ((s->codec_id == CODEC_ID_MPEG4 || s->codec_id == CODEC_ID_H263 ||
|
if ((s->codec_id == CODEC_ID_MPEG4 || s->codec_id == CODEC_ID_H263 ||
|
||||||
s->codec_id == CODEC_ID_H263P) &&
|
s->codec_id == CODEC_ID_H263P) &&
|
||||||
(avctx->sample_aspect_ratio.num > 255 || avctx->sample_aspect_ratio.den > 255)) {
|
(avctx->sample_aspect_ratio.num > 255 || avctx->sample_aspect_ratio.den > 255)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i, limit is 255/255\n",
|
av_log(avctx, AV_LOG_WARNING, "Invalid pixel aspect ratio %i/%i, limit is 255/255 reducing\n",
|
||||||
avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den);
|
avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den);
|
||||||
return -1;
|
av_reduce(&avctx->sample_aspect_ratio.num, &avctx->sample_aspect_ratio.den,
|
||||||
|
avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((s->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN))
|
if((s->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN))
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user