Compare commits
303 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
81b754b1e4 | ||
![]() |
5f5bf9faf9 | ||
![]() |
c2d3f06882 | ||
![]() |
01c90eea6c | ||
![]() |
d34cfb33af | ||
![]() |
13093f9767 | ||
![]() |
fee26d352a | ||
![]() |
a23a3dba25 | ||
![]() |
0360dbefad | ||
![]() |
deb650c692 | ||
![]() |
deaaacbc3f | ||
![]() |
0b25c3b67c | ||
![]() |
10ec2308b0 | ||
![]() |
b9500bf864 | ||
![]() |
4f8f4458a5 | ||
![]() |
9def5c4666 | ||
![]() |
7aeb281aa5 | ||
![]() |
a49599b125 | ||
![]() |
fe4409a396 | ||
![]() |
c3761b6618 | ||
![]() |
2e1474fd99 | ||
![]() |
1f1b2f1806 | ||
![]() |
80f89a9b40 | ||
![]() |
5235db68c0 | ||
![]() |
6731776795 | ||
![]() |
d4e4234147 | ||
![]() |
2ae6bdbb9b | ||
![]() |
4fac60d568 | ||
![]() |
d1729c3715 | ||
![]() |
c28c631d29 | ||
![]() |
6b97e76dfc | ||
![]() |
4475a7d88b | ||
![]() |
0f6d4da8de | ||
![]() |
5c9d2d8377 | ||
![]() |
ac476bfa9f | ||
![]() |
272e7f6443 | ||
![]() |
776fb2e10d | ||
![]() |
0dfcbe5285 | ||
![]() |
6d6373dc64 | ||
![]() |
7296a6b5e9 | ||
![]() |
f695be22d8 | ||
![]() |
9125aa9218 | ||
![]() |
09a278fdd1 | ||
![]() |
9eaec5b8f0 | ||
![]() |
48ef116631 | ||
![]() |
cc511b36f3 | ||
![]() |
85b22a8924 | ||
![]() |
6ec1d3b3ba | ||
![]() |
d843e7dc94 | ||
![]() |
acc665f22c | ||
![]() |
4c223fe519 | ||
![]() |
5a9588b088 | ||
![]() |
02cd93f4ad | ||
![]() |
f8a31e2113 | ||
![]() |
8ba939fcda | ||
![]() |
79674d27d9 | ||
![]() |
b061ee9a5d | ||
![]() |
baba561c0b | ||
![]() |
f6147effd2 | ||
![]() |
b990187f99 | ||
![]() |
ae6c57859c | ||
![]() |
5629c39101 | ||
![]() |
7867cbaf6c | ||
![]() |
0bf8e22cdb | ||
![]() |
7944a87ba8 | ||
![]() |
a55db1fc49 | ||
![]() |
123e925956 | ||
![]() |
96c6b3a11c | ||
![]() |
5e3cd42b6d | ||
![]() |
f73106256d | ||
![]() |
782c3ab777 | ||
![]() |
4b2e02a4c4 | ||
![]() |
79fbcd9f03 | ||
![]() |
468cc41d6d | ||
![]() |
6c9b404dba | ||
![]() |
b2ac7e585e | ||
![]() |
8bb3ba5541 | ||
![]() |
5a92aa378d | ||
![]() |
c4e8c99507 | ||
![]() |
479869c499 | ||
![]() |
ec4979e16e | ||
![]() |
056c909d9d | ||
![]() |
bde4b66063 | ||
![]() |
0fda37cff9 | ||
![]() |
2e693be7e9 | ||
![]() |
8e101086eb | ||
![]() |
f13de3c653 | ||
![]() |
1eb7872238 | ||
![]() |
15df4428d2 | ||
![]() |
ec0124203c | ||
![]() |
6b01bcebb9 | ||
![]() |
efd453d82d | ||
![]() |
7209c2b13f | ||
![]() |
7ee536e87a | ||
![]() |
665421f3b1 | ||
![]() |
3eb6983dbc | ||
![]() |
e75056bc54 | ||
![]() |
8755a7890e | ||
![]() |
d0688fdd31 | ||
![]() |
0e05292a6c | ||
![]() |
23f228a0d0 | ||
![]() |
110aff4b24 | ||
![]() |
4a1c3df592 | ||
![]() |
185abfb218 | ||
![]() |
280590e338 | ||
![]() |
9767ea7aa7 | ||
![]() |
771ceb19f2 | ||
![]() |
7739947671 | ||
![]() |
8abf1d882e | ||
![]() |
1a53095406 | ||
![]() |
60eebf5c12 | ||
![]() |
30ee6c1995 | ||
![]() |
b769df8ff2 | ||
![]() |
cc2580e6e9 | ||
![]() |
4b0f8aed13 | ||
![]() |
2c8ac66456 | ||
![]() |
4f209fe960 | ||
![]() |
037b1142cd | ||
![]() |
37cc48861d | ||
![]() |
0cd61bfa6d | ||
![]() |
16ea6af381 | ||
![]() |
8bd374858f | ||
![]() |
d39cc3c092 | ||
![]() |
e124c3c298 | ||
![]() |
8acc0546bb | ||
![]() |
36e4be0a0a | ||
![]() |
c603cf5170 | ||
![]() |
e1a46eff7a | ||
![]() |
23aaa82b1d | ||
![]() |
58087a4e64 | ||
![]() |
8d1fa1c97e | ||
![]() |
2eb5f77bc8 | ||
![]() |
ddbbe500b0 | ||
![]() |
d1a5b53ede | ||
![]() |
8e6173c76a | ||
![]() |
1a6f024520 | ||
![]() |
3699a46ed7 | ||
![]() |
62da9203fd | ||
![]() |
2e1e3c1e41 | ||
![]() |
635256a324 | ||
![]() |
240546a185 | ||
![]() |
07df40db6e | ||
![]() |
b24c2e59fe | ||
![]() |
25bc1108c2 | ||
![]() |
8ef917c033 | ||
![]() |
1883249be3 | ||
![]() |
648dc68098 | ||
![]() |
10da0edddc | ||
![]() |
d6bf79993f | ||
![]() |
0f2735e839 | ||
![]() |
9463a28792 | ||
![]() |
1330a8a1cb | ||
![]() |
8135c35528 | ||
![]() |
38423fe0b7 | ||
![]() |
71132596ae | ||
![]() |
d6f8b65417 | ||
![]() |
d8439f0452 | ||
![]() |
eb6b0ed8be | ||
![]() |
6108f04d4f | ||
![]() |
b261ebfd22 | ||
![]() |
03db051b43 | ||
![]() |
cc885682e3 | ||
![]() |
1415ebf031 | ||
![]() |
4e0315b30e | ||
![]() |
a9ded3d272 | ||
![]() |
ef93642aac | ||
![]() |
9cda3d7915 | ||
![]() |
52b8edc94c | ||
![]() |
f936799f0b | ||
![]() |
f6d3dfe78b | ||
![]() |
2e17744a90 | ||
![]() |
19431d4d4e | ||
![]() |
ecd6fa11c2 | ||
![]() |
7cb35d4954 | ||
![]() |
457f869b73 | ||
![]() |
70f01f1262 | ||
![]() |
80fb9f2c57 | ||
![]() |
46f9a6203a | ||
![]() |
e9210b4e17 | ||
![]() |
4f07a3aa2c | ||
![]() |
04888edef3 | ||
![]() |
24cd7c5df7 | ||
![]() |
8210ee22e2 | ||
![]() |
eed5697f99 | ||
![]() |
52ee20f2aa | ||
![]() |
f17b892787 | ||
![]() |
18c5fe919f | ||
![]() |
c5898d7c1d | ||
![]() |
2c4d6aeabc | ||
![]() |
31c8dcedb2 | ||
![]() |
2adad90ae7 | ||
![]() |
808f9ce727 | ||
![]() |
8069e2f6fb | ||
![]() |
f7494394ee | ||
![]() |
04847a06c2 | ||
![]() |
329e816ed7 | ||
![]() |
d6860fb653 | ||
![]() |
e332c41670 | ||
![]() |
11f6eebdd3 | ||
![]() |
9109a58867 | ||
![]() |
44511b17cb | ||
![]() |
48b086b0ef | ||
![]() |
c9864adf34 | ||
![]() |
7d10059aeb | ||
![]() |
69e8b43812 | ||
![]() |
2f504d7a90 | ||
![]() |
2dea9a1266 | ||
![]() |
84e6629de3 | ||
![]() |
fc038df32e | ||
![]() |
021054a196 | ||
![]() |
ee20f19b20 | ||
![]() |
2fcb56dab9 | ||
![]() |
96ca078b22 | ||
![]() |
7fd4cbb519 | ||
![]() |
557e065d5f | ||
![]() |
461243731d | ||
![]() |
fe95afe1e2 | ||
![]() |
775aa5f38c | ||
![]() |
578c32814c | ||
![]() |
c46038f6b7 | ||
![]() |
306eefc49f | ||
![]() |
eade5150e4 | ||
![]() |
6d767afb7c | ||
![]() |
015a7d7362 | ||
![]() |
922c55a09b | ||
![]() |
4c83c13bc8 | ||
![]() |
bd7e30ea00 | ||
![]() |
4fb58ecea8 | ||
![]() |
a317cd5722 | ||
![]() |
8e2149d7df | ||
![]() |
9d9f1ecfaa | ||
![]() |
53b90bb25e | ||
![]() |
a0244ae347 | ||
![]() |
26f74e832b | ||
![]() |
9593c80062 | ||
![]() |
48b98cdc67 | ||
![]() |
9d442d2d7d | ||
![]() |
afc97d4735 | ||
![]() |
e5bea45df7 | ||
9e3935dfd8 | |||
4f5ee3f87b | |||
736d36b792 | |||
dc5cc27d5a | |||
eb70d77e1e | |||
b8ec4c49bd | |||
49487dfd78 | |||
0d3f25eb48 | |||
9ef13f70f4 | |||
![]() |
beb0dc5f36 | ||
![]() |
f3fd428697 | ||
8811fe6987 | |||
![]() |
3835603e7e | ||
![]() |
4b360ee2ca | ||
![]() |
ab546a7463 | ||
![]() |
acac7858bd | ||
![]() |
c42640b200 | ||
![]() |
ef84190a1a | ||
![]() |
7db16a8173 | ||
![]() |
e91ba7dc9d | ||
![]() |
95f90d27d2 | ||
![]() |
1e9ac36f66 | ||
![]() |
7d061cfe17 | ||
![]() |
e21e76a914 | ||
![]() |
b18806f811 | ||
![]() |
478394bab7 | ||
![]() |
de3196da60 | ||
![]() |
49549033fd | ||
![]() |
15dfbc503d | ||
![]() |
f5c694972e | ||
![]() |
a9785f58c6 | ||
![]() |
7a5e131735 | ||
![]() |
93229681b5 | ||
![]() |
8819b9c600 | ||
![]() |
5d62141092 | ||
![]() |
44b20d1d74 | ||
![]() |
9ad437eafb | ||
![]() |
4fcef88c4d | ||
![]() |
dd2089dfd8 | ||
![]() |
df0ff1a029 | ||
![]() |
41a4fd7a61 | ||
![]() |
a4d8ebfaa1 | ||
![]() |
0ae7dcae2c | ||
![]() |
d6c23ec06a | ||
![]() |
3499f0f3e3 | ||
![]() |
7056dd763f | ||
![]() |
eade41f3ec | ||
![]() |
2f14399e40 | ||
![]() |
4f3ce00704 | ||
![]() |
d8ef221893 | ||
![]() |
8d003e22ca | ||
![]() |
b0b57fa13b | ||
![]() |
266f6af570 | ||
![]() |
241c55aabe | ||
![]() |
030896c76a | ||
![]() |
beb93f987c | ||
![]() |
8e8813a0a1 | ||
![]() |
c3c2325adc | ||
![]() |
f8429ed58c | ||
![]() |
df4763a782 | ||
![]() |
58af0caf04 | ||
![]() |
3aafe82485 | ||
![]() |
07679e680c | ||
![]() |
da835cc8a3 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,16 +1,13 @@
|
||||
.config
|
||||
.version
|
||||
*.o
|
||||
*.so
|
||||
*.d
|
||||
*.exe
|
||||
*.ho
|
||||
*-example
|
||||
*-test
|
||||
*_g
|
||||
*.def
|
||||
*.dll
|
||||
*.lib
|
||||
*.exp
|
||||
config.*
|
||||
doc/*.1
|
||||
doc/*.html
|
||||
@@ -20,9 +17,6 @@ ffmpeg
|
||||
ffplay
|
||||
ffprobe
|
||||
ffserver
|
||||
libavcodec/*_tablegen
|
||||
libavcodec/*_tables.c
|
||||
libavcodec/*_tables.h
|
||||
libavcodec/libavcodec*
|
||||
libavcore/libavcore*
|
||||
libavdevice/libavdevice*
|
||||
|
9
CREDITS
9
CREDITS
@@ -1,7 +1,5 @@
|
||||
This file contains the names of some of the people who have contributed to
|
||||
FFmpeg. The names are sorted alphabetically by last name. As this file is
|
||||
currently quite outdated and git serves as a much better tool for determining
|
||||
authorship, it remains here for historical reasons only.
|
||||
This file contains the name of the people who have contributed to
|
||||
FFmpeg. The names are sorted alphabetically by last name.
|
||||
|
||||
Dénes Balatoni
|
||||
Michel Bardiaux
|
||||
@@ -9,10 +7,8 @@ Fabrice Bellard
|
||||
Patrice Bensoussan
|
||||
Alex Beregszaszi
|
||||
BERO
|
||||
Thilo Borgmann
|
||||
Mario Brito
|
||||
Ronald Bultje
|
||||
Alex Converse
|
||||
Maarten Daniels
|
||||
Reimar Doeffinger
|
||||
Tim Ferguson
|
||||
@@ -41,7 +37,6 @@ Michael Niedermayer
|
||||
François Revol
|
||||
Peter Ross
|
||||
Måns Rullgård
|
||||
Stefano Sabatini
|
||||
Roman Shaposhnik
|
||||
Oded Shimon
|
||||
Dieter Shirley
|
||||
|
629
Changelog
Normal file
629
Changelog
Normal file
@@ -0,0 +1,629 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version 0.5.10:
|
||||
|
||||
- mpeg12: do not decode extradata more than once (CVE-2012-2803)
|
||||
- vp6: properly fail on unsupported feature (CVE-2012-2783)
|
||||
- vp56: release frames on error (CVE-2012-2783)
|
||||
- shorten: Use separate pointers for the allocated memory for decoded samples (CVE-2012-0858)
|
||||
- shorten: check for realloc failure
|
||||
- h264: check context state before decoding slice data partitions
|
||||
- oggdec: check memory allocation
|
||||
- Fix uninitialized reads on malformed Ogg files
|
||||
- lavf: avoid integer overflow in ff_compute_frame_duration()
|
||||
- yuv4mpeg: reject unsupported codecs
|
||||
- tiffenc: Check av_malloc() results
|
||||
- mpegaudiodec: fix short_start calculation
|
||||
- h264: avoid stuck buffer pointer in decode_nal_units
|
||||
- yuv4mpeg: return proper error codes (Bug 373)
|
||||
- avidec: return 0, not packet size from read_packet()
|
||||
- cavsdec: check for changing w/h (CVE-2012-2777 and CVE-2012-2784)
|
||||
- avidec: use actually read size instead of requested size CVE-2012-2788
|
||||
- bytestream: add a new set of bytestream functions with overread checking
|
||||
- avsdec: Set dimensions instead of relying on the demuxer (CVE-2012-2801)
|
||||
- lavfi: avfilter_merge_formats: handle case where inputs are same
|
||||
- bmpdec: only initialize palette for pal8 (Bug 367)
|
||||
- Bump version number for the 0.5.10 release
|
||||
- lavfi: avfilter_merge_formats: handle case where inputs are same
|
||||
- mpegvideo: Don't use ff_mspel_motion() for vc1
|
||||
- imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
|
||||
- nuv: check RTjpeg header for validity
|
||||
- vc1dec: add flush function for WMV9 and VC-1 decoders
|
||||
|
||||
|
||||
version 0.5.9:
|
||||
|
||||
- dpcm: ignore extra unpaired bytes in stereo streams (CVE-2011-3951)
|
||||
- h264: Add check for invalid chroma_format_idc (CVE-2012-0851)
|
||||
- adpcm: ADPCM Electronic Arts has always two channels (CVE-2012-0852)
|
||||
- kmvc: Check palsize (CVE-2011-3952)
|
||||
- qdm2: clip array indices returned by qdm2_get_vlc()
|
||||
- configure: properly check for mingw-w64 through installed headers
|
||||
- Replace every usage of -lvfw32 with what is particularly necessary for that case
|
||||
- mingw32: properly check if vfw capture is supported by the system headers
|
||||
- mingw32: merge checks for mingw-w64 and mingw32-runtime >= 3.15 into one
|
||||
- vfwcap: Include windows.h before vfw.h since the latter requires defines from the former
|
||||
- ea: check chunk_size for validity
|
||||
- eatqi: move "block" variable into context to ensure sufficient alignment for idct_put
|
||||
- tqi: Pass errors from the MB decoder
|
||||
- png: check bit depth for PAL8/Y400A pixel formats.
|
||||
|
||||
|
||||
version 0.5.8:
|
||||
|
||||
- id3v2: fix skipping extended header in id3v2.4
|
||||
- nsvdec: Several bugfixes related to CVE-2011-3940
|
||||
- dv: check stype
|
||||
- dv: Fix null pointer dereference due to ach=0
|
||||
- dv: Fix small stack overread related to CVE-2011-3929 and CVE-2011-3936.
|
||||
- atrac3: Fix crash in tonal component decoding, fixes CVE-2012-0853
|
||||
- mjpegbdec: Fix overflow in SOS, fixes CVE-2011-3947
|
||||
- motionpixels: Clip YUV values after applying a gradient.
|
||||
- vqavideo: return error if image size is not a multiple of block size,
|
||||
fixes CVE-2012-0947.
|
||||
|
||||
|
||||
version 0.5.7:
|
||||
- vorbis: An additional defense in the Vorbis codec. (CVE-2011-3895)
|
||||
- vorbisdec: Fix decoding bug with channel handling.
|
||||
- matroskadec: Fix a bug where a pointer was cached to an array that might
|
||||
later move due to a realloc(). (CVE-2011-3893)
|
||||
- vorbis: Avoid some out-of-bounds reads. (CVE-2011-3893)
|
||||
- vp3: fix oob read for negative tokens and memleaks on error, (CVE-2011-3892)
|
||||
- vp3: fix streams with non-zero last coefficient.
|
||||
|
||||
|
||||
version 0.5.6:
|
||||
- svq1dec: call avcodec_set_dimensions() after dimensions changed. (NGS00148, CVE-2011-4579)
|
||||
- vmd: fix segfaults on corruped streams (CVE-2011-4364)
|
||||
- commits related to CVE-2011-4353:
|
||||
- vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
|
||||
- Plug some memory leaks in the VP6 decoder
|
||||
- vp6: Reset the internal state when aborting key frames header parsing
|
||||
- vp6: Fix illegal read.
|
||||
- vp6: Fix illegal read.
|
||||
- Fix out of bound reads in the QDM2 decoder.
|
||||
- commits related to CVE-2011-4351:
|
||||
- Check for out of bound writes in the QDM2 decoder.
|
||||
- qdm2: check output buffer size before decoding
|
||||
- Fix qdm2 decoder packet handling to match the api
|
||||
|
||||
|
||||
version 0.5.5:
|
||||
|
||||
- Fix memory (re)allocation in matroskadec.c (MSVR11-011/CVE-2011-3504)
|
||||
- Fix some crashes with invalid bitstreams in the CAVS decoder
|
||||
(CVE-2011-3362, CVE-2011-3973, CVE-2011-3974)
|
||||
- Compilation fixes for gcc-4.6, testsuite now passes again
|
||||
- Detect and handle overreads in the MJPEG decoder.
|
||||
- multiple other security fixes.
|
||||
|
||||
|
||||
|
||||
version 0.5.4:
|
||||
|
||||
- Fix memory corruption in WMV parsing (addresses CVE-2010-3908)
|
||||
- Fix heap corruption crashes (addresses CVE-2011-0722)
|
||||
- Fix crashes in Vorbis decoding found by zzuf (addresses CVE-2010-4704)
|
||||
- Fix another crash in Vorbis decoding (addresses CVE-2011-0480, Chrome issue 68115)
|
||||
- Fix invalid reads in VC-1 decoding (related to CVE-2011-0723)
|
||||
- Do not attempt to decode APE file with no frames
|
||||
(adresses http://packetstorm.linuxsecurity.com/1103-exploits/vlc105-dos.txt)
|
||||
|
||||
|
||||
|
||||
version 0.5.3:
|
||||
|
||||
- build system improvements
|
||||
- performance fix for seekable HTTP
|
||||
- fix several potentially exploitable issues in the FLIC decoder
|
||||
(addresses CVE-2010-3429)
|
||||
|
||||
|
||||
|
||||
version 0.5.2:
|
||||
|
||||
- Hurd support
|
||||
- PowerPC without AltiVec compilation issues
|
||||
- validate channels and samplerate in the Vorbis decoder
|
||||
|
||||
|
||||
|
||||
version 0.5.1:
|
||||
|
||||
- build system updates
|
||||
- documentation updates
|
||||
- libswscale now is LGPL except for x86 optimizations
|
||||
- fix for GPL code in libswscale that was erroneously activated
|
||||
- AltiVec code in libswscale is now LGPL
|
||||
- remaining GPL parts in AC-3 decoder converted to LGPL
|
||||
- (L)GPL license upgrade support
|
||||
- AMR-NB decoding/encoding, AMR-WB decoding via OpenCORE libraries
|
||||
- enable symbol versioning by default for linkers that support it
|
||||
- backport av_lockmgr_register(), see doc/APIchanges for details
|
||||
- security fixes for:
|
||||
- ASF, Ogg and MOV demuxers
|
||||
- FFv1, H.264, HuffYUV, MLP, MPEG audio and Snow decoders
|
||||
|
||||
|
||||
|
||||
version 0.5:
|
||||
|
||||
- The "device" muxers and demuxers are now in a new libavdevice library
|
||||
- DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer
|
||||
- DV100 AKA DVCPRO HD decoder 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 encoder/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 encoder and decoder
|
||||
- CamStudio video decoder
|
||||
- build system improvements
|
||||
- tabs and trailing whitespace removed from the codebase
|
||||
- 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 Blocks Motion Video decoder and encoder
|
||||
- improved Theora/VP3 decoder
|
||||
- True Audio (TTA) decoder
|
||||
- AVS demuxer and video decoder
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- Matroska muxer
|
||||
- slice-based parallel H.264 decoding
|
||||
- Monkey's Audio demuxer and decoder
|
||||
- additional SPARC (VIS) optimizations
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- RV30 and RV40 decoder
|
||||
- QCELP / PureVoice 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
|
||||
|
||||
|
||||
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
|
4
INSTALL
4
INSTALL
@@ -9,7 +9,3 @@ path when launching 'configure', e.g. '/ffmpegdir/ffmpeg/configure'.
|
||||
2) Then type 'make' to build FFmpeg. GNU Make 3.81 or later is required.
|
||||
|
||||
3) Type 'make install' to install all binaries and libraries you built.
|
||||
|
||||
NOTICE
|
||||
|
||||
- Non system dependencies (e.g. libx264, libvpx) are disabled by default.
|
||||
|
10
LICENSE
10
LICENSE
@@ -14,7 +14,10 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
|
||||
Specifically, the GPL parts of FFmpeg are
|
||||
|
||||
- libpostproc
|
||||
- some x86 optimizations in libswscale
|
||||
- optional x86 optimizations in the files
|
||||
libavcodec/x86/h264_deblock_sse2.asm
|
||||
libavcodec/x86/h264_idct_sse2.asm
|
||||
libavcodec/x86/idct_mmx.c
|
||||
- the X11 grabber in libavdevice/x11grab.c
|
||||
|
||||
@@ -41,6 +44,7 @@ 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
|
||||
version needs to be upgraded by passing --enable-version3 to configure.
|
||||
|
||||
The nonfree external libraries libfaac and libaacplus can be hooked up in FFmpeg.
|
||||
You need to pass --enable-nonfree to configure to enable it. Employ this option
|
||||
with care as FFmpeg then becomes nonfree and unredistributable.
|
||||
The nonfree external libraries libamrnb, libamrwb and libfaac can be hooked up
|
||||
in FFmpeg. You need to pass --enable-nonfree to configure to enable them. Employ
|
||||
this option with care as FFmpeg then becomes nonfree and unredistributable.
|
||||
Note that libfaac claims to be LGPL, but is not.
|
||||
|
115
MAINTAINERS
115
MAINTAINERS
@@ -18,11 +18,17 @@ Applications
|
||||
ffmpeg:
|
||||
ffmpeg.c Michael Niedermayer
|
||||
|
||||
ffplay:
|
||||
ffplay.c Marton Balint
|
||||
Video Hooks:
|
||||
vhook
|
||||
vhook/watermark.c Marcus Engene
|
||||
vhook/ppm.c
|
||||
vhook/drawtext.c
|
||||
vhook/fish.c
|
||||
vhook/null.c
|
||||
vhook/imlib2.c
|
||||
|
||||
ffprobe:
|
||||
ffprobe.c Stefano Sabatini
|
||||
ffplay:
|
||||
ffplay.c Michael Niedermayer
|
||||
|
||||
ffserver:
|
||||
ffserver.c, ffserver.h Baptiste Coudurier
|
||||
@@ -31,19 +37,18 @@ Commandline utility code:
|
||||
cmdutils.c, cmdutils.h Michael Niedermayer
|
||||
|
||||
QuickTime faststart:
|
||||
tools/qt-faststart.c Baptiste Coudurier
|
||||
qt-faststart.c Mike Melanson
|
||||
|
||||
|
||||
Miscellaneous Areas
|
||||
===================
|
||||
|
||||
documentation Mike Melanson
|
||||
documentation Mike Melanson, Diego Biurrun
|
||||
website Robert Swain
|
||||
build system (configure,Makefiles) Diego Biurrun, Mans Rullgard
|
||||
project server Diego Biurrun, Mans Rullgard
|
||||
mailinglists Michael Niedermayer, Baptiste Coudurier
|
||||
presets Robert Swain
|
||||
metadata subsystem Aurelien Jacobs
|
||||
release management Diego Biurrun, Reinhard Tartler
|
||||
|
||||
|
||||
@@ -101,31 +106,25 @@ Generic Parts:
|
||||
simple_idct.c, simple_idct.h Michael Niedermayer
|
||||
postprocessing:
|
||||
libpostproc/* Michael Niedermayer
|
||||
table generation:
|
||||
tableprint.c, tableprint.h Reimar Doeffinger
|
||||
vdpau:
|
||||
vdpau* Carl Eugen Hoyos
|
||||
|
||||
Codecs:
|
||||
4xm.c Michael Niedermayer
|
||||
8bps.c Roberto Togni
|
||||
8svx.c Jaikrishnan Menon
|
||||
aasc.c Kostya Shishkov
|
||||
aac.[ch], aactab.[ch], aacdectab.h Robert Swain
|
||||
ac3* Justin Ruggles
|
||||
alacenc.c Jaikrishnan Menon
|
||||
alsdec.c Thilo Borgmann
|
||||
apedec.c Kostya Shishkov
|
||||
ass* Aurelien Jacobs
|
||||
asv* Michael Niedermayer
|
||||
atrac3* Benjamin Larsson
|
||||
bgmc.c, bgmc.h Thilo Borgmann
|
||||
bink.c Kostya Shishkov
|
||||
binkaudio.c Peter Ross
|
||||
bmp.c Mans Rullgard, Kostya Shishkov
|
||||
cavs* Stefan Gehrer
|
||||
celp_filters.* Vitor Sessak
|
||||
cinepak.c Roberto Togni
|
||||
cljr Alex Beregszaszi
|
||||
cook.c, cookdata.h Benjamin Larsson
|
||||
crystalhd.c Philip Langdale
|
||||
cscd.c Reimar Doeffinger
|
||||
dca.c Kostya Shishkov, Benjamin Larsson
|
||||
dnxhd* Baptiste Coudurier
|
||||
@@ -134,10 +133,10 @@ Codecs:
|
||||
dv.c Roman Shaposhnik
|
||||
eacmv*, eaidct*, eat* Peter Ross
|
||||
ffv1.c Michael Niedermayer
|
||||
flac* Justin Ruggles
|
||||
flacdec.c Alex Beregszaszi, Justin Ruggles
|
||||
flacenc.c Justin Ruggles
|
||||
flashsv* Benjamin Larsson
|
||||
flicvideo.c Mike Melanson
|
||||
g722.c Martin Storsjo
|
||||
g726.c Roman Shaposhnik
|
||||
gifdec.c Baptiste Coudurier
|
||||
h264* Loren Merritt, Michael Niedermayer
|
||||
@@ -147,28 +146,18 @@ Codecs:
|
||||
idcinvideo.c Mike Melanson
|
||||
imc* Benjamin Larsson
|
||||
indeo2* Kostya Shishkov
|
||||
indeo5* Kostya Shishkov
|
||||
interplayvideo.c Mike Melanson
|
||||
ivi* Kostya Shishkov
|
||||
jpeg_ls.c Kostya Shishkov
|
||||
jvdec.c Peter Ross
|
||||
kmvc.c Kostya Shishkov
|
||||
lcl*.c Roberto Togni, Reimar Doeffinger
|
||||
lcl*.c Roberto Togni
|
||||
libgsm.c Michel Bardiaux
|
||||
libdirac* David Conrad
|
||||
libopenjpeg.c Jaikrishnan Menon
|
||||
libschroedinger* David Conrad
|
||||
libspeexdec.c Justin Ruggles
|
||||
libtheoraenc.c David Conrad
|
||||
libvorbis.c David Conrad
|
||||
libxavs.c Stefan Gehrer
|
||||
libx264.c Mans Rullgard, Jason Garrett-Glaser
|
||||
loco.c Kostya Shishkov
|
||||
lzo.h, lzo.c Reimar Doeffinger
|
||||
mdec.c Michael Niedermayer
|
||||
mimic.c Ramiro Polla
|
||||
mjpeg.c Michael Niedermayer
|
||||
mlp* Ramiro Polla
|
||||
mmvideo.c Peter Ross
|
||||
mpc* Kostya Shishkov
|
||||
mpeg12.c, mpeg12data.h Michael Niedermayer
|
||||
@@ -179,7 +168,6 @@ Codecs:
|
||||
nellymoserdec.c Benjamin Larsson
|
||||
nuv.c Reimar Doeffinger
|
||||
pcx.c Ivo van Poorten
|
||||
pgssubdec.c Reimar Doeffinger
|
||||
ptx.c Ivo van Poorten
|
||||
qcelp* Reynaldo H. Verdejo Pinochet
|
||||
qdm2.c, qdm2data.h Roberto Togni, Benjamin Larsson
|
||||
@@ -195,11 +183,9 @@ Codecs:
|
||||
rv3* Kostya Shishkov
|
||||
rv4* Kostya Shishkov
|
||||
s3tc* Ivo van Poorten
|
||||
smacker.c Kostya Shishkov
|
||||
smc.c Mike Melanson
|
||||
snow.c Michael Niedermayer, Loren Merritt
|
||||
sonic.c Alex Beregszaszi
|
||||
srt* Aurelien Jacobs
|
||||
sunrast.c Ivo van Poorten
|
||||
svq3.c Michael Niedermayer
|
||||
targa.c Kostya Shishkov
|
||||
@@ -208,7 +194,7 @@ Codecs:
|
||||
truemotion2* Kostya Shishkov
|
||||
truespeech.c Kostya Shishkov
|
||||
tscc.c Kostya Shishkov
|
||||
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
||||
tta.c Alex Beregszaszi
|
||||
txd.c Ivo van Poorten
|
||||
ulti* Kostya Shishkov
|
||||
vb.c Kostya Shishkov
|
||||
@@ -216,15 +202,12 @@ Codecs:
|
||||
vcr1.c Michael Niedermayer
|
||||
vmnc.c Kostya Shishkov
|
||||
vorbis_enc.c Oded Shimon
|
||||
vorbis_dec.c Denes Balatoni, David Conrad
|
||||
vorbis_dec.c Denes Balatoni
|
||||
vp3* Mike Melanson
|
||||
vp5 Aurelien Jacobs
|
||||
vp6 Aurelien Jacobs
|
||||
vp8 David Conrad, Jason Garrett-Glaser, Ronald Bultje
|
||||
vqavideo.c Mike Melanson
|
||||
wavpack.c Kostya Shishkov
|
||||
wmaprodec.c Sascha Sommer
|
||||
wmavoice.c Ronald S. Bultje
|
||||
wmv2.c Michael Niedermayer
|
||||
wnv1.c Kostya Shishkov
|
||||
xan.c Mike Melanson
|
||||
@@ -232,12 +215,6 @@ Codecs:
|
||||
xvmc.c Ivan Kalvachev
|
||||
zmbv* Kostya Shishkov
|
||||
|
||||
Hardware acceleration:
|
||||
crystalhd.c Philip Langdale
|
||||
dxva2* Laurent Aimar
|
||||
vaapi* Gwenole Beauchesne
|
||||
vdpau* Carl Eugen Hoyos
|
||||
|
||||
|
||||
libavdevice
|
||||
===========
|
||||
@@ -265,15 +242,11 @@ Muxers/Demuxers:
|
||||
adtsenc.c Robert Swain
|
||||
aiff.c Baptiste Coudurier
|
||||
ape.c Kostya Shishkov
|
||||
ass* Aurelien Jacobs
|
||||
avi* Michael Niedermayer
|
||||
bink.c Peter Ross
|
||||
caf* Peter Ross
|
||||
crc.c Michael Niedermayer
|
||||
daud.c Reimar Doeffinger
|
||||
dv.c Roman Shaposhnik
|
||||
dxa.c Kostya Shishkov
|
||||
electronicarts.c Peter Ross
|
||||
ffm* Baptiste Coudurier
|
||||
flac* Justin Ruggles
|
||||
flic.c Mike Melanson
|
||||
@@ -281,54 +254,44 @@ Muxers/Demuxers:
|
||||
gxf.c Reimar Doeffinger
|
||||
gxfenc.c Baptiste Coudurier
|
||||
idcin.c Mike Melanson
|
||||
idroqdec.c Mike Melanson
|
||||
idroq.c Mike Melanson
|
||||
iff.c Jaikrishnan Menon
|
||||
ipmovie.c Mike Melanson
|
||||
img2.c Michael Niedermayer
|
||||
iss.c Stefan Gehrer
|
||||
jvdec.c Peter Ross
|
||||
libnut.c Oded Shimon
|
||||
lmlm4.c Ivo van Poorten
|
||||
lxfdec.c Tomas Härdin
|
||||
matroska.c Aurelien Jacobs
|
||||
matroskadec.c Aurelien Jacobs
|
||||
matroskaenc.c David Conrad
|
||||
metadata* Aurelien Jacobs
|
||||
microdvd* Aurelien Jacobs
|
||||
mm.c Peter Ross
|
||||
mov.c Michael Niedermayer, Baptiste Coudurier
|
||||
movenc.c Michael Niedermayer, Baptiste Coudurier
|
||||
mpc.c Kostya Shishkov
|
||||
mpeg.c Michael Niedermayer
|
||||
mpegenc.c Michael Niedermayer
|
||||
mpegts* Baptiste Coudurier
|
||||
mpegts* Mans Rullgard
|
||||
msnwc_tcp.c Ramiro Polla
|
||||
mtv.c Reynaldo H. Verdejo Pinochet
|
||||
mxf* Baptiste Coudurier
|
||||
nsvdec.c Francois Revol
|
||||
nut.c Michael Niedermayer
|
||||
nuv.c Reimar Doeffinger
|
||||
oggdec.c, oggdec.h David Conrad
|
||||
oggdec.c, oggdec.h Mans Rullgard
|
||||
oggenc.c Baptiste Coudurier
|
||||
oggparse*.c David Conrad
|
||||
oma.c Maxim Poliakovski
|
||||
oggparsevorbis.c Mans Rullgard
|
||||
oggparseogm.c Mans Rullgard
|
||||
psxstr.c Mike Melanson
|
||||
pva.c Ivo van Poorten
|
||||
r3d.c Baptiste Coudurier
|
||||
raw.c Michael Niedermayer
|
||||
rdt.c Ronald S. Bultje
|
||||
rl2.c Sascha Sommer
|
||||
rmdec.c, rmenc.c Ronald S. Bultje, Kostya Shishkov
|
||||
rtmp* Kostya Shishkov
|
||||
rtp.c, rtpenc.c Martin Storsjo
|
||||
rtpdec_asf.* Ronald S. Bultje
|
||||
rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo
|
||||
rm.c Roberto Togni
|
||||
rtp.c, rtpenc.c Luca Abeni
|
||||
rtp_mpv.*, rtp_aac.* Luca Abeni
|
||||
rtsp.c Luca Barbato
|
||||
sdp.c Martin Storsjo
|
||||
sdp.c Luca Abeni
|
||||
segafilm.c Mike Melanson
|
||||
siff.c Kostya Shishkov
|
||||
smacker.c Kostya Shishkov
|
||||
srtdec.c Aurelien Jacobs
|
||||
swf.c Baptiste Coudurier
|
||||
tta.c Alex Beregszaszi
|
||||
txd.c Ivo van Poorten
|
||||
@@ -336,12 +299,9 @@ Muxers/Demuxers:
|
||||
wav.c Michael Niedermayer
|
||||
wc3movie.c Mike Melanson
|
||||
westwood.c Mike Melanson
|
||||
wtv.c Peter Ross
|
||||
wv.c Kostya Shishkov
|
||||
|
||||
Protocols:
|
||||
http.c Ronald S. Bultje
|
||||
mms*.c Ronald S. Bultje
|
||||
udp.c Luca Abeni
|
||||
|
||||
|
||||
@@ -350,8 +310,7 @@ Operating systems / CPU architectures
|
||||
|
||||
Alpha Mans Rullgard, Falk Hueffner
|
||||
ARM Mans Rullgard
|
||||
AVR32 Mans Rullgard
|
||||
MIPS Mans Rullgard
|
||||
BeOS Francois Revol
|
||||
Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier
|
||||
Amiga / PowerPC Colin Ward
|
||||
Linux / PowerPC Luca Barbato
|
||||
@@ -365,26 +324,12 @@ x86 Michael Niedermayer
|
||||
GnuPG Fingerprints of maintainers and others who have svn write access
|
||||
======================================================================
|
||||
|
||||
Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB
|
||||
Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB
|
||||
Attila Kinali 11F0 F9A6 A1D2 11F6 C745 D10C 6520 BCDD F2DF E765
|
||||
Baptiste Coudurier 8D77 134D 20CC 9220 201F C5DB 0AC9 325C 5C1A BAAA
|
||||
Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C
|
||||
Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
||||
Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7
|
||||
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
|
||||
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
||||
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
||||
Luca Barbato 6677 4209 213C 8843 5B67 29E7 E84C 78C2 84E9 0E34
|
||||
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
|
||||
Panagiotis Issaris 515C E262 10A8 FDCE 5481 7B9C 3AD7 D9A5 071D B3A9
|
||||
Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B
|
||||
Reimar Döffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7
|
||||
Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4
|
||||
Reynaldo H. Verdejo Pinochet 6E27 CD34 170C C78E 4D4F 5F40 C18E 077F 3114 452A
|
||||
Robert Swain EE7A 56EA 4A81 A7B5 2001 A521 67FA 362D A2FC 3E71
|
||||
Sascha Sommer 38A0 F88B 868E 9D3A 97D4 D6A0 E823 706F 1E07 0D3C
|
||||
Stefano Sabatini 9A43 10F8 D32C D33C 48E7 C52C 5DF2 8E4D B2EE 066B
|
||||
Tomas Härdin D133 29CA 4EEC 9DB4 7076 F697 B04B 7403 3313 41FD
|
||||
|
460
Makefile
460
Makefile
@@ -2,71 +2,53 @@ include config.mak
|
||||
|
||||
SRC_DIR = $(SRC_PATH_BARE)
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.h $(SRC_DIR)
|
||||
vpath %.S $(SRC_DIR)
|
||||
vpath %.asm $(SRC_DIR)
|
||||
vpath %.v $(SRC_DIR)
|
||||
vpath %.texi $(SRC_PATH_BARE)
|
||||
|
||||
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
||||
PROGS-$(CONFIG_FFPLAY) += ffplay
|
||||
PROGS-$(CONFIG_FFPROBE) += ffprobe
|
||||
PROGS-$(CONFIG_FFSERVER) += ffserver
|
||||
|
||||
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
||||
PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
|
||||
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
|
||||
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
||||
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html)
|
||||
TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
|
||||
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
||||
HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
||||
PROGS = $(addsuffix $(EXESUF), $(PROGS-yes))
|
||||
PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
|
||||
OBJS = $(addsuffix .o, $(PROGS-yes)) cmdutils.o
|
||||
MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
|
||||
|
||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
||||
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
||||
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||
BASENAMES = ffmpeg ffplay ffserver
|
||||
ALLPROGS = $(addsuffix $(EXESUF), $(BASENAMES))
|
||||
ALLPROGS_G = $(addsuffix _g$(EXESUF), $(BASENAMES))
|
||||
ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
|
||||
|
||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||
|
||||
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
||||
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
||||
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
||||
FFLIBS-$(CONFIG_AVCODEC) += avcodec
|
||||
FFLIBS-$(CONFIG_POSTPROC) += postproc
|
||||
FFLIBS-$(CONFIG_SWSCALE) += swscale
|
||||
|
||||
FFLIBS := avutil
|
||||
FFLIBS := avdevice avformat avcodec avutil
|
||||
|
||||
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset)
|
||||
|
||||
SKIPHEADERS = cmdutils_common_opts.h
|
||||
|
||||
include common.mak
|
||||
|
||||
FF_LDFLAGS := $(FFLDFLAGS)
|
||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||
FF_DEP_LIBS := $(DEP_LIBS)
|
||||
|
||||
all-$(CONFIG_DOC): documentation
|
||||
ALL_TARGETS-$(CONFIG_VHOOK) += videohook
|
||||
ALL_TARGETS-$(BUILD_DOC) += documentation
|
||||
|
||||
all: $(FF_DEP_LIBS) $(PROGS)
|
||||
INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
|
||||
ifneq ($(PROGS),)
|
||||
INSTALL_TARGETS-yes += install-progs install-data
|
||||
INSTALL_TARGETS-$(BUILD_DOC) += install-man
|
||||
endif
|
||||
INSTALL_PROGS_TARGETS-$(BUILD_SHARED) = install-libs
|
||||
|
||||
all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
|
||||
|
||||
$(PROGS): %$(EXESUF): %_g$(EXESUF)
|
||||
$(CP) $< $@
|
||||
cp -p $< $@
|
||||
$(STRIP) $@
|
||||
|
||||
config.h: .config
|
||||
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
|
||||
@-tput bold 2>/dev/null
|
||||
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
||||
@-tput sgr0 2>/dev/null
|
||||
|
||||
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
|
||||
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
|
||||
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS
|
||||
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTS
|
||||
|
||||
define RESET
|
||||
$(1) :=
|
||||
@@ -81,230 +63,298 @@ endef
|
||||
|
||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||
|
||||
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
||||
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
||||
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
|
||||
|
||||
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||
$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||
$(CC) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||
|
||||
alltools: $(TOOLS)
|
||||
output_example$(EXESUF): output_example.o $(FF_DEP_LIBS)
|
||||
$(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
|
||||
tools/%$(EXESUF): tools/%.o
|
||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
tools/%$(EXESUF): tools/%.c
|
||||
$(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
|
||||
tools/%.o: tools/%.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
|
||||
ffplay.o ffplay.d: CFLAGS += $(SDL_CFLAGS)
|
||||
|
||||
-include $(wildcard tools/*.d)
|
||||
-include $(wildcard tests/*.d)
|
||||
cmdutils.o cmdutils.d: version.h
|
||||
|
||||
VERSION_SH = $(SRC_PATH_BARE)/version.sh
|
||||
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
|
||||
alltools: $(addsuffix $(EXESUF),$(addprefix tools/, cws2fws pktdumper qt-faststart trasher))
|
||||
|
||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
||||
.version: M=@
|
||||
VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
|
||||
|
||||
version.h .version:
|
||||
$(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION)
|
||||
$(Q)touch .version
|
||||
BASEHOOKS = fish null watermark
|
||||
ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
|
||||
ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
|
||||
|
||||
# force version.sh to run whenever version might have changed
|
||||
-include .version
|
||||
HOOKS-$(HAVE_FORK) += ppm
|
||||
HOOKS-$(HAVE_IMLIB2) += imlib2
|
||||
HOOKS-$(HAVE_FREETYPE2) += drawtext
|
||||
|
||||
DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
||||
HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
|
||||
|
||||
documentation: $(DOCS)
|
||||
VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
|
||||
LIBS_imlib2$(SLIBSUF) = `imlib2-config --libs`
|
||||
|
||||
-include $(wildcard $(DOCS:%=%.d))
|
||||
VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
|
||||
LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
|
||||
|
||||
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
||||
VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
|
||||
|
||||
doc/%.html: TAG = HTML
|
||||
doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
|
||||
$(Q)$(TEXIDEP)
|
||||
$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $<
|
||||
vhook/%.o vhook/%.d: CFLAGS:=$(VHOOKCFLAGS)
|
||||
|
||||
doc/%.pod: TAG = POD
|
||||
doc/%.pod: doc/%.texi
|
||||
$(Q)$(TEXIDEP)
|
||||
$(M)doc/texi2pod.pl $< $@
|
||||
# vhooks compile fine without libav*, but need them nonetheless.
|
||||
videohook: $(FF_DEP_LIBS) $(HOOKS)
|
||||
|
||||
$(eval VHOOKSHFLAGS=$(VHOOKSHFLAGS))
|
||||
vhook/%$(SLIBSUF): vhook/%.o
|
||||
$(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
|
||||
|
||||
VHOOK_DEPS = $(HOOKS:$(SLIBSUF)=.d)
|
||||
depend dep: $(VHOOK_DEPS)
|
||||
|
||||
documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
|
||||
ffplay-doc.html general.html hooks.html \
|
||||
$(ALLMANPAGES))
|
||||
|
||||
doc/%.html: doc/%.texi
|
||||
texi2html -monolithic -number $<
|
||||
mv $(@F) $@
|
||||
|
||||
doc/%.pod: doc/%-doc.texi
|
||||
doc/texi2pod.pl $< $@
|
||||
|
||||
doc/%.1: TAG = MAN
|
||||
doc/%.1: doc/%.pod
|
||||
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
||||
pod2man --section=1 --center=" " --release=" " $< > $@
|
||||
|
||||
ifdef PROGS
|
||||
install: install-progs install-data
|
||||
endif
|
||||
install: $(INSTALL_TARGETS-yes)
|
||||
|
||||
install: install-libs install-headers
|
||||
|
||||
install-libs: install-libs-yes
|
||||
|
||||
install-progs-yes:
|
||||
install-progs-$(CONFIG_DOC): install-man
|
||||
install-progs-$(CONFIG_SHARED): install-libs
|
||||
|
||||
install-progs: install-progs-yes $(PROGS)
|
||||
$(Q)mkdir -p "$(BINDIR)"
|
||||
$(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)"
|
||||
install-progs: $(PROGS) $(INSTALL_PROGS_TARGETS-yes)
|
||||
install -d "$(BINDIR)"
|
||||
install -c -m 755 $(PROGS) "$(BINDIR)"
|
||||
|
||||
install-data: $(DATA_FILES)
|
||||
$(Q)mkdir -p "$(DATADIR)"
|
||||
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
||||
install -d "$(DATADIR)"
|
||||
install -m 644 $(DATA_FILES) "$(DATADIR)"
|
||||
|
||||
install-man: $(MANPAGES)
|
||||
$(Q)mkdir -p "$(MANDIR)/man1"
|
||||
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||
install -d "$(MANDIR)/man1"
|
||||
install -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||
|
||||
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data uninstall-man
|
||||
install-vhook: videohook
|
||||
install -d "$(SHLIBDIR)/vhook"
|
||||
install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
|
||||
|
||||
uninstall: uninstall-progs uninstall-data uninstall-man uninstall-vhook
|
||||
|
||||
uninstall-progs:
|
||||
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
||||
rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
||||
|
||||
uninstall-data:
|
||||
$(RM) -r "$(DATADIR)"
|
||||
rm -rf "$(DATADIR)"
|
||||
|
||||
uninstall-man:
|
||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||
rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||
|
||||
uninstall-vhook:
|
||||
rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
|
||||
-rmdir "$(SHLIBDIR)/vhook/"
|
||||
|
||||
testclean:
|
||||
$(RM) -r tests/vsynth1 tests/vsynth2 tests/data
|
||||
$(RM) $(addprefix tests/,$(CLEANSUFFIXES))
|
||||
$(RM) tests/seek_test$(EXESUF) tests/seek_test.o
|
||||
$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
|
||||
rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
|
||||
|
||||
clean:: testclean
|
||||
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
||||
$(RM) $(CLEANSUFFIXES)
|
||||
$(RM) doc/*.html doc/*.pod doc/*.1 doc/*.d doc/*~
|
||||
$(RM) $(TOOLS)
|
||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||
rm -f $(ALLPROGS) $(ALLPROGS_G) output_example$(EXESUF)
|
||||
rm -f doc/*.html doc/*.pod doc/*.1
|
||||
rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
|
||||
rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
|
||||
rm -f vhook/*.o vhook/*~ vhook/*.so vhook/*.dylib vhook/*.dll
|
||||
|
||||
distclean::
|
||||
$(RM) $(DISTCLEANSUFFIXES)
|
||||
$(RM) config.* .version version.h libavutil/avconfig.h
|
||||
|
||||
config:
|
||||
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
||||
rm -f version.h config.* vhook/*.d
|
||||
|
||||
# regression tests
|
||||
|
||||
check: test
|
||||
check: test checkheaders
|
||||
|
||||
fulltest test: codectest lavftest lavfitest seektest
|
||||
fulltest test: codectest libavtest seektest
|
||||
|
||||
FFMPEG_REFFILE = $(SRC_PATH)/tests/ffmpeg.regression.ref
|
||||
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
||||
LIBAV_REFFILE = $(SRC_PATH)/tests/libav.regression.ref
|
||||
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
|
||||
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref
|
||||
|
||||
codectest: fate-codec
|
||||
lavftest: fate-lavf
|
||||
lavfitest: fate-lavfi
|
||||
seektest: fate-seek
|
||||
CODEC_TESTS = $(addprefix regtest-, \
|
||||
mpeg \
|
||||
mpeg2 \
|
||||
mpeg2thread \
|
||||
msmpeg4v2 \
|
||||
msmpeg4 \
|
||||
wmv1 \
|
||||
wmv2 \
|
||||
h261 \
|
||||
h263 \
|
||||
h263p \
|
||||
mpeg4 \
|
||||
huffyuv \
|
||||
rc \
|
||||
mpeg4adv \
|
||||
mpeg4thread \
|
||||
error \
|
||||
mpeg4nr \
|
||||
mpeg1b \
|
||||
mjpeg \
|
||||
ljpeg \
|
||||
jpegls \
|
||||
rv10 \
|
||||
rv20 \
|
||||
asv1 \
|
||||
asv2 \
|
||||
flv \
|
||||
ffv1 \
|
||||
snow \
|
||||
snowll \
|
||||
dv \
|
||||
dv50 \
|
||||
svq1 \
|
||||
flashsv \
|
||||
mp2 \
|
||||
ac3 \
|
||||
g726 \
|
||||
adpcm_ima_wav \
|
||||
adpcm_ima_qt \
|
||||
adpcm_ms \
|
||||
adpcm_yam \
|
||||
adpcm_swf \
|
||||
flac \
|
||||
wma \
|
||||
pcm \
|
||||
)
|
||||
|
||||
AREF = fate-acodec-aref
|
||||
VREF = fate-vsynth1-vref fate-vsynth2-vref
|
||||
REFS = $(AREF) $(VREF)
|
||||
LAVF_TESTS = $(addprefix regtest-, \
|
||||
avi \
|
||||
asf \
|
||||
rm \
|
||||
mpg \
|
||||
ts \
|
||||
swf \
|
||||
ffm \
|
||||
flv_fmt \
|
||||
mov \
|
||||
dv_fmt \
|
||||
gxf \
|
||||
nut \
|
||||
mkv \
|
||||
pbmpipe \
|
||||
pgmpipe \
|
||||
ppmpipe \
|
||||
gif \
|
||||
yuv4mpeg \
|
||||
pgm \
|
||||
ppm \
|
||||
bmp \
|
||||
tga \
|
||||
tiff \
|
||||
sgi \
|
||||
jpg \
|
||||
wav \
|
||||
alaw \
|
||||
mulaw \
|
||||
au \
|
||||
mmf \
|
||||
aiff \
|
||||
voc \
|
||||
ogg \
|
||||
pixfmt \
|
||||
)
|
||||
|
||||
$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
||||
$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
|
||||
REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
|
||||
|
||||
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
|
||||
CODEC_ROTOZOOM = $(call REGFILES,rotozoom.regression,$(CODEC_TESTS))
|
||||
CODEC_VSYNTH = $(call REGFILES,vsynth.regression,$(CODEC_TESTS))
|
||||
|
||||
LAVF_REGFILES = $(call REGFILES,lavf.regression,$(LAVF_TESTS))
|
||||
|
||||
LAVF_REG = tests/data/lavf.regression
|
||||
ROTOZOOM_REG = tests/data/rotozoom.regression
|
||||
VSYNTH_REG = tests/data/vsynth.regression
|
||||
|
||||
ifneq ($(CONFIG_SWSCALE),yes)
|
||||
servertest codectest $(CODEC_TESTS) libavtest: swscale-error
|
||||
swscale-error:
|
||||
@echo
|
||||
@echo "This regression test requires --enable-swscale."
|
||||
@echo
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ZLIB),yes)
|
||||
regtest-flashsv codectest: zlib-error
|
||||
endif
|
||||
zlib-error:
|
||||
@echo
|
||||
@echo "This regression test requires zlib."
|
||||
@echo
|
||||
@exit 1
|
||||
|
||||
codectest: $(VSYNTH_REG) $(ROTOZOOM_REG)
|
||||
diff -u -w $(FFMPEG_REFFILE) $(VSYNTH_REG)
|
||||
diff -u -w $(ROTOZOOM_REFFILE) $(ROTOZOOM_REG)
|
||||
|
||||
libavtest: $(LAVF_REG)
|
||||
diff -u -w $(LIBAV_REFFILE) $(LAVF_REG)
|
||||
|
||||
$(VSYNTH_REG) $(ROTOZOOM_REG) $(LAVF_REG):
|
||||
cat $^ > $@
|
||||
|
||||
$(LAVF_REG): $(LAVF_REGFILES)
|
||||
$(ROTOZOOM_REG): $(CODEC_ROTOZOOM)
|
||||
$(VSYNTH_REG): $(CODEC_VSYNTH)
|
||||
|
||||
$(CODEC_VSYNTH) $(CODEC_ROTOZOOM): $(CODEC_TESTS)
|
||||
|
||||
$(LAVF_REGFILES): $(LAVF_TESTS)
|
||||
|
||||
$(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
|
||||
|
||||
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
|
||||
|
||||
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
|
||||
$(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||
$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||
|
||||
$(LAVF_TESTS):
|
||||
$(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||
|
||||
seektest: codectest libavtest tests/seek_test$(EXESUF)
|
||||
$(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE) "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||
|
||||
servertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
|
||||
@echo
|
||||
@echo "Unfortunately ffserver is broken and therefore its regression"
|
||||
@echo "test fails randomly. Treat the results accordingly."
|
||||
@echo
|
||||
$(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
|
||||
$(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
|
||||
|
||||
tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
|
||||
@mkdir -p tests/vsynth1
|
||||
$(M)./$< 'tests/vsynth1/'
|
||||
tests/vsynth1/00.pgm: tests/videogen$(EXESUF)
|
||||
mkdir -p tests/vsynth1
|
||||
$(BUILD_ROOT)/$< 'tests/vsynth1/'
|
||||
|
||||
tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
|
||||
@mkdir -p tests/vsynth2
|
||||
$(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
|
||||
tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF)
|
||||
mkdir -p tests/vsynth2
|
||||
$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
|
||||
|
||||
tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
|
||||
@mkdir -p tests/data
|
||||
$(M)./$< $@
|
||||
tests/asynth1.sw: tests/audiogen$(EXESUF)
|
||||
$(BUILD_ROOT)/$< $@
|
||||
|
||||
tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
|
||||
tests/%$(EXESUF): tests/%.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
||||
|
||||
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
|
||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS)
|
||||
$(CC) $(FF_LDFLAGS) $(CFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
|
||||
tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
|
||||
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||
|
||||
include $(SRC_PATH_BARE)/tests/fate.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate2.mak
|
||||
.PHONY: lib videohook documentation *test regtest-* swscale-error zlib-error alltools check
|
||||
|
||||
include $(SRC_PATH_BARE)/tests/fate/aac.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/als.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/fft.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/h264.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/mp3.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/vorbis.mak
|
||||
include $(SRC_PATH_BARE)/tests/fate/vp8.mak
|
||||
|
||||
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
|
||||
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
|
||||
FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
|
||||
FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
|
||||
FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
|
||||
FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
|
||||
FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
|
||||
|
||||
FATE = $(FATE_ACODEC) \
|
||||
$(FATE_VCODEC) \
|
||||
$(FATE_LAVF) \
|
||||
$(FATE_SEEK) \
|
||||
|
||||
FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
|
||||
|
||||
FATE += $(FATE-yes)
|
||||
|
||||
$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
|
||||
$(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
|
||||
$(FATE_LAVF): $(REFS)
|
||||
$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
|
||||
$(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF)
|
||||
|
||||
$(FATE_ACODEC): CMD = codectest acodec
|
||||
$(FATE_VSYNTH1): CMD = codectest vsynth1
|
||||
$(FATE_VSYNTH2): CMD = codectest vsynth2
|
||||
$(FATE_LAVF): CMD = lavftest
|
||||
$(FATE_LAVFI): CMD = lavfitest
|
||||
$(FATE_SEEK): CMD = seektest
|
||||
|
||||
fate-codec: fate-acodec fate-vcodec
|
||||
fate-acodec: $(FATE_ACODEC)
|
||||
fate-vcodec: $(FATE_VCODEC)
|
||||
fate-lavf: $(FATE_LAVF)
|
||||
fate-lavfi: $(FATE_LAVFI)
|
||||
fate-seek: $(FATE_SEEK)
|
||||
|
||||
ifdef SAMPLES
|
||||
FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
|
||||
fate-rsync:
|
||||
rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
|
||||
else
|
||||
fate-rsync:
|
||||
@echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
|
||||
$(FATE_TESTS):
|
||||
@echo "SAMPLES not specified, cannot run FATE. See doc/fate.txt for more information."
|
||||
endif
|
||||
|
||||
FATE_UTILS = base64 tiny_psnr
|
||||
|
||||
fate: $(FATE)
|
||||
|
||||
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
||||
@echo "TEST $(@:fate-%=%)"
|
||||
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
|
||||
|
||||
fate-list:
|
||||
@printf '%s\n' $(sort $(FATE))
|
||||
|
||||
.PHONY: all alltools *clean check config documentation examples install*
|
||||
.PHONY: *test testprogs uninstall*
|
||||
-include $(VHOOK_DEPS)
|
||||
|
255
RELEASE
255
RELEASE
@@ -1 +1,254 @@
|
||||
0.8.11
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 0.5 "Bike Shed World Domination" March 3, 2009
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
It has been so long since the last release that this should be considered the
|
||||
first FFmpeg release of recent times. Because of the way things have unfolded to
|
||||
date, the notes for this version cannot be entirely conventional.
|
||||
|
||||
See the Changelog file for a list of significant changes.
|
||||
|
||||
Please note that our policy on bug reports has not changed. We still only accept
|
||||
bug reports against HEAD of the FFmpeg trunk repository. If you are experiencing
|
||||
any issues with any formally released version of FFmpeg, please try a current
|
||||
version of the development code to check if the issue still exists. If it does,
|
||||
make your report against the development code following the usual bug reporting
|
||||
guidelines.
|
||||
|
||||
API notes
|
||||
---------
|
||||
|
||||
In the next release, it is intended to remove a number of deprecated APIs. We
|
||||
decided to put out a release that includes said APIs for the benefit of third
|
||||
party software.
|
||||
|
||||
As such, this release:
|
||||
- provides a sync point for said APIs
|
||||
- increases awareness of API changes
|
||||
- allows the next release to detail how to transition from the old to the new
|
||||
|
||||
The deprecated APIs to be removed are:
|
||||
- imgconvert (to be replaced by libswscale)
|
||||
- vhook (to be replaced by libavfilter)
|
||||
|
||||
If at all possible, do not use the deprecated APIs. All notes on API changes
|
||||
should appear in doc/APIchanges.
|
||||
|
||||
|
||||
|
||||
* 0.5.1 March 2, 2010
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This point release includes some minor updates to make the 0.5 release series
|
||||
usable for users that need to retain the existing behavior as closely as
|
||||
possible. The changes follow below:
|
||||
|
||||
Security fixes
|
||||
--------------
|
||||
|
||||
Various programming errors in container and codec implementations
|
||||
may lead to denial of service or the execution of arbitrary code
|
||||
if the user is tricked into opening a malformed media file or stream.
|
||||
|
||||
Affected and updated have been the implementations of the following
|
||||
codecs and container formats:
|
||||
|
||||
- the Vorbis audio codec
|
||||
- the FF Video 1 codec
|
||||
- the MPEG audio codec
|
||||
- the H264 video codec
|
||||
- the MLP codec
|
||||
- the HuffYUV codec
|
||||
- the ASF demuxer
|
||||
- the Ogg container implementation
|
||||
- the MOV container implementation
|
||||
|
||||
Symbol Versioning enabled
|
||||
-------------------------
|
||||
|
||||
The backported symbol versioning change is enabled on platforms that support
|
||||
it. This allows users to upgrade from 0.5.1 to the upcoming 0.6 release
|
||||
without having to recompile their applications. Please note that distributors
|
||||
have to recompile applications against 0.5.1 before upgrading to 0.6.
|
||||
|
||||
libx264.c backport
|
||||
------------------
|
||||
|
||||
This release includes a backport to the libx264 wrapper that allows FFmpeg to
|
||||
be compiled against newer versions of libx264 up to API version 85.
|
||||
|
||||
licensing changes
|
||||
-----------------
|
||||
|
||||
Previously both libswscale and our AC-3 decoder had GPLed parts. These have
|
||||
been replaced by fresh LGPL code. x86 optimizations for libswscale remain GPL,
|
||||
but the C code is fully functional. Optimizations for other architectures have
|
||||
been relicensed to LGPL.
|
||||
|
||||
AMR-NB decoding/encoding and AMR-WB decoding is now possible through the free
|
||||
software OpenCORE libraries as an alternative to the non-free libamr libraries.
|
||||
|
||||
We found out that libfaac contains non-free parts and is not LGPL as previously
|
||||
claimed. We have changed configure to reflect this. You now have to pass the
|
||||
--enable-nonfree option if you wish to compile with libfaac support enabled.
|
||||
|
||||
Furthermore the non-free bits in libavcodec/fdctref.c have been rewritten. Note
|
||||
well that they were only used in a test program and never compiled into any
|
||||
FFmpeg library.
|
||||
|
||||
|
||||
|
||||
* 0.5.2 May 25, 2010
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This is a maintenance-only release that addresses a small number of security
|
||||
and portability issues. Distributors and system integrators are encouraged
|
||||
to update and share their patches against this branch.
|
||||
|
||||
|
||||
|
||||
* 0.5.3 Oct 18, 2010
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This is (again) another maintenance-only release that addresses a fix
|
||||
for seekable HTTP and an exploitable bug in the FLIC decoder
|
||||
(cf. CVE-2010-3429 for details). Distributors and system integrators are
|
||||
encouraged to update and share their patches against this branch.
|
||||
|
||||
|
||||
|
||||
* 0.5.4 Mar 17, 2011
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This is the first release that we cut after git migration. It is another
|
||||
maintenance-only release that addresses several security issues that were
|
||||
brought to our attention. In detail, fixes for RV30/40, WMV, Vorbis and
|
||||
VC-1 have been backported from trunk. Distributors and system integrators
|
||||
are encouraged to update and share their patches against this branch.
|
||||
|
||||
|
||||
|
||||
* 0.5.5 Nov 6, 2011
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This maintenance-only release addresses several security issues that
|
||||
were brought to our attention. In detail, fixes for the MJPEG decoder,
|
||||
the CAVS decoder (CVE-2011-3362, CVE-2011-3973, CVE-2011-3974), and the
|
||||
Matroska decoder (MSVR11-011/CVE-2011-3504) and many others have been
|
||||
corrected. Additional, this release contains fixes for compilation with
|
||||
gcc-4.6. Distributors and system integrators are encouraged to update
|
||||
and share their patches against this branch.
|
||||
|
||||
|
||||
|
||||
* 0.5.6 Nov 21, 2011
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This maintenance-only release addresses several security issues that
|
||||
were brought to our attention.
|
||||
|
||||
|
||||
|
||||
* 0.5.7 Dec 25, 2011
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This maintenance-only release addresses several security issues that
|
||||
were brought to our attention. In details, it features fixes for the
|
||||
QDM2 decoder (CVE-2011-4351), DoS in the VP5/VP6 decoders
|
||||
(CVE-2011-4353), and a buffer overflow in the Sierra VMD decoder
|
||||
CVE-2011-4364, and a safety fix in the SVQ1 decoder (CVE-2011-4579).
|
||||
CVE-2011-4352, a bug in the VP3 decoder, is not known to affect this
|
||||
release.
|
||||
|
||||
Distributors and system integrators are encouraged to update and share
|
||||
their patches against this branch.
|
||||
|
||||
|
||||
|
||||
* 0.5.8 Jan 12, 2012
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This mostly maintenance-only release that addresses a number a number of
|
||||
bugs such as security and compilation issues that have been brought to
|
||||
our attention. Among other (rather minor) fixes, this release features
|
||||
fixes for the VP3 decoder (CVE-2011-3892), vorbis decoder, and matroska
|
||||
demuxer (CVE-2011-3893 and CVE-2011-3895).
|
||||
|
||||
Distributors and system integrators are encouraged
|
||||
to update and share their patches against this branch. For a full list
|
||||
of changes please see the Changelog file.
|
||||
|
||||
|
||||
|
||||
* 0.5.9 May 11, 2012
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This maintenance-only release that addresses a number a number of
|
||||
security issues that have been brought to our attention. Among other
|
||||
(rather minor) fixes, this release features fixes for the DV decoder
|
||||
(CVE-2011-3929 and CVE-2011-3936), nsvdec (CVE-2011-3940), Atrac3
|
||||
(CVE-2012-0853), mjpegdec (CVE-2011-3947) and the VQA video decoder
|
||||
(CVE-2012-0947).
|
||||
|
||||
Distributors and system integrators are encouraged
|
||||
to update and share their patches against this branch. For a full list
|
||||
of changes please see the Changelog file.
|
||||
|
||||
|
||||
|
||||
* 0.5.10 Jun 09, 2012
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This mostly maintenance-only release addresses a number of bugs such as
|
||||
security and compilation issues that have been brought to our
|
||||
attention. Among other fixes, this release includes security updates for
|
||||
the DPCM codecs (CVE-2011-3951), H.264 (CVE-2012-0851), ADPCM
|
||||
(CVE-2012-0852), and the KMVC decoder (CVE-2011-3952).
|
||||
|
||||
Distributors and system integrators are encouraged to update and share
|
||||
their patches against this branch. For a full list of changes please see
|
||||
the Changelog file or the Git commit history.
|
||||
|
||||
|
||||
|
||||
* 0.5.11 Feb 17, 2013
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This maintenance-only release addresses a number of bugs such as
|
||||
security and compilation issues that have been brought to our
|
||||
attention. Among other fixes, this release includes security updates for
|
||||
the mpeg12 codecs (CVE-2012-2803), H.264, VP5/VP6 (CVE-2012-2783,
|
||||
CVE-2012-2783), shorten (CVE-2012-0858), CAVS (CVE-2012-2777 and
|
||||
CVE-2012-2784), AVS (CVE-2012-2801) and a number of additional safe but
|
||||
important bugs in other decoders. Additionally, reported bugs in the
|
||||
yuv4mpeg (Bug 373) and BMP decoder (Bug 367) have been addressed.
|
||||
|
||||
Distributors and system integrators are encouraged to update and share
|
||||
their patches against this branch. For a full list of changes please
|
||||
see the Changelog file or the Git commit history.
|
||||
|
698
cmdutils.c
698
cmdutils.c
@@ -35,83 +35,34 @@
|
||||
#include "libswscale/swscale.h"
|
||||
#include "libpostproc/postprocess.h"
|
||||
#include "libavutil/avstring.h"
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavutil/eval.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavcodec/opt.h"
|
||||
#include "cmdutils.h"
|
||||
#include "version.h"
|
||||
#if CONFIG_NETWORK
|
||||
#include "libavformat/network.h"
|
||||
#endif
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#undef exit
|
||||
|
||||
const char **opt_names;
|
||||
const char **opt_values;
|
||||
static int opt_name_count;
|
||||
AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||
AVCodecContext *avctx_opts[CODEC_TYPE_NB];
|
||||
AVFormatContext *avformat_opts;
|
||||
struct SwsContext *sws_opts;
|
||||
AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
||||
|
||||
static const int this_year = 2011;
|
||||
|
||||
void init_opts(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < AVMEDIA_TYPE_NB; i++)
|
||||
avcodec_opts[i] = avcodec_alloc_context2(i);
|
||||
avformat_opts = avformat_alloc_context();
|
||||
#if CONFIG_SWSCALE
|
||||
sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void uninit_opts(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < AVMEDIA_TYPE_NB; i++)
|
||||
av_freep(&avcodec_opts[i]);
|
||||
av_freep(&avformat_opts->key);
|
||||
av_freep(&avformat_opts);
|
||||
#if CONFIG_SWSCALE
|
||||
sws_freeContext(sws_opts);
|
||||
sws_opts = NULL;
|
||||
#endif
|
||||
for (i = 0; i < opt_name_count; i++) {
|
||||
av_freep(&opt_names[i]);
|
||||
av_freep(&opt_values[i]);
|
||||
}
|
||||
av_freep(&opt_names);
|
||||
av_freep(&opt_values);
|
||||
opt_name_count = 0;
|
||||
av_dict_free(&format_opts);
|
||||
av_dict_free(&video_opts);
|
||||
av_dict_free(&audio_opts);
|
||||
av_dict_free(&sub_opts);
|
||||
}
|
||||
|
||||
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
|
||||
{
|
||||
vfprintf(stdout, fmt, vl);
|
||||
}
|
||||
const int this_year = 2013;
|
||||
|
||||
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
|
||||
{
|
||||
char *tail;
|
||||
const char *error;
|
||||
double d = av_strtod(numstr, &tail);
|
||||
double d = strtod(numstr, &tail);
|
||||
if (*tail)
|
||||
error= "Expected number for %s but found: %s\n";
|
||||
else if (d < min || d > max)
|
||||
error= "The value for %s was %s which is not within %f - %f\n";
|
||||
else if(type == OPT_INT64 && (int64_t)d != d)
|
||||
error= "Expected int64 for %s but found %s\n";
|
||||
else if (type == OPT_INT && (int)d != d)
|
||||
error= "Expected int for %s but found %s\n";
|
||||
else
|
||||
return d;
|
||||
fprintf(stderr, error, context, numstr, min, max);
|
||||
@@ -120,8 +71,8 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do
|
||||
|
||||
int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
|
||||
{
|
||||
int64_t us;
|
||||
if (av_parse_time(&us, timestr, is_duration) < 0) {
|
||||
int64_t us = parse_date(timestr, is_duration);
|
||||
if (us == INT64_MIN) {
|
||||
fprintf(stderr, "Invalid %s specification for %s: %s\n",
|
||||
is_duration ? "duration" : "date", context, timestr);
|
||||
exit(1);
|
||||
@@ -161,97 +112,24 @@ static const OptionDef* find_option(const OptionDef *po, const char *name){
|
||||
return po;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32CE__)
|
||||
#include <windows.h>
|
||||
/* Will be leaked on exit */
|
||||
static char** win32_argv_utf8 = NULL;
|
||||
static int win32_argc = 0;
|
||||
|
||||
/**
|
||||
* Prepare command line arguments for executable.
|
||||
* For Windows - perform wide-char to UTF-8 conversion.
|
||||
* Input arguments should be main() function arguments.
|
||||
* @param argc_ptr Arguments number (including executable)
|
||||
* @param argv_ptr Arguments list.
|
||||
*/
|
||||
static void prepare_app_arguments(int *argc_ptr, char ***argv_ptr)
|
||||
{
|
||||
char *argstr_flat;
|
||||
wchar_t **argv_w;
|
||||
int i, buffsize = 0, offset = 0;
|
||||
|
||||
if (win32_argv_utf8) {
|
||||
*argc_ptr = win32_argc;
|
||||
*argv_ptr = win32_argv_utf8;
|
||||
return;
|
||||
}
|
||||
|
||||
win32_argc = 0;
|
||||
argv_w = CommandLineToArgvW(GetCommandLineW(), &win32_argc);
|
||||
if (win32_argc <= 0 || !argv_w)
|
||||
return;
|
||||
|
||||
/* determine the UTF-8 buffer size (including NULL-termination symbols) */
|
||||
for (i = 0; i < win32_argc; i++)
|
||||
buffsize += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
|
||||
win32_argv_utf8 = av_mallocz(sizeof(char*) * (win32_argc + 1) + buffsize);
|
||||
argstr_flat = (char*)win32_argv_utf8 + sizeof(char*) * (win32_argc + 1);
|
||||
if (win32_argv_utf8 == NULL) {
|
||||
LocalFree(argv_w);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < win32_argc; i++) {
|
||||
win32_argv_utf8[i] = &argstr_flat[offset];
|
||||
offset += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1,
|
||||
&argstr_flat[offset],
|
||||
buffsize - offset, NULL, NULL);
|
||||
}
|
||||
win32_argv_utf8[i] = NULL;
|
||||
LocalFree(argv_w);
|
||||
|
||||
*argc_ptr = win32_argc;
|
||||
*argv_ptr = win32_argv_utf8;
|
||||
}
|
||||
#else
|
||||
static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
#endif /* WIN32 && !__MINGW32CE__ */
|
||||
|
||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||
int (* parse_arg_function)(const char *opt, const char *arg))
|
||||
void (* parse_arg_function)(const char*))
|
||||
{
|
||||
const char *opt, *arg;
|
||||
int optindex, handleoptions=1;
|
||||
const OptionDef *po;
|
||||
|
||||
/* perform system-dependent conversions for arguments list */
|
||||
prepare_app_arguments(&argc, &argv);
|
||||
|
||||
/* parse options */
|
||||
optindex = 1;
|
||||
while (optindex < argc) {
|
||||
opt = argv[optindex++];
|
||||
|
||||
if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
|
||||
int bool_val = 1;
|
||||
if (opt[1] == '-' && opt[2] == '\0') {
|
||||
handleoptions = 0;
|
||||
continue;
|
||||
}
|
||||
opt++;
|
||||
po= find_option(options, opt);
|
||||
if (!po->name && opt[0] == 'n' && opt[1] == 'o') {
|
||||
/* handle 'no' bool option */
|
||||
po = find_option(options, opt + 2);
|
||||
if (!(po->name && (po->flags & OPT_BOOL)))
|
||||
goto unknown_opt;
|
||||
bool_val = 0;
|
||||
}
|
||||
po= find_option(options, opt + 1);
|
||||
if (!po->name)
|
||||
po= find_option(options, "default");
|
||||
if (!po->name) {
|
||||
@@ -272,315 +150,164 @@ unknown_opt:
|
||||
str = av_strdup(arg);
|
||||
*po->u.str_arg = str;
|
||||
} else if (po->flags & OPT_BOOL) {
|
||||
*po->u.int_arg = bool_val;
|
||||
*po->u.int_arg = 1;
|
||||
} else if (po->flags & OPT_INT) {
|
||||
*po->u.int_arg = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
|
||||
*po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
|
||||
} else if (po->flags & OPT_INT64) {
|
||||
*po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
|
||||
*po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);
|
||||
} else if (po->flags & OPT_FLOAT) {
|
||||
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
|
||||
} else if (po->u.func_arg) {
|
||||
if (po->u.func_arg(opt, arg) < 0) {
|
||||
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
|
||||
exit(1);
|
||||
}
|
||||
*po->u.float_arg = parse_number_or_die(opt+1, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
|
||||
} else if (po->flags & OPT_FUNC2) {
|
||||
if(po->u.func2_arg(opt+1, arg)<0)
|
||||
goto unknown_opt;
|
||||
} else {
|
||||
po->u.func_arg(arg);
|
||||
}
|
||||
if(po->flags & OPT_EXIT)
|
||||
exit(0);
|
||||
} else {
|
||||
if (parse_arg_function) {
|
||||
if (parse_arg_function(NULL, opt) < 0)
|
||||
exit(1);
|
||||
}
|
||||
if (parse_arg_function)
|
||||
parse_arg_function(opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define FLAGS (o->type == FF_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
||||
#define SET_PREFIXED_OPTS(ch, flag, output) \
|
||||
if (opt[0] == ch && avcodec_opts[0] && (o = av_opt_find(avcodec_opts[0], opt+1, NULL, flag, 0)))\
|
||||
av_dict_set(&output, opt+1, arg, FLAGS);
|
||||
static int opt_default2(const char *opt, const char *arg)
|
||||
{
|
||||
const AVOption *o;
|
||||
if ((o = av_opt_find(avcodec_opts[0], opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) {
|
||||
if (o->flags & AV_OPT_FLAG_VIDEO_PARAM)
|
||||
av_dict_set(&video_opts, opt, arg, FLAGS);
|
||||
if (o->flags & AV_OPT_FLAG_AUDIO_PARAM)
|
||||
av_dict_set(&audio_opts, opt, arg, FLAGS);
|
||||
if (o->flags & AV_OPT_FLAG_SUBTITLE_PARAM)
|
||||
av_dict_set(&sub_opts, opt, arg, FLAGS);
|
||||
} else if ((o = av_opt_find(avformat_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN)))
|
||||
av_dict_set(&format_opts, opt, arg, FLAGS);
|
||||
else if ((o = av_opt_find(sws_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) {
|
||||
// XXX we only support sws_flags, not arbitrary sws options
|
||||
int ret = av_set_string3(sws_opts, opt, arg, 1, NULL);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (!o) {
|
||||
SET_PREFIXED_OPTS('v', AV_OPT_FLAG_VIDEO_PARAM, video_opts)
|
||||
SET_PREFIXED_OPTS('a', AV_OPT_FLAG_AUDIO_PARAM, audio_opts)
|
||||
SET_PREFIXED_OPTS('s', AV_OPT_FLAG_SUBTITLE_PARAM, sub_opts)
|
||||
}
|
||||
|
||||
if (o)
|
||||
return 0;
|
||||
fprintf(stderr, "Unrecognized option '%s'\n", opt);
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
}
|
||||
|
||||
int opt_default(const char *opt, const char *arg){
|
||||
int type;
|
||||
int ret= 0;
|
||||
const AVOption *o= NULL;
|
||||
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
|
||||
AVCodec *p = NULL;
|
||||
AVOutputFormat *oformat = NULL;
|
||||
AVInputFormat *iformat = NULL;
|
||||
|
||||
while ((p = av_codec_next(p))) {
|
||||
const AVClass *c = p->priv_class;
|
||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
||||
break;
|
||||
}
|
||||
if (p)
|
||||
goto out;
|
||||
while ((oformat = av_oformat_next(oformat))) {
|
||||
const AVClass *c = oformat->priv_class;
|
||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
||||
break;
|
||||
}
|
||||
if (oformat)
|
||||
goto out;
|
||||
while ((iformat = av_iformat_next(iformat))) {
|
||||
const AVClass *c = iformat->priv_class;
|
||||
if (c && av_find_opt(&c, opt, NULL, 0, 0))
|
||||
break;
|
||||
}
|
||||
if (iformat)
|
||||
goto out;
|
||||
|
||||
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
|
||||
const AVOption *o2 = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], 0);
|
||||
for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){
|
||||
const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, opt_types[type], opt_types[type]);
|
||||
if(o2)
|
||||
ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
|
||||
ret = av_set_string3(avctx_opts[type], opt, arg, 1, &o);
|
||||
}
|
||||
if(!o && avformat_opts)
|
||||
if(!o)
|
||||
ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
|
||||
if(!o && sws_opts)
|
||||
if(!o)
|
||||
ret = av_set_string3(sws_opts, opt, arg, 1, &o);
|
||||
if(!o){
|
||||
if (opt[0] == 'a' && avcodec_opts[AVMEDIA_TYPE_AUDIO])
|
||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
|
||||
else if(opt[0] == 'v' && avcodec_opts[AVMEDIA_TYPE_VIDEO])
|
||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
|
||||
else if(opt[0] == 's' && avcodec_opts[AVMEDIA_TYPE_SUBTITLE])
|
||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
|
||||
if (ret >= 0)
|
||||
opt += 1;
|
||||
if(opt[0] == 'a')
|
||||
ret = av_set_string3(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o);
|
||||
else if(opt[0] == 'v')
|
||||
ret = av_set_string3(avctx_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o);
|
||||
else if(opt[0] == 's')
|
||||
ret = av_set_string3(avctx_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o);
|
||||
}
|
||||
if (o && ret < 0) {
|
||||
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
|
||||
exit(1);
|
||||
}
|
||||
if (!o) {
|
||||
fprintf(stderr, "Unrecognized option '%s'\n", opt);
|
||||
exit(1);
|
||||
}
|
||||
if(!o)
|
||||
return -1;
|
||||
|
||||
out:
|
||||
if ((ret = opt_default2(opt, arg)) < 0)
|
||||
return ret;
|
||||
// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avctx_opts, opt, NULL), (int)av_get_int(avctx_opts, opt, NULL));
|
||||
|
||||
// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL));
|
||||
|
||||
opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1));
|
||||
opt_values[opt_name_count] = av_strdup(arg);
|
||||
//FIXME we should always use avctx_opts, ... for storing options so there will not be any need to keep track of what i set over this
|
||||
opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
|
||||
opt_names[opt_name_count++] = av_strdup(opt);
|
||||
opt_names[opt_name_count++]= o->name;
|
||||
|
||||
if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug))
|
||||
if(avctx_opts[0]->debug || avformat_opts->debug)
|
||||
av_log_set_level(AV_LOG_DEBUG);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_loglevel(const char *opt, const char *arg)
|
||||
{
|
||||
const struct { const char *name; int level; } log_levels[] = {
|
||||
{ "quiet" , AV_LOG_QUIET },
|
||||
{ "panic" , AV_LOG_PANIC },
|
||||
{ "fatal" , AV_LOG_FATAL },
|
||||
{ "error" , AV_LOG_ERROR },
|
||||
{ "warning", AV_LOG_WARNING },
|
||||
{ "info" , AV_LOG_INFO },
|
||||
{ "verbose", AV_LOG_VERBOSE },
|
||||
{ "debug" , AV_LOG_DEBUG },
|
||||
};
|
||||
char *tail;
|
||||
int level;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) {
|
||||
if (!strcmp(log_levels[i].name, arg)) {
|
||||
av_log_set_level(log_levels[i].level);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
level = strtol(arg, &tail, 10);
|
||||
if (*tail) {
|
||||
fprintf(stderr, "Invalid loglevel \"%s\". "
|
||||
"Possible levels are numbers or:\n", arg);
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
|
||||
fprintf(stderr, "\"%s\"\n", log_levels[i].name);
|
||||
exit(1);
|
||||
}
|
||||
av_log_set_level(level);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_timelimit(const char *opt, const char *arg)
|
||||
{
|
||||
#if HAVE_SETRLIMIT
|
||||
int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
|
||||
struct rlimit rl = { lim, lim + 1 };
|
||||
if (setrlimit(RLIMIT_CPU, &rl))
|
||||
perror("setrlimit");
|
||||
#else
|
||||
fprintf(stderr, "Warning: -%s not implemented on this OS\n", opt);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *alloc_priv_context(int size, const AVClass *class)
|
||||
{
|
||||
void *p = av_mallocz(size);
|
||||
if (p) {
|
||||
*(const AVClass **)p = class;
|
||||
av_opt_set_defaults(p);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec)
|
||||
void set_context_opts(void *ctx, void *opts_ctx, int flags)
|
||||
{
|
||||
int i;
|
||||
void *priv_ctx=NULL;
|
||||
if(!strcmp("AVCodecContext", (*(AVClass**)ctx)->class_name)){
|
||||
AVCodecContext *avctx= ctx;
|
||||
if(codec && codec->priv_class){
|
||||
if(!avctx->priv_data && codec->priv_data_size)
|
||||
avctx->priv_data= alloc_priv_context(codec->priv_data_size, codec->priv_class);
|
||||
priv_ctx= avctx->priv_data;
|
||||
}
|
||||
} else if (!strcmp("AVFormatContext", (*(AVClass**)ctx)->class_name)) {
|
||||
AVFormatContext *avctx = ctx;
|
||||
if (avctx->oformat && avctx->oformat->priv_class) {
|
||||
priv_ctx = avctx->priv_data;
|
||||
} else if (avctx->iformat && avctx->iformat->priv_class) {
|
||||
priv_ctx = avctx->priv_data;
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; i<opt_name_count; i++){
|
||||
char buf[256];
|
||||
const AVOption *opt;
|
||||
const char *str;
|
||||
if (priv_ctx) {
|
||||
if (av_find_opt(priv_ctx, opt_names[i], NULL, flags, flags)) {
|
||||
if (av_set_string3(priv_ctx, opt_names[i], opt_values[i], 1, NULL) < 0) {
|
||||
fprintf(stderr, "Invalid value '%s' for option '%s'\n",
|
||||
opt_names[i], opt_values[i]);
|
||||
exit(1);
|
||||
}
|
||||
} else
|
||||
goto global;
|
||||
} else {
|
||||
global:
|
||||
str = av_get_string(opts_ctx, opt_names[i], &opt, buf, sizeof(buf));
|
||||
/* if an option with name opt_names[i] is present in opts_ctx then str is non-NULL */
|
||||
if (str && ((opt->flags & flags) == flags))
|
||||
av_set_string3(ctx, opt_names[i], str, 1, NULL);
|
||||
}
|
||||
const char *str= av_get_string(opts_ctx, opt_names[i], &opt, buf, sizeof(buf));
|
||||
/* if an option with name opt_names[i] is present in opts_ctx then str is non-NULL */
|
||||
if(str && ((opt->flags & flags) == flags))
|
||||
av_set_string3(ctx, opt_names[i], str, 1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void print_error(const char *filename, int err)
|
||||
{
|
||||
char errbuf[128];
|
||||
const char *errbuf_ptr = errbuf;
|
||||
|
||||
if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
|
||||
errbuf_ptr = strerror(AVUNERROR(err));
|
||||
fprintf(stderr, "%s: %s\n", filename, errbuf_ptr);
|
||||
switch(err) {
|
||||
case AVERROR_NUMEXPECTED:
|
||||
fprintf(stderr, "%s: Incorrect image filename syntax.\n"
|
||||
"Use '%%d' to specify the image number:\n"
|
||||
" for img1.jpg, img2.jpg, ..., use 'img%%d.jpg';\n"
|
||||
" for img001.jpg, img002.jpg, ..., use 'img%%03d.jpg'.\n",
|
||||
filename);
|
||||
break;
|
||||
case AVERROR_INVALIDDATA:
|
||||
fprintf(stderr, "%s: Error while parsing header\n", filename);
|
||||
break;
|
||||
case AVERROR_NOFMT:
|
||||
fprintf(stderr, "%s: Unknown format\n", filename);
|
||||
break;
|
||||
case AVERROR(EIO):
|
||||
fprintf(stderr, "%s: I/O error occurred\n"
|
||||
"Usually that means that input file is truncated and/or corrupted.\n",
|
||||
filename);
|
||||
break;
|
||||
case AVERROR(ENOMEM):
|
||||
fprintf(stderr, "%s: memory allocation error occurred\n", filename);
|
||||
break;
|
||||
case AVERROR(ENOENT):
|
||||
fprintf(stderr, "%s: no such file or directory\n", filename);
|
||||
break;
|
||||
#if CONFIG_NETWORK
|
||||
case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
|
||||
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
fprintf(stderr, "%s: Error while opening file\n", filename);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int warned_cfg = 0;
|
||||
#define PRINT_LIB_VERSION(outstream,libname,LIBNAME,indent) \
|
||||
version= libname##_version(); \
|
||||
fprintf(outstream, "%slib%-10s %2d.%2d.%2d / %2d.%2d.%2d\n", indent? " " : "", #libname, \
|
||||
LIB##LIBNAME##_VERSION_MAJOR, LIB##LIBNAME##_VERSION_MINOR, LIB##LIBNAME##_VERSION_MICRO, \
|
||||
version >> 16, version >> 8 & 0xff, version & 0xff);
|
||||
|
||||
#define INDENT 1
|
||||
#define SHOW_VERSION 2
|
||||
#define SHOW_CONFIG 4
|
||||
|
||||
#define PRINT_LIB_INFO(outstream,libname,LIBNAME,flags) \
|
||||
if (CONFIG_##LIBNAME) { \
|
||||
const char *indent = flags & INDENT? " " : ""; \
|
||||
if (flags & SHOW_VERSION) { \
|
||||
unsigned int version = libname##_version(); \
|
||||
fprintf(outstream, "%slib%-9s %2d.%3d.%2d / %2d.%3d.%2d\n", \
|
||||
indent, #libname, \
|
||||
LIB##LIBNAME##_VERSION_MAJOR, \
|
||||
LIB##LIBNAME##_VERSION_MINOR, \
|
||||
LIB##LIBNAME##_VERSION_MICRO, \
|
||||
version >> 16, version >> 8 & 0xff, version & 0xff); \
|
||||
} \
|
||||
if (flags & SHOW_CONFIG) { \
|
||||
const char *cfg = libname##_configuration(); \
|
||||
if (strcmp(FFMPEG_CONFIGURATION, cfg)) { \
|
||||
if (!warned_cfg) { \
|
||||
fprintf(outstream, \
|
||||
"%sWARNING: library configuration mismatch\n", \
|
||||
indent); \
|
||||
warned_cfg = 1; \
|
||||
} \
|
||||
fprintf(stderr, "%s%-11s configuration: %s\n", \
|
||||
indent, #libname, cfg); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
|
||||
static void print_all_libs_info(FILE* outstream, int flags)
|
||||
static void print_all_lib_versions(FILE* outstream, int indent)
|
||||
{
|
||||
PRINT_LIB_INFO(outstream, avutil, AVUTIL, flags);
|
||||
PRINT_LIB_INFO(outstream, avcodec, AVCODEC, flags);
|
||||
PRINT_LIB_INFO(outstream, avformat, AVFORMAT, flags);
|
||||
PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags);
|
||||
PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags);
|
||||
PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags);
|
||||
PRINT_LIB_INFO(outstream, postproc, POSTPROC, flags);
|
||||
unsigned int version;
|
||||
PRINT_LIB_VERSION(outstream, avutil, AVUTIL, indent);
|
||||
PRINT_LIB_VERSION(outstream, avcodec, AVCODEC, indent);
|
||||
PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
|
||||
PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
|
||||
#if CONFIG_AVFILTER
|
||||
PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
|
||||
#endif
|
||||
#if CONFIG_SWSCALE
|
||||
PRINT_LIB_VERSION(outstream, swscale, SWSCALE, indent);
|
||||
#endif
|
||||
#if CONFIG_POSTPROC
|
||||
PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
|
||||
#endif
|
||||
}
|
||||
|
||||
void show_banner(void)
|
||||
{
|
||||
fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-%d the FFmpeg developers\n",
|
||||
fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-%d Fabrice Bellard, et al.\n",
|
||||
program_name, program_birth_year, this_year);
|
||||
fprintf(stderr, " built on %s %s with %s %s\n",
|
||||
__DATE__, __TIME__, CC_TYPE, CC_VERSION);
|
||||
fprintf(stderr, " configuration: " FFMPEG_CONFIGURATION "\n");
|
||||
print_all_libs_info(stderr, INDENT|SHOW_CONFIG);
|
||||
print_all_libs_info(stderr, INDENT|SHOW_VERSION);
|
||||
print_all_lib_versions(stderr, 1);
|
||||
fprintf(stderr, " built on " __DATE__ " " __TIME__);
|
||||
#ifdef __GNUC__
|
||||
fprintf(stderr, ", gcc: " __VERSION__ "\n");
|
||||
#else
|
||||
fprintf(stderr, ", using a non-gcc compiler\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
int opt_version(const char *opt, const char *arg) {
|
||||
void show_version(void) {
|
||||
printf("%s " FFMPEG_VERSION "\n", program_name);
|
||||
print_all_libs_info(stdout, SHOW_VERSION);
|
||||
return 0;
|
||||
print_all_lib_versions(stdout, 0);
|
||||
}
|
||||
|
||||
int opt_license(const char *opt, const char *arg)
|
||||
void show_license(void)
|
||||
{
|
||||
printf(
|
||||
#if CONFIG_NONFREE
|
||||
@@ -647,20 +374,18 @@ int opt_license(const char *opt, const char *arg)
|
||||
program_name, program_name, program_name
|
||||
#endif
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_formats(const char *opt, const char *arg)
|
||||
void show_formats(void)
|
||||
{
|
||||
AVInputFormat *ifmt=NULL;
|
||||
AVOutputFormat *ofmt=NULL;
|
||||
URLProtocol *up=NULL;
|
||||
AVCodec *p=NULL, *p2;
|
||||
AVBitStreamFilter *bsf=NULL;
|
||||
const char *last_name;
|
||||
|
||||
printf(
|
||||
"File formats:\n"
|
||||
" D. = Demuxing supported\n"
|
||||
" .E = Muxing supported\n"
|
||||
" --\n");
|
||||
printf("File formats:\n");
|
||||
last_name= "000";
|
||||
for(;;){
|
||||
int decode=0;
|
||||
@@ -697,24 +422,9 @@ int opt_formats(const char *opt, const char *arg)
|
||||
name,
|
||||
long_name ? long_name:" ");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
int opt_codecs(const char *opt, const char *arg)
|
||||
{
|
||||
AVCodec *p=NULL, *p2;
|
||||
const char *last_name;
|
||||
printf(
|
||||
"Codecs:\n"
|
||||
" D..... = Decoding supported\n"
|
||||
" .E.... = Encoding supported\n"
|
||||
" ..V... = Video codec\n"
|
||||
" ..A... = Audio codec\n"
|
||||
" ..S... = Subtitle codec\n"
|
||||
" ...S.. = Supports draw_horiz_band\n"
|
||||
" ....D. = Supports direct rendering method 1\n"
|
||||
" .....T = Supports weird frame truncation\n"
|
||||
" ------\n");
|
||||
printf("Codecs:\n");
|
||||
last_name= "000";
|
||||
for(;;){
|
||||
int decode=0;
|
||||
@@ -740,13 +450,13 @@ int opt_codecs(const char *opt, const char *arg)
|
||||
last_name= p2->name;
|
||||
|
||||
switch(p2->type) {
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
case CODEC_TYPE_VIDEO:
|
||||
type_str = "V";
|
||||
break;
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
case CODEC_TYPE_AUDIO:
|
||||
type_str = "A";
|
||||
break;
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
case CODEC_TYPE_SUBTITLE:
|
||||
type_str = "S";
|
||||
break;
|
||||
default:
|
||||
@@ -768,169 +478,23 @@ int opt_codecs(const char *opt, const char *arg)
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
printf("Bitstream filters:\n");
|
||||
while((bsf = av_bitstream_filter_next(bsf)))
|
||||
printf(" %s", bsf->name);
|
||||
printf("\n");
|
||||
|
||||
printf("Supported file protocols:\n");
|
||||
while((up = av_protocol_next(up)))
|
||||
printf(" %s:", up->name);
|
||||
printf("\n");
|
||||
|
||||
printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
|
||||
printf("\n");
|
||||
printf(
|
||||
"Note, the names of encoders and decoders do not always match, so there are\n"
|
||||
"several cases where the above table shows encoder only or decoder only entries\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"
|
||||
"worse.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_bsfs(const char *opt, const char *arg)
|
||||
{
|
||||
AVBitStreamFilter *bsf=NULL;
|
||||
|
||||
printf("Bitstream filters:\n");
|
||||
while((bsf = av_bitstream_filter_next(bsf)))
|
||||
printf("%s\n", bsf->name);
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_protocols(const char *opt, const char *arg)
|
||||
{
|
||||
URLProtocol *up=NULL;
|
||||
|
||||
printf("Supported file protocols:\n"
|
||||
"I.. = Input supported\n"
|
||||
".O. = Output supported\n"
|
||||
"..S = Seek supported\n"
|
||||
"FLAGS NAME\n"
|
||||
"----- \n");
|
||||
while((up = av_protocol_next(up)))
|
||||
printf("%c%c%c %s\n",
|
||||
up->url_read ? 'I' : '.',
|
||||
up->url_write ? 'O' : '.',
|
||||
up->url_seek ? 'S' : '.',
|
||||
up->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_filters(const char *opt, const char *arg)
|
||||
{
|
||||
AVFilter av_unused(**filter) = NULL;
|
||||
|
||||
printf("Filters:\n");
|
||||
#if CONFIG_AVFILTER
|
||||
while ((filter = av_filter_next(filter)) && *filter)
|
||||
printf("%-16s %s\n", (*filter)->name, (*filter)->description);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_pix_fmts(const char *opt, const char *arg)
|
||||
{
|
||||
enum PixelFormat pix_fmt;
|
||||
|
||||
printf(
|
||||
"Pixel formats:\n"
|
||||
"I.... = Supported Input format for conversion\n"
|
||||
".O... = Supported Output format for conversion\n"
|
||||
"..H.. = Hardware accelerated format\n"
|
||||
"...P. = Paletted format\n"
|
||||
"....B = Bitstream format\n"
|
||||
"FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n"
|
||||
"-----\n");
|
||||
|
||||
#if !CONFIG_SWSCALE
|
||||
# define sws_isSupportedInput(x) 0
|
||||
# define sws_isSupportedOutput(x) 0
|
||||
#endif
|
||||
|
||||
for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) {
|
||||
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
|
||||
printf("%c%c%c%c%c %-16s %d %2d\n",
|
||||
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
|
||||
sws_isSupportedOutput(pix_fmt) ? 'O' : '.',
|
||||
pix_desc->flags & PIX_FMT_HWACCEL ? 'H' : '.',
|
||||
pix_desc->flags & PIX_FMT_PAL ? 'P' : '.',
|
||||
pix_desc->flags & PIX_FMT_BITSTREAM ? 'B' : '.',
|
||||
pix_desc->name,
|
||||
pix_desc->nb_components,
|
||||
av_get_bits_per_pixel(pix_desc));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int read_yesno(void)
|
||||
{
|
||||
int c = getchar();
|
||||
int yesno = (toupper(c) == 'Y');
|
||||
|
||||
while (c != '\n' && c != EOF)
|
||||
c = getchar();
|
||||
|
||||
return yesno;
|
||||
}
|
||||
|
||||
int read_file(const char *filename, char **bufptr, size_t *size)
|
||||
{
|
||||
FILE *f = fopen(filename, "rb");
|
||||
|
||||
if (!f) {
|
||||
fprintf(stderr, "Cannot read file '%s': %s\n", filename, strerror(errno));
|
||||
return AVERROR(errno);
|
||||
}
|
||||
fseek(f, 0, SEEK_END);
|
||||
*size = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
*bufptr = av_malloc(*size + 1);
|
||||
if (!*bufptr) {
|
||||
fprintf(stderr, "Could not allocate file buffer\n");
|
||||
fclose(f);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
fread(*bufptr, 1, *size, f);
|
||||
(*bufptr)[*size++] = '\0';
|
||||
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
const char *preset_name, int is_path, const char *codec_name)
|
||||
{
|
||||
FILE *f = NULL;
|
||||
int i;
|
||||
const char *base[3]= { getenv("FFMPEG_DATADIR"),
|
||||
getenv("HOME"),
|
||||
FFMPEG_DATADIR,
|
||||
};
|
||||
|
||||
if (is_path) {
|
||||
av_strlcpy(filename, preset_name, filename_size);
|
||||
f = fopen(filename, "r");
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
char datadir[MAX_PATH], *ls;
|
||||
base[2] = NULL;
|
||||
|
||||
if (GetModuleFileNameA(GetModuleHandleA(NULL), datadir, sizeof(datadir) - 1))
|
||||
{
|
||||
for (ls = datadir; ls < datadir + strlen(datadir); ls++)
|
||||
if (*ls == '\\') *ls = '/';
|
||||
|
||||
if (ls = strrchr(datadir, '/'))
|
||||
{
|
||||
*ls = 0;
|
||||
strncat(datadir, "/ffpresets", sizeof(datadir) - 1 - strlen(datadir));
|
||||
base[2] = datadir;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (i = 0; i < 3 && !f; i++) {
|
||||
if (!base[i])
|
||||
continue;
|
||||
snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", preset_name);
|
||||
f = fopen(filename, "r");
|
||||
if (!f && codec_name) {
|
||||
snprintf(filename, filename_size,
|
||||
"%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", codec_name, preset_name);
|
||||
f = fopen(filename, "r");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
168
cmdutils.h
168
cmdutils.h
@@ -22,17 +22,11 @@
|
||||
#ifndef FFMPEG_CMDUTILS_H
|
||||
#define FFMPEG_CMDUTILS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavfilter/avfilter.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libswscale/swscale.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef main /* We don't want SDL to override our main() */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* program name, defined by the program for show_version().
|
||||
*/
|
||||
@@ -43,28 +37,12 @@ extern const char program_name[];
|
||||
*/
|
||||
extern const int program_birth_year;
|
||||
|
||||
extern const int this_year;
|
||||
|
||||
extern const char **opt_names;
|
||||
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||
extern AVCodecContext *avctx_opts[CODEC_TYPE_NB];
|
||||
extern AVFormatContext *avformat_opts;
|
||||
extern struct SwsContext *sws_opts;
|
||||
extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
||||
|
||||
/**
|
||||
* Initialize the cmdutils option system, in particular
|
||||
* allocate the *_opts contexts.
|
||||
*/
|
||||
void init_opts(void);
|
||||
/**
|
||||
* Uninitialize the cmdutils option system, in particular
|
||||
* free the *_opts contexts and their contents.
|
||||
*/
|
||||
void uninit_opts(void);
|
||||
|
||||
/**
|
||||
* Trivial log callback.
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* Fallback for options that are not explicitly handled, these will be
|
||||
@@ -73,18 +51,8 @@ void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
||||
int opt_default(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Set the libav* libraries log level.
|
||||
*/
|
||||
int opt_loglevel(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Limit the execution time.
|
||||
*/
|
||||
int opt_timelimit(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Parse a string and return its corresponding value as a double.
|
||||
* Exit from the application if the string cannot be correctly
|
||||
* Parses a string and returns its corresponding value as a double.
|
||||
* Exits from the application if the string cannot be correctly
|
||||
* parsed or the corresponding value is invalid.
|
||||
*
|
||||
* @param context the context of the value to be set (e.g. the
|
||||
@@ -98,15 +66,15 @@ int opt_timelimit(const char *opt, const char *arg);
|
||||
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
|
||||
|
||||
/**
|
||||
* Parse a string specifying a time and return its corresponding
|
||||
* value as a number of microseconds. Exit from the application if
|
||||
* Parses a string specifying a time and returns its corresponding
|
||||
* value as a number of microseconds. Exits from the application if
|
||||
* the string cannot be correctly parsed.
|
||||
*
|
||||
* @param context the context of the value to be set (e.g. the
|
||||
* corresponding commandline option name)
|
||||
* @param timestr the string to be parsed
|
||||
* @param is_duration a flag which tells how to interpret timestr, if
|
||||
* not zero timestr is interpreted as a duration, otherwise as a
|
||||
* @param is_duration a flag which tells how to interpret \p timestr, if
|
||||
* not zero \p timestr is interpreted as a duration, otherwise as a
|
||||
* date
|
||||
*
|
||||
* @see parse_date()
|
||||
@@ -126,14 +94,15 @@ typedef struct {
|
||||
#define OPT_INT 0x0080
|
||||
#define OPT_FLOAT 0x0100
|
||||
#define OPT_SUBTITLE 0x0200
|
||||
#define OPT_INT64 0x0400
|
||||
#define OPT_EXIT 0x0800
|
||||
#define OPT_DATA 0x1000
|
||||
#define OPT_FUNC2 0x0400
|
||||
#define OPT_INT64 0x0800
|
||||
#define OPT_EXIT 0x1000
|
||||
union {
|
||||
void (*func_arg)(const char *); //FIXME passing error code as int return would be nicer then exit() in the func
|
||||
int *int_arg;
|
||||
char **str_arg;
|
||||
float *float_arg;
|
||||
int (*func_arg)(const char *, const char *);
|
||||
int (*func2_arg)(const char *, const char *);
|
||||
int64_t *int64_arg;
|
||||
} u;
|
||||
const char *help;
|
||||
@@ -143,129 +112,44 @@ typedef struct {
|
||||
void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
|
||||
|
||||
/**
|
||||
* Parse the command line arguments.
|
||||
* Parses the command line arguments.
|
||||
* @param options Array with the definitions required to interpret every
|
||||
* option of the form: -option_name [argument]
|
||||
* option of the form: -<option_name> [<argument>]
|
||||
* @param parse_arg_function Name of the function called to process every
|
||||
* argument without a leading option name flag. NULL if such arguments do
|
||||
* not have to be processed.
|
||||
*/
|
||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||
int (* parse_arg_function)(const char *opt, const char *arg));
|
||||
void (* parse_arg_function)(const char*));
|
||||
|
||||
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);
|
||||
void set_context_opts(void *ctx, void *opts_ctx, int flags);
|
||||
|
||||
/**
|
||||
* Print an error message to stderr, indicating filename and a human
|
||||
* readable description of the error code err.
|
||||
*
|
||||
* If strerror_r() is not available the use of this function in a
|
||||
* multithreaded application may be unsafe.
|
||||
*
|
||||
* @see av_strerror()
|
||||
*/
|
||||
void print_error(const char *filename, int err);
|
||||
|
||||
/**
|
||||
* Print the program banner to stderr. The banner contents depend on the
|
||||
* Prints the program banner to stderr. The banner contents depend on the
|
||||
* current version of the repository and of the libav* libraries used by
|
||||
* the program.
|
||||
*/
|
||||
void show_banner(void);
|
||||
|
||||
/**
|
||||
* Print the version of the program to stdout. The version message
|
||||
* Prints the version of the program to stdout. The version message
|
||||
* depends on the current versions of the repository and of the libav*
|
||||
* libraries.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_version(const char *opt, const char *arg);
|
||||
void show_version(void);
|
||||
|
||||
/**
|
||||
* Print the license of the program to stdout. The license depends on
|
||||
* Prints the license of the program to stdout. The license depends on
|
||||
* the license of the libraries compiled into the program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_license(const char *opt, const char *arg);
|
||||
void show_license(void);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the formats supported by the
|
||||
* Prints a listing containing all the formats supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_formats(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the codecs supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_codecs(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the filters supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_filters(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the bit stream filters supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_bsfs(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the protocols supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_protocols(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the pixel formats supported by the
|
||||
* program.
|
||||
* This option processing function does not utilize the arguments.
|
||||
*/
|
||||
int opt_pix_fmts(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Return a positive value if a line read from standard input
|
||||
* starts with [yY], otherwise return 0.
|
||||
*/
|
||||
int read_yesno(void);
|
||||
|
||||
/**
|
||||
* Read the file with name filename, and put its content in a newly
|
||||
* allocated 0-terminated buffer.
|
||||
*
|
||||
* @param bufptr location where pointer to buffer is returned
|
||||
* @param size location where size of buffer is returned
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR error code in case of failure.
|
||||
*/
|
||||
int read_file(const char *filename, char **bufptr, size_t *size);
|
||||
|
||||
/**
|
||||
* Get a file corresponding to a preset file.
|
||||
*
|
||||
* If is_path is non-zero, look for the file in the path preset_name.
|
||||
* Otherwise search for a file named arg.ffpreset in the directories
|
||||
* $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined
|
||||
* at configuration time or in a "ffpresets" folder along the executable
|
||||
* on win32, in that order. If no such file is found and
|
||||
* codec_name is defined, then search for a file named
|
||||
* codec_name-preset_name.ffpreset in the above-mentioned directories.
|
||||
*
|
||||
* @param filename buffer where the name of the found filename is written
|
||||
* @param filename_size size in bytes of the filename buffer
|
||||
* @param preset_name name of the preset to search
|
||||
* @param is_path tell if preset_name is a filename path
|
||||
* @param codec_name name of the codec for which to look for the
|
||||
* preset, may be NULL
|
||||
*/
|
||||
FILE *get_preset_file(char *filename, size_t filename_size,
|
||||
const char *preset_name, int is_path, const char *codec_name);
|
||||
void show_formats(void);
|
||||
|
||||
#endif /* FFMPEG_CMDUTILS_H */
|
||||
|
@@ -1,13 +0,0 @@
|
||||
{ "L", OPT_EXIT, {(void*)opt_license}, "show license" },
|
||||
{ "h", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||
{ "?", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||
{ "help", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||
{ "-help", OPT_EXIT, {(void*)opt_help}, "show help" },
|
||||
{ "version", OPT_EXIT, {(void*)opt_version}, "show version" },
|
||||
{ "formats" , OPT_EXIT, {(void*)opt_formats }, "show available formats" },
|
||||
{ "codecs" , OPT_EXIT, {(void*)opt_codecs }, "show available codecs" },
|
||||
{ "bsfs" , OPT_EXIT, {(void*)opt_bsfs }, "show available bit stream filters" },
|
||||
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
|
||||
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
|
||||
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
|
||||
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
144
common.mak
144
common.mak
@@ -2,90 +2,116 @@
|
||||
# common bits used by all libraries
|
||||
#
|
||||
|
||||
# first so "all" becomes default target
|
||||
all: all-yes
|
||||
all: # make "all" default target
|
||||
|
||||
ifndef SUBDIR
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.h $(SRC_DIR)
|
||||
vpath %.S $(SRC_DIR)
|
||||
vpath %.asm $(SRC_DIR)
|
||||
vpath %.v $(SRC_DIR)
|
||||
|
||||
ifndef V
|
||||
Q = @
|
||||
ECHO = printf "$(1)\t%s\n" $(2)
|
||||
BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
|
||||
SILENT = DEPCC YASMDEP RM RANLIB
|
||||
MSG = $@
|
||||
M = @$(call ECHO,$(TAG),$@);
|
||||
$(foreach VAR,$(BRIEF), \
|
||||
$(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
|
||||
$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
|
||||
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
||||
ifeq ($(SRC_DIR),$(SRC_PATH_BARE))
|
||||
BUILD_ROOT_REL = .
|
||||
else
|
||||
BUILD_ROOT_REL = ..
|
||||
endif
|
||||
|
||||
IFLAGS := -I. -I$(SRC_PATH)
|
||||
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
||||
CFLAGS += $(ECFLAGS)
|
||||
YASMFLAGS += $(IFLAGS) -Pconfig.asm
|
||||
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||
|
||||
HOSTCFLAGS += $(IFLAGS)
|
||||
CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CCDEP)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
|
||||
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(ASDEP)
|
||||
$(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
|
||||
|
||||
%.ho: %.h
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
||||
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
|
||||
|
||||
%.d: %.c
|
||||
$(DEPEND_CMD) > $@
|
||||
|
||||
%.d: %.S
|
||||
$(DEPEND_CMD) > $@
|
||||
|
||||
%.d: %.cpp
|
||||
$(DEPEND_CMD) > $@
|
||||
|
||||
%.o: %.d
|
||||
|
||||
%$(EXESUF): %.c
|
||||
|
||||
%.ver: %.v
|
||||
$(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
|
||||
sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
|
||||
|
||||
%.c %.h: TAG = GEN
|
||||
|
||||
# Dummy rule to stop make trying to rebuild removed or renamed headers
|
||||
%.h:
|
||||
@:
|
||||
|
||||
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
||||
# so this saves some time on slow systems.
|
||||
.SUFFIXES:
|
||||
|
||||
# Do not delete intermediate files from chains of implicit rules
|
||||
$(OBJS):
|
||||
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
|
||||
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
|
||||
$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES)
|
||||
endif
|
||||
|
||||
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
|
||||
$(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh
|
||||
$< $(SRC_PATH) $@ $(EXTRA_VERSION)
|
||||
|
||||
OBJS += $(OBJS-yes)
|
||||
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
||||
TESTPROGS += $(TESTPROGS-yes)
|
||||
install: install-libs install-headers
|
||||
|
||||
uninstall: uninstall-libs uninstall-headers
|
||||
|
||||
.PHONY: all depend dep clean distclean install* uninstall* tests
|
||||
endif
|
||||
|
||||
CFLAGS += $(CFLAGS-yes)
|
||||
OBJS += $(OBJS-yes)
|
||||
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
||||
TESTS += $(TESTS-yes)
|
||||
|
||||
FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
|
||||
FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS)
|
||||
FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS)
|
||||
|
||||
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
|
||||
OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
|
||||
TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
|
||||
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
|
||||
HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
|
||||
HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
|
||||
OBJS := $(addprefix $(SUBDIR),$(OBJS))
|
||||
TESTS := $(addprefix $(SUBDIR),$(TESTS))
|
||||
|
||||
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||
DEP_LIBS:=$(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME))
|
||||
|
||||
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
||||
SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
|
||||
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
|
||||
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
||||
checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
|
||||
|
||||
$(HOSTOBJS): %.o: %.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
depend dep: $(DEPS)
|
||||
|
||||
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
||||
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
||||
CLEANSUFFIXES = *.o *~ *.ho *.ver
|
||||
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map
|
||||
DISTCLEANSUFFIXES = *.d *.pc
|
||||
|
||||
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
||||
DISTCLEANSUFFIXES = *.pc
|
||||
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
||||
define RULES
|
||||
$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
|
||||
$(CC) $(FFLDFLAGS) -o $$@ $$^ $(SUBDIR)$(LIBNAME) $(FFEXTRALIBS)
|
||||
|
||||
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
|
||||
$(SUBDIR)%-test.o: $(SUBDIR)%.c
|
||||
$(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
|
||||
|
||||
$(SUBDIR)%-test.o: $(SUBDIR)%-test.c
|
||||
$(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
|
||||
|
||||
$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
|
||||
$(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$<
|
||||
|
||||
$(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm
|
||||
$(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@
|
||||
|
||||
clean::
|
||||
rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
|
||||
$(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
|
||||
|
||||
distclean:: clean
|
||||
rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \
|
||||
$(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
|
||||
endef
|
||||
|
||||
$(eval $(RULES))
|
||||
|
||||
tests: $(TESTS)
|
||||
|
||||
-include $(DEPS)
|
||||
|
926
doc/APIchanges
926
doc/APIchanges
@@ -1,925 +1,15 @@
|
||||
Never assume the API of libav* to be stable unless at least 1 month has passed
|
||||
since the last major version increase.
|
||||
|
||||
The last version increases were:
|
||||
libavcodec: 2011-04-18
|
||||
libavdevice: 2011-04-18
|
||||
libavfilter: 2011-04-18
|
||||
libavformat: 2011-04-18
|
||||
libpostproc: 2011-04-18
|
||||
libswscale: 2011-06-20
|
||||
libavutil: 2011-04-18
|
||||
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
|
||||
2011-06-19 - xxxxxxx - lavfi 2.23.0 - avfilter.h
|
||||
Add layout negotiation fields and helper functions.
|
||||
|
||||
In particular, add in_chlayouts and out_chlayouts to AVFilterLink,
|
||||
and the functions:
|
||||
avfilter_set_common_sample_formats()
|
||||
avfilter_set_common_channel_layouts()
|
||||
avfilter_all_channel_layouts()
|
||||
|
||||
2011-06-19 - xxxxxxx - lavfi 2.22.0 - AVFilterFormats
|
||||
Change type of AVFilterFormats.formats from int * to int64_t *,
|
||||
and update formats handling API accordingly.
|
||||
|
||||
avfilter_make_format_list() still takes a int32_t array and converts
|
||||
it to int64_t. A new function, avfilter_make_format64_list(), that
|
||||
takes int64_t arrays has been added.
|
||||
|
||||
2011-06-19 - xxxxxxx - lavfi 2.21.0 - vsink_buffer.h
|
||||
Add video sink buffer and vsink_buffer.h public header.
|
||||
|
||||
2011-06-12 - xxxxxxx - lavfi 2.18.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() function in
|
||||
libavfilter/avcodec.h.
|
||||
|
||||
2011-06-12 - xxxxxxx - lavfi 2.17.0 - avfiltergraph.h
|
||||
Add avfilter_inout_alloc() and avfilter_inout_free() functions.
|
||||
|
||||
2011-06-12 - xxxxxxx - lavfi 2.16.0 - avfilter_graph_parse()
|
||||
Change avfilter_graph_parse() signature.
|
||||
|
||||
2011-07-10 - xxxxxxx - lavf 53.3.0
|
||||
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||
|
||||
2011-07-10 - xxxxxxx - lavc 53.6.0
|
||||
Add avcodec_open2(), deprecate avcodec_open().
|
||||
|
||||
2011-06-xx - xxxxxxx - lavf 53.2.0 - avformat.h
|
||||
Add avformat_open_input and avformat_write_header().
|
||||
Deprecate av_open_input_stream, av_open_input_file,
|
||||
AVFormatParameters and av_write_header.
|
||||
|
||||
2011-06-xx - xxxxxxx - lavu 51.7.0 - opt.h
|
||||
Add av_opt_set_dict() and av_opt_find().
|
||||
Deprecate av_find_opt().
|
||||
Add AV_DICT_APPEND flag.
|
||||
|
||||
2011-06-xx - xxxxxxx - lavu 51.6.0 - opt.h
|
||||
Add av_opt_flag_is_set().
|
||||
|
||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
||||
|
||||
2011-06-09 - d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
Move AVMetadata from lavf to lavu and rename it to
|
||||
AVDictionary -- new installed header dict.h.
|
||||
All av_metadata_* functions renamed to av_dict_*.
|
||||
|
||||
2011-06-07 - a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
||||
Deprecate av_get_bits_per_sample_fmt().
|
||||
|
||||
2011-06-xx - b39b062 - lavu 51.8.0 - opt.h
|
||||
Add av_opt_free convenience function.
|
||||
|
||||
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
||||
Remove AVFilterBufferRefAudioProps.size, and use nb_samples in
|
||||
avfilter_get_audio_buffer() and avfilter_default_get_audio_buffer() in
|
||||
place of size.
|
||||
|
||||
2011-06-06 - 0bc2cca - lavu 51.6.0 - av_samples_alloc()
|
||||
Switch nb_channels and nb_samples parameters order in
|
||||
av_samples_alloc().
|
||||
|
||||
2011-06-06 - e1c7414 - lavu 51.5.0 - av_samples_*
|
||||
Change the data layout created by av_samples_fill_arrays() and
|
||||
av_samples_alloc().
|
||||
|
||||
2011-06-06 - 27bcf55 - lavfi 2.13.0 - vsrc_buffer.h
|
||||
Make av_vsrc_buffer_add_video_buffer_ref() accepts an additional
|
||||
flags parameter in input.
|
||||
|
||||
2011-06-03 - e977ca2 - lavfi 2.12.0 - avfilter_link_free()
|
||||
Add avfilter_link_free() function.
|
||||
|
||||
2011-06-02 - 5ad38d9 - lavu 51.4.0 - av_force_cpu_flags()
|
||||
Add av_cpu_flags() in libavutil/cpu.h.
|
||||
|
||||
2011-05-28 - e71f260 - lavu 51.3.0 - pixdesc.h
|
||||
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
||||
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
||||
|
||||
2011-05-25 - 30315a8 - lavf 53.3.0 - avformat.h
|
||||
Add fps_probe_size to AVFormatContext.
|
||||
|
||||
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
||||
Introduce avformat_alloc_output_context2() and deprecate
|
||||
avformat_alloc_output_context().
|
||||
|
||||
2011-05-22 - 83db719 - lavfi 2.10.0 - vsrc_buffer.h
|
||||
Make libavfilter/vsrc_buffer.h public.
|
||||
|
||||
2011-05-19 - c000a9f - lavfi 2.8.0 - avcodec.h
|
||||
Add av_vsrc_buffer_add_frame() to libavfilter/avcodec.h.
|
||||
|
||||
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
||||
|
||||
2011-05-18 - 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
Add request_sample_fmt field to AVCodecContext.
|
||||
|
||||
2011-05-10 - 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
Deprecate AVLPCType and the following fields in
|
||||
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
||||
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
||||
Corresponding FLAC encoder options should be used instead.
|
||||
|
||||
2011-05-07 - 9fdf772 - lavfi 2.5.0 - avcodec.h
|
||||
Add libavfilter/avcodec.h header and avfilter_copy_frame_props()
|
||||
function.
|
||||
|
||||
2011-05-07 - 18ded93 - lavc 53.5.0 - AVFrame
|
||||
Add format field to AVFrame.
|
||||
|
||||
2011-05-07 - 22333a6 - lavc 53.4.0 - AVFrame
|
||||
Add width and height fields to AVFrame.
|
||||
|
||||
2011-05-01 - 35fe66a - lavfi 2.4.0 - avfilter.h
|
||||
Rename AVFilterBufferRefVideoProps.pixel_aspect to
|
||||
sample_aspect_ratio.
|
||||
|
||||
2011-05-01 - 77e9dee - lavc 53.3.0 - AVFrame
|
||||
Add a sample_aspect_ratio field to AVFrame.
|
||||
|
||||
2011-05-01 - 1ba5727 - lavc 53.2.0 - AVFrame
|
||||
Add a pkt_pos field to AVFrame.
|
||||
|
||||
2011-04-29 - 35ceaa7 - lavu 51.2.0 - mem.h
|
||||
Add av_dynarray_add function for adding
|
||||
an element to a dynamic array.
|
||||
|
||||
2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
|
||||
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
||||
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
||||
libavcodec/avcodec.h.
|
||||
|
||||
2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
||||
|
||||
2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||
|
||||
2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
||||
|
||||
2011-04-15 - lavc 52.120.0 - avcodec.h
|
||||
AVPacket structure got additional members for passing side information:
|
||||
4de339e introduce side information for AVPacket
|
||||
2d8591c make containers pass palette change in AVPacket
|
||||
|
||||
2011-04-12 - lavf 52.107.0 - avio.h
|
||||
Avio cleanup, part II - deprecate the entire URLContext API:
|
||||
175389c add avio_check as a replacement for url_exist
|
||||
ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
for _av_url_read_fseek/fpause
|
||||
cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
should be used instead.
|
||||
80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
f8270bb add avio_enum_protocols.
|
||||
5593f03 deprecate URLProtocol.
|
||||
c486dad deprecate URLContext.
|
||||
026e175 deprecate the typedef for URLInterruptCB
|
||||
8e76a19 deprecate av_register_protocol2.
|
||||
b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
1305d93 deprecate av_url_read_seek
|
||||
fa104e1 deprecate av_url_read_pause
|
||||
727c7aa deprecate url_get_filename().
|
||||
5958df3 deprecate url_max_packet_size().
|
||||
1869ea0 deprecate url_get_file_handle().
|
||||
32a97d4 deprecate url_filesize().
|
||||
e52a914 deprecate url_close().
|
||||
58a48c6 deprecate url_seek().
|
||||
925e908 deprecate url_write().
|
||||
dce3756 deprecate url_read_complete().
|
||||
bc371ac deprecate url_read().
|
||||
0589da0 deprecate url_open().
|
||||
62eaaea deprecate url_connect.
|
||||
5652bb9 deprecate url_alloc.
|
||||
333e894 deprecate url_open_protocol
|
||||
e230705 deprecate url_poll and URLPollEntry
|
||||
|
||||
2011-04-08 - lavf 52.106.0 - avformat.h
|
||||
Minor avformat.h cleanup:
|
||||
a9bf9d8 deprecate av_guess_image2_codec
|
||||
c3675df rename avf_sdp_create->av_sdp_create
|
||||
|
||||
2011-04-03 - lavf 52.105.0 - avio.h
|
||||
Large-scale renaming/deprecating of AVIOContext-related functions:
|
||||
724f6a0 deprecate url_fdopen
|
||||
403ee83 deprecate url_open_dyn_packet_buf
|
||||
6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
AVIOContext.is_streamed and url_is_streamed()
|
||||
b64030f deprecate get_checksum()
|
||||
4c4427a deprecate init_checksum()
|
||||
4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
933e90a deprecate av_url_read_fseek/fpause
|
||||
8d9769a deprecate url_fileno
|
||||
b7f2fdd rename put_flush_packet -> avio_flush
|
||||
35f1023 deprecate url_close_buf
|
||||
83fddae deprecate url_open_buf
|
||||
d9d86e0 rename url_fprintf -> avio_printf
|
||||
59f65d9 deprecate url_setbufsize
|
||||
3e68b3b deprecate url_ferror
|
||||
66e5b1d deprecate url_feof
|
||||
e8bb2e2 deprecate url_fget_max_packet_size
|
||||
76aa876 rename url_fsize -> avio_size
|
||||
e519753 deprecate url_fgetc
|
||||
655e45e deprecate url_fgets
|
||||
a2704c9 rename url_ftell -> avio_tell
|
||||
e16ead0 deprecate get_strz() in favor of avio_get_str
|
||||
0300db8,2af07d3 rename url_fskip -> avio_skip
|
||||
6b4aa5d rename url_fseek -> avio_seek
|
||||
61840b4 deprecate put_tag
|
||||
22a3212 rename url_fopen/fclose -> avio_open/close.
|
||||
0ac8e2b deprecate put_nbyte
|
||||
77eb550 rename put_byte -> avio_w8
|
||||
put_[b/l]e<type> -> avio_w[b/l]<type>
|
||||
put_buffer -> avio_write
|
||||
b7effd4 rename get_byte -> avio_r8,
|
||||
get_[b/l]e<type> -> avio_r[b/l]<type>
|
||||
get_buffer -> avio_read
|
||||
b3db9ce deprecate get_partial_buffer
|
||||
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
||||
|
||||
2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
Add audio_service_type field to AVCodecContext.
|
||||
|
||||
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
||||
Add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
|
||||
|
||||
2011-03-02 - 863c471 - lavf 52.103.0 - av_pkt_dump2, av_pkt_dump_log2
|
||||
Add new functions av_pkt_dump2, av_pkt_dump_log2 that uses the
|
||||
source stream timebase for outputting timestamps. Deprecate
|
||||
av_pkt_dump and av_pkt_dump_log.
|
||||
|
||||
2011-02-20 - e731b8d - lavf 52.102.0 - avio.h
|
||||
* e731b8d - rename init_put_byte() to ffio_init_context(), deprecating the
|
||||
original, and move it to a private header so it is no longer
|
||||
part of our public API. Instead, use av_alloc_put_byte().
|
||||
* ae628ec - rename ByteIOContext to AVIOContext.
|
||||
|
||||
2011-02-16 - 09d171b - lavf 52.101.0 - avformat.h
|
||||
lavu 52.39.0 - parseutils.h
|
||||
* 610219a - Add av_ prefix to dump_format().
|
||||
* f6c7375 - Replace parse_date() in lavf with av_parse_time() in lavu.
|
||||
* ab0287f - Move find_info_tag from lavf to lavu and add av_prefix to it.
|
||||
|
||||
2011-02-15 - lavu 52.38.0 - merge libavcore
|
||||
libavcore is merged back completely into libavutil
|
||||
|
||||
2011-02-10 - 55bad0c - lavc 52.113.0 - vbv_delay
|
||||
Add vbv_delay field to AVCodecContext
|
||||
|
||||
2011-02-14 - 24a83bd - lavf 52.100.0 - AV_DISPOSITION_CLEAN_EFFECTS
|
||||
Add AV_DISPOSITION_CLEAN_EFFECTS disposition flag.
|
||||
|
||||
2011-02-14 - 910b5b8 - lavfi 1.76.0 - AVFilterLink sample_aspect_ratio
|
||||
Add sample_aspect_ratio field to AVFilterLink.
|
||||
|
||||
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
||||
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
||||
|
||||
2011-02-09 - 5592734 - lavc 52.112.0 - avcodec_thread_init()
|
||||
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
||||
set thread_count before calling avcodec_open.
|
||||
|
||||
2011-02-09 - 778b08a - lavc 52.111.0 - threading API
|
||||
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
||||
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
||||
Add thread_type and active_thread_type fields to AVCodecContext.
|
||||
|
||||
2011-02-08 - 3940caa - lavf 52.98.0 - av_probe_input_buffer
|
||||
Add av_probe_input_buffer() to avformat.h for probing format from a
|
||||
ByteIOContext.
|
||||
|
||||
2011-02-06 - fe174fc - lavf 52.97.0 - avio.h
|
||||
Add flag for non-blocking protocols: URL_FLAG_NONBLOCK
|
||||
|
||||
2011-02-04 - f124b08 - lavf 52.96.0 - avformat_free_context()
|
||||
Add avformat_free_context() in avformat.h.
|
||||
|
||||
2011-02-03 - f5b82f4 - lavc 52.109.0 - add CODEC_ID_PRORES
|
||||
Add CODEC_ID_PRORES to avcodec.h.
|
||||
|
||||
2011-02-03 - fe9a3fb - lavc 52.109.0 - H.264 profile defines
|
||||
Add defines for H.264 * Constrained Baseline and Intra profiles
|
||||
|
||||
2011-02-02 - lavf 52.95.0
|
||||
* 50196a9 - add a new installed header version.h.
|
||||
* 4efd5cf, dccbd97, 93b78d1 - add several variants of public
|
||||
avio_{put,get}_str* functions. Deprecate corresponding semi-public
|
||||
{put,get}_str*.
|
||||
|
||||
2011-02-02 - dfd2a00 - lavu 50.37.0 - log.h
|
||||
Make av_dlog public.
|
||||
|
||||
2011-01-31 - 7b3ea55 - lavfi 1.76.0 - vsrc_buffer
|
||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||
|
||||
2011-01-31 - 910b5b8 - lavfi 1.75.0 - AVFilterLink sample_aspect_ratio
|
||||
Add sample_aspect_ratio field to AVFilterLink.
|
||||
|
||||
2011-01-15 - r26374 - lavfi 1.74.0 - AVFilterBufferRefAudioProps
|
||||
Rename AVFilterBufferRefAudioProps.samples_nb to nb_samples.
|
||||
|
||||
2011-01-14 - r26330 - lavf 52.93.0 - av_metadata_copy()
|
||||
Add av_metadata_copy() in avformat.h.
|
||||
|
||||
2011-01-07 - r26262 - lavc 52.107.0 - deprecate reordered_opaque
|
||||
Deprecate reordered_opaque in favor of pkt_pts/dts.
|
||||
|
||||
2011-01-07 - r26261 - lavc 52.106.0 - pkt_dts
|
||||
Add pkt_dts to AVFrame, this will in the future allow multithreading decoders
|
||||
to not mess up dts.
|
||||
|
||||
2011-01-07 - r26260 - lavc 52.105.0 - pkt_pts
|
||||
Add pkt_pts to AVFrame.
|
||||
|
||||
2011-01-07 - r26259 - lavc 52.104.0 - av_get_profile_name()
|
||||
Add av_get_profile_name to libavcodec/avcodec.h.
|
||||
|
||||
2010-12-27 - r26108 - lavfi 1.71.0 - AV_PERM_NEG_LINESIZES
|
||||
Add AV_PERM_NEG_LINESIZES in avfilter.h.
|
||||
|
||||
2010-12-27 - r26104 - lavf 52.91.0 - av_find_best_stream()
|
||||
Add av_find_best_stream to libavformat/avformat.h.
|
||||
|
||||
2010-12-27 - r26103 - lavf 52.90.0
|
||||
Add AVFMT_NOSTREAMS flag for formats with no streams,
|
||||
like e.g. text metadata.
|
||||
|
||||
2010-12-22 - r26073 - lavu 50.36.0 - file.h
|
||||
Add functions av_file_map() and av_file_unmap() in file.h.
|
||||
|
||||
2010-12-19 - r26056 - lavu 50.35.0 - error.h
|
||||
Add "not found" error codes:
|
||||
AVERROR_DEMUXER_NOT_FOUND
|
||||
AVERROR_MUXER_NOT_FOUND
|
||||
AVERROR_DECODER_NOT_FOUND
|
||||
AVERROR_ENCODER_NOT_FOUND
|
||||
AVERROR_PROTOCOL_NOT_FOUND
|
||||
AVERROR_FILTER_NOT_FOUND
|
||||
AVERROR_BSF_NOT_FOUND
|
||||
AVERROR_STREAM_NOT_FOUND
|
||||
|
||||
2010-12-09 - r25923 - lavcore 0.16.0 - avcore.h
|
||||
Move AV_NOPTS_VALUE, AV_TIME_BASE, AV_TIME_BASE_Q symbols from
|
||||
avcodec.h to avcore.h.
|
||||
|
||||
2010-12-04 - r25886 - lavc 52.98.0 - CODEC_CAP_NEG_LINESIZES
|
||||
Add CODEC_CAP_NEG_LINESIZES codec capability flag in avcodec.h.
|
||||
|
||||
2010-12-04 - r25879 - lavu 50.34.0 - av_get_pix_fmt_string()
|
||||
Deprecate avcodec_pix_fmt_string() in favor of
|
||||
pixdesc.h/av_get_pix_fmt_string().
|
||||
|
||||
2010-12-04 - r25878 - lavcore 0.15.0 - av_image_alloc()
|
||||
Add av_image_alloc() to libavcore/imgutils.h.
|
||||
|
||||
2010-12-02 - r25862 - lavfi 1.67.0 - avfilter_graph_create_filter()
|
||||
Add function avfilter_graph_create_filter() in avfiltergraph.h.
|
||||
|
||||
2010-11-25 - r25826 - lavfi 1.65.0 - avfilter_get_video_buffer_ref_from_arrays()
|
||||
Add function avfilter_get_video_buffer_ref_from_arrays() in
|
||||
avfilter.h.
|
||||
|
||||
2010-11-21 - r25787 - lavcore 0.14.0 - audioconvert.h
|
||||
Add a public audio channel API in audioconvert.h, and deprecate the
|
||||
corresponding functions in libavcodec:
|
||||
avcodec_get_channel_name()
|
||||
avcodec_get_channel_layout()
|
||||
avcodec_get_channel_layout_string()
|
||||
avcodec_channel_layout_num_channels()
|
||||
and the CH_* macros defined in libavcodec/avcodec.h.
|
||||
|
||||
2010-11-21 - r25777 - lavf 52.85.0 - avformat.h
|
||||
Add av_append_packet().
|
||||
|
||||
2010-11-21 - r25776 - lavc 52.97.0 - avcodec.h
|
||||
Add av_grow_packet().
|
||||
|
||||
2010-11-17 - r25761 - lavcore 0.13.0 - parseutils.h
|
||||
Add av_parse_color() declared in libavcore/parseutils.h.
|
||||
|
||||
2010-11-13 - r25745 - lavc 52.95.0 - AVCodecContext
|
||||
Add AVCodecContext.subtitle_header and AVCodecContext.subtitle_header_size
|
||||
fields.
|
||||
|
||||
2010-11-13 - r25740 - lavfi 1.62.0 - avfiltergraph.h
|
||||
Make avfiltergraph.h public.
|
||||
|
||||
2010-11-13 - r25737 - lavfi 1.61.0 - avfiltergraph.h
|
||||
Remove declarations from avfiltergraph.h for the functions:
|
||||
avfilter_graph_check_validity()
|
||||
avfilter_graph_config_links()
|
||||
avfilter_graph_config_formats()
|
||||
which are now internal.
|
||||
Use avfilter_graph_config() instead.
|
||||
|
||||
2010-11-08 - r25708 - lavu 50.33.0 - eval.h
|
||||
Deprecate functions:
|
||||
av_parse_and_eval_expr(),
|
||||
av_parse_expr(),
|
||||
av_eval_expr(),
|
||||
av_free_expr(),
|
||||
in favor of the functions:
|
||||
av_expr_parse_and_eval(),
|
||||
av_expr_parse(),
|
||||
av_expr_eval(),
|
||||
av_expr_free().
|
||||
|
||||
2010-11-08 - r25707 - lavfi 1.59.0 - avfilter_free()
|
||||
Rename avfilter_destroy() to avfilter_free().
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-11-07 - r25705 - lavfi 1.58.0 - avfiltergraph.h
|
||||
Remove graphparser.h header, move AVFilterInOut and
|
||||
avfilter_graph_parse() declarations to libavfilter/avfiltergraph.h.
|
||||
|
||||
2010-11-07 - r25700 - lavfi 1.57.0 - AVFilterInOut
|
||||
Rename field AVFilterInOut.filter to AVFilterInOut.filter_ctx.
|
||||
This change breaks libavfilter API.
|
||||
|
||||
2010-11-04 - r25674 - lavfi 1.56.0 - avfilter_graph_free()
|
||||
Rename avfilter_graph_destroy() to avfilter_graph_free().
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-11-04 - r25673 - lavfi 1.55.0 - avfilter_graph_alloc()
|
||||
Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h.
|
||||
|
||||
2010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt()
|
||||
Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and
|
||||
deprecate av_get_bits_per_sample_format().
|
||||
|
||||
2010-11-02 - r25653 - lavcore 0.11.0 - samplefmt.h
|
||||
Add sample format functions in libavcore/samplefmt.h:
|
||||
av_get_sample_fmt_name(),
|
||||
av_get_sample_fmt(),
|
||||
av_get_sample_fmt_string(),
|
||||
and deprecate the corresponding libavcodec/audioconvert.h functions:
|
||||
avcodec_get_sample_fmt_name(),
|
||||
avcodec_get_sample_fmt(),
|
||||
avcodec_sample_fmt_string().
|
||||
|
||||
2010-11-02 - r25652 - lavcore 0.10.0 - samplefmt.h
|
||||
Define enum AVSampleFormat in libavcore/samplefmt.h, deprecate enum
|
||||
SampleFormat.
|
||||
|
||||
2010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config()
|
||||
Add the function avfilter_graph_config() in avfiltergraph.h.
|
||||
|
||||
2010-10-15 - r25493 - lavf 52.83.0 - metadata API
|
||||
Change demuxers to export metadata in generic format and
|
||||
muxers to accept generic format. Deprecate the public
|
||||
conversion API.
|
||||
|
||||
2010-10-10 - r25441 - lavfi 1.49.0 - AVFilterLink.time_base
|
||||
Add time_base field to AVFilterLink.
|
||||
|
||||
2010-09-27 - r25236 - lavu 50.31.0 - av_set_options_string()
|
||||
Move av_set_options_string() from libavfilter/parseutils.h to
|
||||
libavutil/opt.h.
|
||||
|
||||
2010-09-27 - r25227 - lavfi 1.47.0 - AVFilterLink
|
||||
Make the AVFilterLink fields srcpad and dstpad store the pointers to
|
||||
the source and destination pads, rather than their indexes.
|
||||
|
||||
2010-09-27 - r25225 - lavu 50.30.0 - av_get_token()
|
||||
Move av_get_token() from libavfilter/parseutils.h to
|
||||
libavutil/avstring.h.
|
||||
|
||||
2010-09-26 - r32368 - lsws 0.12.0 - swscale.h
|
||||
Add the functions sws_alloc_context() and sws_init_context().
|
||||
|
||||
2010-09-26 - r25210 - lavu 50.29.0 - opt.h
|
||||
Move libavcodec/opt.h to libavutil/opt.h.
|
||||
|
||||
2010-09-24 - r25174 - lavu 50.28.0 - av_log_set_flags()
|
||||
Default of av_log() changed due to many problems to the old no repeat
|
||||
detection. Read the docs of AV_LOG_SKIP_REPEATED in log.h before
|
||||
enabling it for your app!.
|
||||
|
||||
2010-09-24 - r25167 - lavc 52.90.0 - av_opt_show2()
|
||||
Deprecate av_opt_show() in favor or av_opt_show2().
|
||||
|
||||
2010-09-14 - r25120 - lavu 50.27.0 - av_popcount()
|
||||
Add av_popcount() to libavutil/common.h.
|
||||
|
||||
2010-09-08 - r25076 - lavu 50.26.0 - av_get_cpu_flags()
|
||||
Add av_get_cpu_flags().
|
||||
|
||||
2010-09-07 - r25067 - lavcore 0.9.0 - av_image_copy()
|
||||
Add av_image_copy().
|
||||
|
||||
2010-09-07 - r25064 - lavcore 0.8.0 - av_image_copy_plane()
|
||||
Add av_image_copy_plane().
|
||||
|
||||
2010-09-07 - r25057 - lavcore 0.7.0 - imgutils.h
|
||||
Adopt hierarchical scheme for the imgutils.h function names,
|
||||
deprecate the old names.
|
||||
|
||||
2010-09-04 - r25040 - lavu 50.25.0 - AV_CPU_FLAG_*
|
||||
Deprecate the FF_MM_* flags defined in libavcodec/avcodec.h in favor
|
||||
of the AV_CPU_FLAG_* flags defined in libavutil/cpu.h.
|
||||
|
||||
2010-08-26 - r24936 - lavc 52.87.0 - avcodec_get_channel_layout()
|
||||
Add avcodec_get_channel_layout() in audioconvert.h.
|
||||
|
||||
2010-08-20 - r24851 - lavcore 0.6.0 - av_fill_image_max_pixsteps()
|
||||
Rename av_fill_image_max_pixstep() to av_fill_image_max_pixsteps().
|
||||
|
||||
2010-08-18 - r24827 - lavcore 0.5.0 - av_fill_image_max_pixstep()
|
||||
Add av_fill_image_max_pixstep() in imgutils.h.
|
||||
|
||||
2010-08-17 - r24814 - lavu 50.24.0 - AV_NE()
|
||||
Add the AV_NE macro.
|
||||
|
||||
2010-08-17 - r24811 - lavfi 1.36.0 - audio framework
|
||||
Implement AVFilterBufferRefAudioProps struct for audio properties,
|
||||
get_audio_buffer(), filter_samples() functions and related changes.
|
||||
|
||||
2010-08-12 - r24787 - lavcore 0.4.0 - av_get_image_linesize()
|
||||
Add av_get_image_linesize() in imgutils.h.
|
||||
|
||||
2010-08-11 - r24773 - lavfi 1.34.0 - AVFilterBufferRef
|
||||
Resize data and linesize arrays in AVFilterBufferRef to 8.
|
||||
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-08-11 - r24768 - lavc 52.85.0 - av_picture_data_copy()
|
||||
Add av_picture_data_copy in avcodec.h.
|
||||
|
||||
2010-08-11 - r24765 - lavfi 1.33.0 - avfilter_open()
|
||||
Change avfilter_open() signature:
|
||||
AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) ->
|
||||
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);
|
||||
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-08-11 - r24763 - lavfi 1.32.0 - AVFilterBufferRef
|
||||
Add a type field to AVFilterBufferRef, and move video specific
|
||||
properties to AVFilterBufferRefVideoProps.
|
||||
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-08-07 - r24732 - lavfi 1.31.0 - AVFilterLink
|
||||
Rename AVFilterLink fields:
|
||||
AVFilterLink.srcpic -> AVFilterLink.src_buf
|
||||
AVFilterLink.cur_pic -> AVFilterLink.cur_buf
|
||||
AVFilterLink.outpic -> AVFilterLink.out_buf
|
||||
|
||||
2010-08-07 - r24731 - lavfi 1.30.0
|
||||
Rename functions and fields:
|
||||
avfilter_(un)ref_pic -> avfilter_(un)ref_buffer
|
||||
avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props
|
||||
AVFilterBufferRef.pic -> AVFilterBufferRef.buffer
|
||||
|
||||
2010-08-07 - r24730 - lavfi 1.29.0 - AVFilterBufferRef
|
||||
Rename AVFilterPicRef to AVFilterBufferRef.
|
||||
|
||||
2010-08-07 - r24728 - lavfi 1.28.0 - AVFilterBuffer
|
||||
Move format field from AVFilterBuffer to AVFilterPicRef.
|
||||
|
||||
2010-08-06 - r24709 - lavcore 0.3.0 - av_check_image_size()
|
||||
Deprecate avcodec_check_dimensions() in favor of the function
|
||||
av_check_image_size() defined in libavcore/imgutils.h.
|
||||
|
||||
2010-07-30 - r24592 - lavfi 1.27.0 - AVFilterBuffer
|
||||
Increase size of the arrays AVFilterBuffer.data and
|
||||
AVFilterBuffer.linesize from 4 to 8.
|
||||
|
||||
This change breaks libavfilter ABI.
|
||||
|
||||
2010-07-29 - r24583 - lavcore 0.2.0 - imgutils.h
|
||||
Add functions av_fill_image_linesizes() and
|
||||
av_fill_image_pointers(), declared in libavcore/imgutils.h.
|
||||
|
||||
2010-07-27 - r24518 - lavcore 0.1.0 - parseutils.h
|
||||
Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
|
||||
defined in libavcodec in favor of the newly added functions
|
||||
av_parse_video_size() and av_parse_video_rate() declared in
|
||||
libavcore/parseutils.h.
|
||||
|
||||
2010-07-23 - r24439 - lavu 50.23.0 - mathematics.h
|
||||
Add the M_PHI constant definition.
|
||||
|
||||
2010-07-22 - r24424 - lavfi 1.26.0 - media format generalization
|
||||
Add a type field to AVFilterLink.
|
||||
|
||||
Change the field types:
|
||||
enum PixelFormat format -> int format in AVFilterBuffer
|
||||
enum PixelFormat *formats -> int *formats in AVFilterFormats
|
||||
enum PixelFormat *format -> int format in AVFilterLink
|
||||
|
||||
Change the function signatures:
|
||||
AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); ->
|
||||
AVFilterFormats *avfilter_make_format_list(const int *fmts);
|
||||
|
||||
int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); ->
|
||||
int avfilter_add_format (AVFilterFormats **avff, int fmt);
|
||||
|
||||
AVFilterFormats *avfilter_all_colorspaces(void); ->
|
||||
AVFilterFormats *avfilter_all_formats (enum AVMediaType type);
|
||||
|
||||
This change breaks libavfilter API/ABI.
|
||||
|
||||
2010-07-21 - r24393 - lavcore 0.0.0
|
||||
Add libavcore.
|
||||
|
||||
2010-07-17 - r24291 - lavfi 1.25.0 - AVFilterBuffer
|
||||
Remove w and h fields from AVFilterBuffer.
|
||||
|
||||
2010-07-17 - r24284 - lavfi 1.24.0 - AVFilterBuffer
|
||||
Rename AVFilterPic to AVFilterBuffer.
|
||||
|
||||
2010-07-17 - r24278 - lavf 52.74.0 - url_fskip()
|
||||
Make url_fskip() return an int error code instead of void.
|
||||
|
||||
2010-07-11 - r24199 - lavc 52.83.0
|
||||
Add AVCodecContext.lpc_type and AVCodecContext.lpc_passes fields.
|
||||
Add AVLPCType enum.
|
||||
Deprecate AVCodecContext.use_lpc.
|
||||
|
||||
2010-07-11 - r24185 - lavc 52.82.0 - avsubtitle_free()
|
||||
Add a function for free the contents of a AVSubtitle generated by
|
||||
avcodec_decode_subtitle.
|
||||
|
||||
2010-07-11 - r24174 - lavu 50.22.0 - bswap.h and intreadwrite.h
|
||||
Make the bswap.h and intreadwrite.h API public.
|
||||
|
||||
2010-07-08 - r24101 - lavu 50.21.0 - pixdesc.h
|
||||
Rename read/write_line() to av_read/write_image_line().
|
||||
|
||||
2010-07-07 - r24091 - lavfi 1.21.0 - avfilter_copy_picref_props()
|
||||
Add avfilter_copy_picref_props().
|
||||
|
||||
2010-07-03 - r24021 - lavc 52.79.0
|
||||
Add FF_COMPLIANCE_UNOFFICIAL and change all instances of
|
||||
FF_COMPLIANCE_INOFFICIAL to use FF_COMPLIANCE_UNOFFICIAL.
|
||||
|
||||
2010-07-02 - r23985 - lavu 50.20.0 - lfg.h
|
||||
Export av_lfg_init(), av_lfg_get(), av_mlfg_get(), and av_bmg_get() through
|
||||
lfg.h.
|
||||
|
||||
2010-06-28 - r23835 - lavfi 1.20.1 - av_parse_color()
|
||||
Extend av_parse_color() syntax, make it accept an alpha value specifier and
|
||||
set the alpha value to 255 by default.
|
||||
|
||||
2010-06-22 - r23706 - lavf 52.71.0 - URLProtocol.priv_data_size, priv_data_class
|
||||
Add priv_data_size and priv_data_class to URLProtocol.
|
||||
|
||||
2010-06-22 - r23704 - lavf 52.70.0 - url_alloc(), url_connect()
|
||||
Add url_alloc() and url_connect().
|
||||
|
||||
2010-06-22 - r23702 - lavf 52.69.0 - av_register_protocol2()
|
||||
Add av_register_protocol2(), deprecating av_register_protocol().
|
||||
|
||||
2010-06-09 - r23551 - lavu 50.19.0 - av_compare_mod()
|
||||
Add av_compare_mod() to libavutil/mathematics.h.
|
||||
|
||||
2010-06-05 - r23485 - lavu 50.18.0 - eval API
|
||||
Make the eval API public.
|
||||
|
||||
2010-06-04 - r23461 - lavu 50.17.0 - AV_BASE64_SIZE
|
||||
Add AV_BASE64_SIZE() macro.
|
||||
|
||||
2010-06-02 - r23421 - lavc 52.73.0 - av_get_codec_tag_string()
|
||||
Add av_get_codec_tag_string().
|
||||
|
||||
2010-06-01 - r31301 - lsws 0.11.0 - convertPalette API
|
||||
Add sws_convertPalette8ToPacked32() and sws_convertPalette8ToPacked24().
|
||||
|
||||
2010-05-26 - r23334 - lavc 52.72.0 - CODEC_CAP_EXPERIMENTAL
|
||||
Add CODEC_CAP_EXPERIMENTAL flag.
|
||||
NOTE: this was backported to 0.6
|
||||
|
||||
2010-05-23 - r23255 - lavu 50.16.0 - av_get_random_seed()
|
||||
Add av_get_random_seed().
|
||||
|
||||
2010-05-18 - r23161 - lavf 52.63.0 - AVFMT_FLAG_RTP_HINT
|
||||
Add AVFMT_FLAG_RTP_HINT as possible value for AVFormatContext.flags.
|
||||
NOTE: this was backported to 0.6
|
||||
|
||||
2010-05-09 - r23066 - lavfi 1.20.0 - AVFilterPicRef
|
||||
Add interlaced and top_field_first fields to AVFilterPicRef.
|
||||
|
||||
------------------------------8<-------------------------------------
|
||||
0.6 branch was cut here
|
||||
----------------------------->8--------------------------------------
|
||||
|
||||
2010-05-01 - r23002 - lavf 52.62.0 - probe function
|
||||
Add av_probe_input_format2 to API, it allows ignoring probe
|
||||
results below given score and returns the actual probe score.
|
||||
|
||||
2010-04-01 - r22806 - lavf 52.61.0 - metadata API
|
||||
Add a flag for av_metadata_set2() to disable overwriting of
|
||||
existing tags.
|
||||
|
||||
2010-04-01 - r22753 - lavc 52.66.0
|
||||
Add avcodec_get_edge_width().
|
||||
|
||||
2010-03-31 - r22750 - lavc 52.65.0
|
||||
Add avcodec_copy_context().
|
||||
|
||||
2010-03-31 - r22748 - lavf 52.60.0 - av_match_ext()
|
||||
Make av_match_ext() public.
|
||||
|
||||
2010-03-31 - r22736 - lavu 50.14.0 - AVMediaType
|
||||
Move AVMediaType enum from libavcodec to libavutil.
|
||||
|
||||
2010-03-31 - r22735 - lavc 52.64.0 - AVMediaType
|
||||
Define AVMediaType enum, and use it instead of enum CodecType, which
|
||||
is deprecated and will be dropped at the next major bump.
|
||||
|
||||
2010-03-25 - r22684 - lavu 50.13.0 - av_strerror()
|
||||
Implement av_strerror().
|
||||
|
||||
2010-03-23 - r22649 - lavc 52.60.0 - av_dct_init()
|
||||
Support DCT-I and DST-I.
|
||||
|
||||
2010-03-15 - r22540 - lavf 52.56.0 - AVFormatContext.start_time_realtime
|
||||
Add AVFormatContext.start_time_realtime field.
|
||||
|
||||
2010-03-13 - r22506 - lavfi 1.18.0 - AVFilterPicRef.pos
|
||||
Add AVFilterPicRef.pos field.
|
||||
|
||||
2010-03-13 - r22501 - lavu 50.12.0 - error.h
|
||||
Move error code definitions from libavcodec/avcodec.h to
|
||||
the new public header libavutil/error.h.
|
||||
|
||||
2010-03-07 - r22291 - lavc 52.56.0 - avfft.h
|
||||
Add public FFT interface.
|
||||
|
||||
2010-03-06 - r22251 - lavu 50.11.0 - av_stristr()
|
||||
Add av_stristr().
|
||||
|
||||
2010-03-03 - r22174 - lavu 50.10.0 - av_tree_enumerate()
|
||||
Add av_tree_enumerate().
|
||||
|
||||
2010-02-07 - r21673 - lavu 50.9.0 - av_compare_ts()
|
||||
Add av_compare_ts().
|
||||
|
||||
2010-02-05 - r30513 - lsws 0.10.0 - sws_getCoefficients()
|
||||
Add sws_getCoefficients().
|
||||
|
||||
2010-02-01 - r21587 - lavf 52.50.0 - metadata API
|
||||
Add a list of generic tag names, change 'author' -> 'artist',
|
||||
'year' -> 'date'.
|
||||
|
||||
2010-01-30 - r21545 - lavu 50.8.0 - av_get_pix_fmt()
|
||||
Add av_get_pix_fmt().
|
||||
|
||||
2010-01-21 - r30381 - lsws 0.9.0 - sws_scale()
|
||||
Change constness attributes of sws_scale() parameters.
|
||||
|
||||
2010-01-10 - r21121 - lavfi 1.15.0 - avfilter_graph_config_links()
|
||||
Add a log_ctx parameter to avfilter_graph_config_links().
|
||||
|
||||
2010-01-07 - r30236 - lsws 0.8.0 - sws_isSupported{In,Out}put()
|
||||
Add sws_isSupportedInput() and sws_isSupportedOutput() functions.
|
||||
|
||||
2010-01-06 - r21035 - lavfi 1.14.0 - avfilter_add_colorspace()
|
||||
Change the avfilter_add_colorspace() signature, make it accept an
|
||||
(AVFilterFormats **) rather than an (AVFilterFormats *) as before.
|
||||
|
||||
2010-01-03 - r21007 - lavfi 1.13.0 - avfilter_add_colorspace()
|
||||
Add avfilter_add_colorspace().
|
||||
|
||||
2010-01-02 - r20998 - lavf 52.46.0 - av_match_ext()
|
||||
Add av_match_ext(), it should be used in place of match_ext().
|
||||
|
||||
2010-01-01 - r20991 - lavf 52.45.0 - av_guess_format()
|
||||
Add av_guess_format(), it should be used in place of guess_format().
|
||||
|
||||
2009-12-13 - r20834 - lavf 52.43.0 - metadata API
|
||||
Add av_metadata_set2(), AV_METADATA_DONT_STRDUP_KEY and
|
||||
AV_METADATA_DONT_STRDUP_VAL.
|
||||
|
||||
2009-12-13 - r20829 - lavu 50.7.0 - avstring.h API
|
||||
Add av_d2str().
|
||||
|
||||
2009-12-13 - r20826 - lavc 52.42.0 - AVStream
|
||||
Add avg_frame_rate.
|
||||
|
||||
2009-12-12 - r20808 - lavu 50.6.0 - av_bmg_next()
|
||||
Introduce the av_bmg_next() function.
|
||||
|
||||
2009-12-05 - r20734 - lavfi 1.12.0 - avfilter_draw_slice()
|
||||
Add a slice_dir parameter to avfilter_draw_slice().
|
||||
|
||||
2009-11-26 - r20611 - lavfi 1.11.0 - AVFilter
|
||||
Remove the next field from AVFilter, this is not anymore required.
|
||||
|
||||
2009-11-25 - r20607 - lavfi 1.10.0 - avfilter_next()
|
||||
Introduce the avfilter_next() function.
|
||||
|
||||
2009-11-25 - r20605 - lavfi 1.9.0 - avfilter_register()
|
||||
Change the signature of avfilter_register() to make it return an
|
||||
int. This is required since now the registration operation may fail.
|
||||
|
||||
2009-11-25 - r20603 - lavu 50.5.0 - pixdesc.h API
|
||||
Make the pixdesc.h API public.
|
||||
|
||||
2009-10-27 - r20385 - lavfi 1.5.0 - AVFilter.next
|
||||
Add a next field to AVFilter, this is used for simplifying the
|
||||
registration and management of the registered filters.
|
||||
|
||||
2009-10-23 - r20356 - lavfi 1.4.1 - AVFilter.description
|
||||
Add a description field to AVFilter.
|
||||
|
||||
2009-10-19 - r20302 - lavfi 1.3.0 - avfilter_make_format_list()
|
||||
Change the interface of avfilter_make_format_list() from
|
||||
avfilter_make_format_list(int n, ...) to
|
||||
avfilter_make_format_list(enum PixelFormat *pix_fmts).
|
||||
|
||||
2009-10-18 - r20272 - lavfi 1.0.0 - avfilter_get_video_buffer()
|
||||
Make avfilter_get_video_buffer() recursive and add the w and h
|
||||
parameters to it.
|
||||
|
||||
2009-10-07 - r20189 - lavfi 0.5.1 - AVFilterPic
|
||||
Add w and h fields to AVFilterPic.
|
||||
|
||||
2009-06-22 - r19250 - lavf 52.34.1 - AVFormatContext.packet_size
|
||||
This is now an unsigned int instead of a signed int.
|
||||
|
||||
2009-06-19 - r19222 - lavc 52.32.0 - AVSubtitle.pts
|
||||
Add a pts field to AVSubtitle which gives the subtitle packet pts
|
||||
in AV_TIME_BASE. Some subtitle de-/encoders (e.g. XSUB) will
|
||||
not work right without this.
|
||||
|
||||
2009-06-03 - r19078 - lavc 52.30.2 - AV_PKT_FLAG_KEY
|
||||
PKT_FLAG_KEY has been deprecated and will be dropped at the next
|
||||
major version. Use AV_PKT_FLAG_KEY instead.
|
||||
|
||||
2009-06-01 - r19025 - lavc 52.30.0 - av_lockmgr_register()
|
||||
20090601 - r19025 - lavc 52.30.0 - av_lockmgr_register()
|
||||
av_lockmgr_register() can be used to register a callback function
|
||||
that lavc (and in the future, libraries that depend on lavc) can use
|
||||
to implement mutexes. The application should provide a callback function
|
||||
that implements the AV_LOCK_* operations described in avcodec.h.
|
||||
When the lock manager is registered, FFmpeg is guaranteed to behave
|
||||
correctly in a multi-threaded application.
|
||||
the implements the AV_LOCK_* operations described in avcodec.h.
|
||||
When the lock manager is registered FFmpeg is guaranteed to behave
|
||||
correct also in a multi-threaded application.
|
||||
|
||||
2009-04-30 - r18719 - lavc 52.28.0 - av_free_packet()
|
||||
av_free_packet() is no longer an inline function. It is now exported.
|
||||
|
||||
2009-04-11 - r18431 - lavc 52.25.0 - deprecate av_destruct_packet_nofree()
|
||||
Please use NULL instead. This has been supported since r16506
|
||||
(lavf > 52.23.1, lavc > 52.10.0).
|
||||
|
||||
2009-04-07 - r18351 - lavc 52.23.0 - avcodec_decode_video/audio/subtitle
|
||||
The old decoding functions are deprecated, all new code should use the
|
||||
new functions avcodec_decode_video2(), avcodec_decode_audio3() and
|
||||
avcodec_decode_subtitle2(). These new functions take an AVPacket *pkt
|
||||
argument instead of a const uint8_t *buf / int buf_size pair.
|
||||
|
||||
2009-04-03 - r18321 - lavu 50.3.0 - av_fifo_space()
|
||||
Introduce the av_fifo_space() function.
|
||||
|
||||
2009-04-02 - r18317 - lavc 52.23.0 - AVPacket
|
||||
Move AVPacket declaration from libavformat/avformat.h to
|
||||
libavcodec/avcodec.h.
|
||||
|
||||
2009-03-22 - r18163 - lavu 50.2.0 - RGB32 pixel formats
|
||||
Convert the pixel formats PIX_FMT_ARGB, PIX_FMT_RGBA, PIX_FMT_ABGR,
|
||||
PIX_FMT_BGRA, which were defined as macros, into enum PixelFormat values.
|
||||
Conversely PIX_FMT_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32 and
|
||||
PIX_FMT_BGR32_1 are now macros.
|
||||
avcodec_get_pix_fmt() now recognizes the "rgb32" and "bgr32" aliases.
|
||||
Re-sort the enum PixelFormat list accordingly.
|
||||
This change breaks API/ABI backward compatibility.
|
||||
|
||||
2009-03-22 - r18133 - lavu 50.1.0 - PIX_FMT_RGB5X5 endian variants
|
||||
Add the enum PixelFormat values:
|
||||
PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, PIX_FMT_RGB555BE, PIX_FMT_RGB555LE,
|
||||
PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, PIX_FMT_BGR555BE, PIX_FMT_BGR555LE.
|
||||
|
||||
2009-03-21 - r18116 - lavu 50.0.0 - av_random*
|
||||
The Mersenne Twister PRNG implemented through the av_random* functions
|
||||
was removed. Use the lagged Fibonacci PRNG through the av_lfg* functions
|
||||
instead.
|
||||
|
||||
2009-03-08 - r17869 - lavu 50.0.0 - AVFifoBuffer
|
||||
av_fifo_init, av_fifo_read, av_fifo_write and av_fifo_realloc were dropped
|
||||
and replaced by av_fifo_alloc, av_fifo_generic_read, av_fifo_generic_write
|
||||
and av_fifo_realloc2.
|
||||
In addition, the order of the function arguments of av_fifo_generic_read
|
||||
was changed to match av_fifo_generic_write.
|
||||
The AVFifoBuffer/struct AVFifoBuffer may only be used in an opaque way by
|
||||
applications, they may not use sizeof() or directly access members.
|
||||
|
||||
2009-03-01 - r17682 - lavf 52.31.0 - Generic metadata API
|
||||
Introduce a new metadata API (see av_metadata_get() and friends).
|
||||
The old API is now deprecated and should not be used anymore. This especially
|
||||
includes the following structure fields:
|
||||
20090301 - r17682 - lavf 52.31.0 - Generic metadata API
|
||||
This version introduce a new metadata API (see av_metadata_get() and friends).
|
||||
The old API is now deprecated and shouldn't be used anymore. This especially
|
||||
include the following structure fields:
|
||||
- AVFormatContext.title
|
||||
- AVFormatContext.author
|
||||
- AVFormatContext.copyright
|
||||
|
@@ -1,65 +0,0 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 0.8 "Love" June, 2011
|
||||
* 0.7 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
||||
|
||||
|
||||
General notes
|
||||
-------------
|
||||
|
||||
This release enables frame-based multithreaded decoding for a number of codecs,
|
||||
including theora, huffyuv, VP8, H.263, mpeg4 and H.264. Additionally, there has
|
||||
been a major cleanup of
|
||||
both internal and external APIs. For this reason, the major versions of all
|
||||
libraries except libpostproc have been bumped. This means that 0.8 can be installed
|
||||
side-by-side with previous releases, on the other hand applications need to be
|
||||
recompiled to use 0.8.
|
||||
|
||||
Other important changes are more than 200 bugfixes, known regressions were fixed
|
||||
w.r.t 0.5 and 0.6, additions of decoders including, but not limited to,
|
||||
AMR-WB, single stream LATM/LOAS, G.722 ADPCM, a native VP8 decoder
|
||||
and HE-AACv2. Additionally, many new de/muxers such as WebM in Matroska, Apple
|
||||
HTTP Live Streaming, SAP, IEC 61937 (S/PDIF) have been added.
|
||||
|
||||
See the Changelog file for a list of significant changes.
|
||||
|
||||
Bugreports against FFmpeg git master or the most recent FFmpeg release are
|
||||
accepted. If you are experiencing issues with any formally released version of
|
||||
FFmpeg, please try git master to check if the issue still exists. If it does,
|
||||
make your report against the development code following the usual bug reporting
|
||||
guidelines.
|
||||
|
||||
Note, if you have difficulty building for mingw, try --disable-outdev=sdl
|
||||
|
||||
|
||||
API changes
|
||||
-----------
|
||||
|
||||
Please see git log of the public headers or the file doc/APIchanges for
|
||||
programmer-centric information. Note that some long-time deprecated APIs have
|
||||
been removed. Also, a number of additional APIs have been deprecated and might
|
||||
be removed in the next release.
|
||||
|
||||
|
||||
Other notable changes
|
||||
---------------------
|
||||
|
||||
- high quality dithering in swscale to fix banding issues
|
||||
- ffmpeg is now interactive and various information can be turned on/off while its running
|
||||
- resolution changing support in ffmpeg
|
||||
- sdl output device
|
||||
- optimizations in libavfilter that make it much faster
|
||||
- split, buffer, select, lut, negate filters amongth others
|
||||
- more than 50 new video filters from mplayers libmpcodecs
|
||||
- many ARM NEON optimizations
|
||||
- nonfree libfaad support for AAC decoding removed
|
||||
- 4:4:4 H.264 decoding
|
||||
- 9/10bit H.264 decoding
|
||||
- Win64 Assembler support
|
||||
- native MMSH/MMST support
|
||||
- Windows TV demuxing
|
||||
- native AMR-WB decoding
|
||||
- native GSM-MS decoding
|
||||
- SMPTE 302M decoding
|
||||
- AVS encoding
|
10
doc/TODO
10
doc/TODO
@@ -29,6 +29,14 @@ Michael's TODO list: (unordered) (if anyone wanna help with sth, just ask)
|
||||
- more optimizations
|
||||
- simper rate control
|
||||
|
||||
Francois' TODO list: (unordered, without any timeframe)
|
||||
-------------------
|
||||
- test MACE decoder against the openquicktime one as suggested by A'rpi
|
||||
- BeOS audio input grabbing backend
|
||||
- BeOS video input grabbing backend
|
||||
- publish my BeOS libposix on BeBits so I can officially support ffserver :)
|
||||
- check the whole code for thread-safety (global and init stuff)
|
||||
|
||||
Philip'a TODO list: (alphabetically ordered) (please help)
|
||||
------------------
|
||||
- Add a multi-ffm filetype so that feeds can be recorded into multiple files rather
|
||||
@@ -69,7 +77,7 @@ unassigned TODO: (unordered)
|
||||
- JPEG2000 decoder & encoder
|
||||
- MPEG4 GMC encoding support
|
||||
- macroblock based pixel format (better cache locality, somewhat complex, one paper claimed it faster for high res)
|
||||
- regression tests for codecs which do not have an encoder (I+P-frame bitstream in the 'master' branch)
|
||||
- regression tests for codecs which do not have an encoder (I+P-frame bitstream in svn)
|
||||
- add support for using mplayers video filters to ffmpeg
|
||||
- H264 encoder
|
||||
- per MB ratecontrol (so VCD and such do work better)
|
||||
|
@@ -19,6 +19,7 @@ integer.c 128bit integer math
|
||||
lls.c
|
||||
mathematics.c greatest common divisor, integer sqrt, integer log2, ...
|
||||
mem.c memory allocation routines with guaranteed alignment
|
||||
softfloat.c
|
||||
|
||||
Headers:
|
||||
bswap.h big/little/native-endian conversion code
|
||||
|
@@ -1,77 +0,0 @@
|
||||
@chapter Bitstream Filters
|
||||
@c man begin BITSTREAM FILTERS
|
||||
|
||||
When you configure your FFmpeg build, all the supported bitstream
|
||||
filters are enabled by default. You can list all available ones using
|
||||
the configure option @code{--list-bsfs}.
|
||||
|
||||
You can disable all the bitstream filters using the configure option
|
||||
@code{--disable-bsfs}, and selectively enable any bitstream filter using
|
||||
the option @code{--enable-bsf=BSF}, or you can disable a particular
|
||||
bitstream filter using the option @code{--disable-bsf=BSF}.
|
||||
|
||||
The option @code{-bsfs} of the ff* tools will display the list of
|
||||
all the supported bitstream filters included in your build.
|
||||
|
||||
Below is a description of the currently available bitstream filters.
|
||||
|
||||
@section aac_adtstoasc
|
||||
|
||||
@section chomp
|
||||
|
||||
@section dump_extradata
|
||||
|
||||
@section h264_mp4toannexb
|
||||
|
||||
@section imx_dump_header
|
||||
|
||||
@section mjpeg2jpeg
|
||||
|
||||
Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
|
||||
|
||||
MJPEG is a video codec wherein each video frame is essentially a
|
||||
JPEG image. The individual frames can be extracted without loss,
|
||||
e.g. by
|
||||
|
||||
@example
|
||||
ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg
|
||||
@end example
|
||||
|
||||
Unfortunately, these chunks are incomplete JPEG images, because
|
||||
they lack the DHT segment required for decoding. Quoting from
|
||||
@url{http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml}:
|
||||
|
||||
Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
|
||||
commented that "MJPEG, or at least the MJPEG in AVIs having the
|
||||
MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* --
|
||||
Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
|
||||
and it must use basic Huffman encoding, not arithmetic or
|
||||
progressive. . . . You can indeed extract the MJPEG frames and
|
||||
decode them with a regular JPEG decoder, but you have to prepend
|
||||
the DHT segment to them, or else the decoder won't have any idea
|
||||
how to decompress the data. The exact table necessary is given in
|
||||
the OpenDML spec."
|
||||
|
||||
This bitstream filter patches the header of frames extracted from an MJPEG
|
||||
stream (carrying the AVI1 header ID and lacking a DHT segment) to
|
||||
produce fully qualified JPEG images.
|
||||
|
||||
@example
|
||||
ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg
|
||||
exiftran -i -9 frame*.jpg
|
||||
ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi
|
||||
@end example
|
||||
|
||||
@section mjpega_dump_header
|
||||
|
||||
@section movsub
|
||||
|
||||
@section mp3_header_compress
|
||||
|
||||
@section mp3_header_decompress
|
||||
|
||||
@section noise
|
||||
|
||||
@section remove_extradata
|
||||
|
||||
@c man end BITSTREAM FILTERS
|
@@ -1,50 +0,0 @@
|
||||
FFmpeg currently uses a custom build system, this text attempts to document
|
||||
some of its obscure features and options.
|
||||
|
||||
Makefile variables:
|
||||
|
||||
V
|
||||
Disable the default terse mode, the full command issued by make and its
|
||||
output will be shown on the screen.
|
||||
|
||||
DESTDIR
|
||||
Destination directory for the install targets, useful to prepare packages
|
||||
or install FFmpeg in cross-environments.
|
||||
|
||||
Makefile targets:
|
||||
|
||||
all
|
||||
Default target, builds all the libraries and the executables.
|
||||
|
||||
fate
|
||||
Run the fate test suite, note you must have installed it
|
||||
|
||||
fate-list
|
||||
Will list all fate/regression test targets
|
||||
|
||||
install
|
||||
Install headers, libraries and programs.
|
||||
|
||||
libavformat/output-example
|
||||
Build the libavformat basic example.
|
||||
|
||||
libavcodec/api-example
|
||||
Build the libavcodec basic example.
|
||||
|
||||
libswscale/swscale-test
|
||||
Build the swscale self-test (useful also as example).
|
||||
|
||||
|
||||
Useful standard make commands:
|
||||
make -t <target>
|
||||
Touch all files that otherwise would be build, this is useful to reduce
|
||||
unneeded rebuilding when changing headers, but note you must force rebuilds
|
||||
of files that actually need it by hand then.
|
||||
|
||||
make -j<num>
|
||||
rebuild with multiple jobs at the same time. Faster on multi processor systems
|
||||
|
||||
make -k
|
||||
continue build in case of errors, this is useful for the regression tests
|
||||
sometimes but note it will still not run all reg tests.
|
||||
|
@@ -1,50 +0,0 @@
|
||||
@chapter Decoders
|
||||
@c man begin DECODERS
|
||||
|
||||
Decoders are configured elements in FFmpeg which allow the decoding of
|
||||
multimedia streams.
|
||||
|
||||
When you configure your FFmpeg build, all the supported native decoders
|
||||
are enabled by default. Decoders requiring an external library must be enabled
|
||||
manually via the corresponding @code{--enable-lib} option. You can list all
|
||||
available decoders using the configure option @code{--list-decoders}.
|
||||
|
||||
You can disable all the decoders with the configure option
|
||||
@code{--disable-decoders} and selectively enable / disable single decoders
|
||||
with the options @code{--enable-decoder=@var{DECODER}} /
|
||||
@code{--disable-decoder=@var{DECODER}}.
|
||||
|
||||
The option @code{-codecs} of the ff* tools will display the list of
|
||||
enabled decoders.
|
||||
|
||||
@c man end DECODERS
|
||||
|
||||
@chapter Video Decoders
|
||||
@c man begin VIDEO DECODERS
|
||||
|
||||
A description of some of the currently available video decoders
|
||||
follows.
|
||||
|
||||
@section rawvideo
|
||||
|
||||
Rawvideo decoder.
|
||||
|
||||
This decoder decodes rawvideo streams.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item top @var{top_field_first}
|
||||
Specify the assumed field type of the input video.
|
||||
@table @option
|
||||
@item -1
|
||||
the video is assumed to be progressive (default)
|
||||
@item 0
|
||||
bottom-field-first is assumed
|
||||
@item 1
|
||||
top-field-first is assumed
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@c man end VIDEO DECODERS
|
@@ -1,78 +0,0 @@
|
||||
@chapter Demuxers
|
||||
@c man begin DEMUXERS
|
||||
|
||||
Demuxers are configured elements in FFmpeg which allow to read the
|
||||
multimedia streams from a particular type of file.
|
||||
|
||||
When you configure your FFmpeg build, all the supported demuxers
|
||||
are enabled by default. You can list all available ones using the
|
||||
configure option "--list-demuxers".
|
||||
|
||||
You can disable all the demuxers using the configure option
|
||||
"--disable-demuxers", and selectively enable a single demuxer with
|
||||
the option "--enable-demuxer=@var{DEMUXER}", or disable it
|
||||
with the option "--disable-demuxer=@var{DEMUXER}".
|
||||
|
||||
The option "-formats" of the ff* tools will display the list of
|
||||
enabled demuxers.
|
||||
|
||||
The description of some of the currently available demuxers follows.
|
||||
|
||||
@section image2
|
||||
|
||||
Image file demuxer.
|
||||
|
||||
This demuxer reads from a list of image files specified by a pattern.
|
||||
|
||||
The pattern may contain the string "%d" or "%0@var{N}d", which
|
||||
specifies the position of the characters representing a sequential
|
||||
number in each filename matched by the pattern. If the form
|
||||
"%d0@var{N}d" is used, the string representing the number in each
|
||||
filename is 0-padded and @var{N} is the total number of 0-padded
|
||||
digits representing the number. The literal character '%' can be
|
||||
specified in the pattern with the string "%%".
|
||||
|
||||
If the pattern contains "%d" or "%0@var{N}d", the first filename of
|
||||
the file list specified by the pattern must contain a number
|
||||
inclusively contained between 0 and 4, all the following numbers must
|
||||
be sequential. This limitation may be hopefully fixed.
|
||||
|
||||
The pattern may contain a suffix which is used to automatically
|
||||
determine the format of the images contained in the files.
|
||||
|
||||
For example the pattern "img-%03d.bmp" will match a sequence of
|
||||
filenames of the form @file{img-001.bmp}, @file{img-002.bmp}, ...,
|
||||
@file{img-010.bmp}, etc.; the pattern "i%%m%%g-%d.jpg" will match a
|
||||
sequence of filenames of the form @file{i%m%g-1.jpg},
|
||||
@file{i%m%g-2.jpg}, ..., @file{i%m%g-10.jpg}, etc.
|
||||
|
||||
The size, the pixel format, and the format of each image must be the
|
||||
same for all the files in the sequence.
|
||||
|
||||
The following example shows how to use @file{ffmpeg} for creating a
|
||||
video from the images in the file sequence @file{img-001.jpeg},
|
||||
@file{img-002.jpeg}, ..., assuming an input framerate of 10 frames per
|
||||
second:
|
||||
@example
|
||||
ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
|
||||
@end example
|
||||
|
||||
Note that the pattern must not necessarily contain "%d" or
|
||||
"%0@var{N}d", for example to convert a single image file
|
||||
@file{img.jpeg} you can employ the command:
|
||||
@example
|
||||
ffmpeg -f image2 -i img.jpeg img.png
|
||||
@end example
|
||||
|
||||
@section applehttp
|
||||
|
||||
Apple HTTP Live Streaming demuxer.
|
||||
|
||||
This demuxer presents all AVStreams from all variant streams.
|
||||
The id field is set to the bitrate variant index number. By setting
|
||||
the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay),
|
||||
the caller can decide which variant streams to actually receive.
|
||||
The total bitrate of the variant that the stream belongs to is
|
||||
available in a metadata key named "variant_bitrate".
|
||||
|
||||
@c man end INPUT DEVICES
|
@@ -1,446 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle Developer Documentation
|
||||
@titlepage
|
||||
@center @titlefont{Developer Documentation}
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Developers Guide
|
||||
|
||||
@section API
|
||||
@itemize @bullet
|
||||
@item libavcodec is the library containing the codecs (both encoding and
|
||||
decoding). Look at @file{libavcodec/apiexample.c} to see how to use it.
|
||||
|
||||
@item libavformat is the library containing the file format handling (mux and
|
||||
demux code for several formats). Look at @file{ffplay.c} to use it in a
|
||||
player. See @file{libavformat/output-example.c} to use it to generate
|
||||
audio or video streams.
|
||||
|
||||
@end itemize
|
||||
|
||||
@section Integrating libavcodec or libavformat in your program
|
||||
|
||||
You can integrate all the source code of the libraries to link them
|
||||
statically to avoid any version problem. All you need is to provide a
|
||||
'config.mak' and a 'config.h' in the parent directory. See the defines
|
||||
generated by ./configure to understand what is needed.
|
||||
|
||||
You can use libavcodec or libavformat in your commercial program, but
|
||||
@emph{any patch you make must be published}. The best way to proceed is
|
||||
to send your patches to the FFmpeg mailing list.
|
||||
|
||||
@anchor{Coding Rules}
|
||||
@section Coding Rules
|
||||
|
||||
FFmpeg is programmed in the ISO C90 language with a few additional
|
||||
features from ISO C99, namely:
|
||||
@itemize @bullet
|
||||
@item
|
||||
the @samp{inline} keyword;
|
||||
@item
|
||||
@samp{//} comments;
|
||||
@item
|
||||
designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
|
||||
@item
|
||||
compound literals (@samp{x = (struct s) @{ 17, 23 @};})
|
||||
@end itemize
|
||||
|
||||
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
|
||||
clarity and performance.
|
||||
|
||||
All code must compile with recent versions of GCC and a number of other
|
||||
currently supported compilers. To ensure compatibility, please do not use
|
||||
additional C99 features or GCC extensions. Especially watch out for:
|
||||
@itemize @bullet
|
||||
@item
|
||||
mixing statements and declarations;
|
||||
@item
|
||||
@samp{long long} (use @samp{int64_t} instead);
|
||||
@item
|
||||
@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
|
||||
@item
|
||||
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
||||
@end itemize
|
||||
|
||||
Indent size is 4.
|
||||
The presentation is one inspired by 'indent -i4 -kr -nut'.
|
||||
The TAB character is forbidden outside of Makefiles as is any
|
||||
form of trailing whitespace. Commits containing either will be
|
||||
rejected by the git repository.
|
||||
|
||||
The main priority in FFmpeg is simplicity and small code size in order to
|
||||
minimize the bug count.
|
||||
|
||||
Comments: Use the JavaDoc/Doxygen
|
||||
format (see examples below) so that code documentation
|
||||
can be generated automatically. All nontrivial functions should have a comment
|
||||
above them explaining what the function does, even if it is just one sentence.
|
||||
All structures and their member variables should be documented, too.
|
||||
@example
|
||||
/**
|
||||
* @@file mpeg.c
|
||||
* MPEG codec.
|
||||
* @@author ...
|
||||
*/
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
*/
|
||||
typedef struct Foobar@{
|
||||
int var1; /**< var1 description */
|
||||
int var2; ///< var2 description
|
||||
/** var3 description */
|
||||
int var3;
|
||||
@} Foobar;
|
||||
|
||||
/**
|
||||
* Summary sentence.
|
||||
* more text ...
|
||||
* ...
|
||||
* @@param my_parameter description of my_parameter
|
||||
* @@return return value description
|
||||
*/
|
||||
int myfunc(int my_parameter)
|
||||
...
|
||||
@end example
|
||||
|
||||
fprintf and printf are forbidden in libavformat and libavcodec,
|
||||
please use av_log() instead.
|
||||
|
||||
Casts should be used only when necessary. Unneeded parentheses
|
||||
should also be avoided if they don't make the code easier to understand.
|
||||
|
||||
@section Development Policy
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Contributions should be licensed under the LGPL 2.1, including an
|
||||
"or any later version" clause, or the MIT license. GPL 2 including
|
||||
an "or any later version" clause is also acceptable, but LGPL is
|
||||
preferred.
|
||||
@item
|
||||
You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
||||
enabled code which breaks compilation or compiles but does not work or
|
||||
breaks the regression tests)
|
||||
You can commit unfinished stuff (for testing etc), but it must be disabled
|
||||
(#ifdef etc) by default so it does not interfere with other developers'
|
||||
work.
|
||||
@item
|
||||
You do not have to over-test things. If it works for you, and you think it
|
||||
should work for others, then commit. If your code has problems
|
||||
(portability, triggers compiler bugs, unusual environment etc) they will be
|
||||
reported and eventually fixed.
|
||||
@item
|
||||
Do not commit unrelated changes together, split them into self-contained
|
||||
pieces. Also do not forget that if part B depends on part A, but A does not
|
||||
depend on B, then A can and should be committed first and separate from B.
|
||||
Keeping changes well split into self-contained parts makes reviewing and
|
||||
understanding them on the commit log mailing list easier. This also helps
|
||||
in case of debugging later on.
|
||||
Also if you have doubts about splitting or not splitting, do not hesitate to
|
||||
ask/discuss it on the developer mailing list.
|
||||
@item
|
||||
Do not change behavior of the programs (renaming options etc) or public
|
||||
API or ABI without first discussing it on the ffmpeg-devel mailing list.
|
||||
Do not remove functionality from the code. Just improve!
|
||||
|
||||
Note: Redundant code can be removed.
|
||||
@item
|
||||
Do not commit changes to the build system (Makefiles, configure script)
|
||||
which change behavior, defaults etc, without asking first. The same
|
||||
applies to compiler warning fixes, trivial looking fixes and to code
|
||||
maintained by other developers. We usually have a reason for doing things
|
||||
the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
||||
list, and if the code maintainers say OK, you may commit. This does not
|
||||
apply to files you wrote and/or maintain.
|
||||
@item
|
||||
We refuse source indentation and other cosmetic changes if they are mixed
|
||||
with functional changes, such commits will be rejected and removed. Every
|
||||
developer has his own indentation style, you should not change it. Of course
|
||||
if you (re)write something, you can use your own style, even though we would
|
||||
prefer if the indentation throughout FFmpeg was consistent (Many projects
|
||||
force a given indentation style - we do not.). If you really need to make
|
||||
indentation changes (try to avoid this), separate them strictly from real
|
||||
changes.
|
||||
|
||||
NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
|
||||
then either do NOT change the indentation of the inner part within (do not
|
||||
move it to the right)! or do so in a separate commit
|
||||
@item
|
||||
Always fill out the commit log message. Describe in a few lines what you
|
||||
changed and why. You can refer to mailing list postings if you fix a
|
||||
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
||||
Recommanded format:
|
||||
area changed: Short 1 line description
|
||||
|
||||
details describing what and why and giving references.
|
||||
@item
|
||||
Make sure the author of the commit is set correctly. (see git commit --author)
|
||||
If you apply a patch, send an
|
||||
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
||||
you applied the patch.
|
||||
@item
|
||||
When applying patches that have been discussed (at length) on the mailing
|
||||
list, reference the thread in the log message.
|
||||
@item
|
||||
Do NOT commit to code actively maintained by others without permission.
|
||||
Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
|
||||
timeframe (12h for build failures and security fixes, 3 days small changes,
|
||||
1 week for big patches) then commit your patch if you think it is OK.
|
||||
Also note, the maintainer can simply ask for more time to review!
|
||||
@item
|
||||
Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
||||
are sent there and reviewed by all the other developers. Bugs and possible
|
||||
improvements or general questions regarding commits are discussed there. We
|
||||
expect you to react if problems with your code are uncovered.
|
||||
@item
|
||||
Update the documentation if you change behavior or add features. If you are
|
||||
unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
||||
maintainer(s) will review and commit your stuff.
|
||||
@item
|
||||
Try to keep important discussions and requests (also) on the public
|
||||
developer mailing list, so that all developers can benefit from them.
|
||||
@item
|
||||
Never write to unallocated memory, never write over the end of arrays,
|
||||
always check values read from some untrusted source before using them
|
||||
as array index or other risky things.
|
||||
@item
|
||||
Remember to check if you need to bump versions for the specific libav
|
||||
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
||||
to change the version integer.
|
||||
Incrementing the first component means no backward compatibility to
|
||||
previous versions (e.g. removal of a function from the public API).
|
||||
Incrementing the second component means backward compatible change
|
||||
(e.g. addition of a function to the public API or extension of an
|
||||
existing data structure).
|
||||
Incrementing the third component means a noteworthy binary compatible
|
||||
change (e.g. encoder bug fix that matters for the decoder).
|
||||
@item
|
||||
Compiler warnings indicate potential bugs or code with bad style. If a type of
|
||||
warning always points to correct and clean code, that warning should
|
||||
be disabled, not the code changed.
|
||||
Thus the remaining warnings can either be bugs or correct code.
|
||||
If it is a bug, the bug has to be fixed. If it is not, the code should
|
||||
be changed to not generate a warning unless that causes a slowdown
|
||||
or obfuscates the code.
|
||||
@item
|
||||
If you add a new file, give it a proper license header. Do not copy and
|
||||
paste it from a random place, use an existing file as template.
|
||||
@end enumerate
|
||||
|
||||
We think our rules are not too hard. If you have comments, contact us.
|
||||
|
||||
Note, these rules are mostly borrowed from the MPlayer project.
|
||||
|
||||
@section Submitting patches
|
||||
|
||||
First, read the (@pxref{Coding Rules}) above if you did not yet.
|
||||
|
||||
When you submit your patch, please use @code{git format-patch} or
|
||||
@code{git send-email}. We cannot read other diffs :-)
|
||||
|
||||
Also please do not submit a patch which contains several unrelated changes.
|
||||
Split it into separate, self-contained pieces. This does not mean splitting
|
||||
file by file. Instead, make the patch as small as possible while still
|
||||
keeping it as a logical unit that contains an individual change, even
|
||||
if it spans multiple files. This makes reviewing your patches much easier
|
||||
for us and greatly increases your chances of getting your patch applied.
|
||||
|
||||
Use the patcheck tool of FFmpeg to check your patch.
|
||||
The tool is located in the tools directory.
|
||||
|
||||
Run the regression tests before submitting a patch so that you can
|
||||
verify that there are no big problems.
|
||||
|
||||
Patches should be posted as base64 encoded attachments (or any other
|
||||
encoding which ensures that the patch will not be trashed during
|
||||
transmission) to the ffmpeg-devel mailing list, see
|
||||
@url{http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel}
|
||||
|
||||
It also helps quite a bit if you tell us what the patch does (for example
|
||||
'replaces lrint by lrintf'), and why (for example '*BSD isn't C99 compliant
|
||||
and has no lrint()')
|
||||
|
||||
Also please if you send several patches, send each patch as a separate mail,
|
||||
do not attach several unrelated patches to the same mail.
|
||||
|
||||
Your patch will be reviewed on the mailing list. You will likely be asked
|
||||
to make some changes and are expected to send in an improved version that
|
||||
incorporates the requests from the review. This process may go through
|
||||
several iterations. Once your patch is deemed good enough, some developer
|
||||
will pick it up and commit it to the official FFmpeg tree.
|
||||
|
||||
Give us a few days to react. But if some time passes without reaction,
|
||||
send a reminder by email. Your patch should eventually be dealt with.
|
||||
|
||||
|
||||
@section New codecs or formats checklist
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Did you use av_cold for codec initialization and close functions?
|
||||
@item
|
||||
Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
|
||||
AVInputFormat/AVOutputFormat struct?
|
||||
@item
|
||||
Did you bump the minor version number (and reset the micro version
|
||||
number) in @file{avcodec.h} or @file{avformat.h}?
|
||||
@item
|
||||
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
||||
@item
|
||||
Did you add the CodecID to @file{avcodec.h}?
|
||||
@item
|
||||
If it has a fourcc, did you add it to @file{libavformat/riff.c},
|
||||
even if it is only a decoder?
|
||||
@item
|
||||
Did you add a rule to compile the appropriate files in the Makefile?
|
||||
Remember to do this even if you're just adding a format to a file that is
|
||||
already being compiled by some other rule, like a raw demuxer.
|
||||
@item
|
||||
Did you add an entry to the table of supported formats or codecs in
|
||||
@file{doc/general.texi}?
|
||||
@item
|
||||
Did you add an entry in the Changelog?
|
||||
@item
|
||||
If it depends on a parser or a library, did you add that dependency in
|
||||
configure?
|
||||
@item
|
||||
Did you @code{git add} the appropriate files before committing?
|
||||
@item
|
||||
Did you make sure it compiles standalone, i.e. with
|
||||
@code{configure --disable-everything --enable-decoder=foo}
|
||||
(or @code{--enable-demuxer} or whatever your component is)?
|
||||
@end enumerate
|
||||
|
||||
|
||||
@section patch submission checklist
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Does 'make fate' pass with the patch applied?
|
||||
@item
|
||||
Was the patch generated with git format-patch or send-email?
|
||||
@item
|
||||
Did you sign off your patch? (git commit -s)
|
||||
See @url{http://kerneltrap.org/files/Jeremy/DCO.txt} for the meaning
|
||||
of sign off.
|
||||
@item
|
||||
Did you provide a clear git commit log message?
|
||||
@item
|
||||
Is the patch against latest FFmpeg git master branch?
|
||||
@item
|
||||
Are you subscribed to ffmpeg-dev?
|
||||
(the list is subscribers only due to spam)
|
||||
@item
|
||||
Have you checked that the changes are minimal, so that the same cannot be
|
||||
achieved with a smaller patch and/or simpler final code?
|
||||
@item
|
||||
If the change is to speed critical code, did you benchmark it?
|
||||
@item
|
||||
If you did any benchmarks, did you provide them in the mail?
|
||||
@item
|
||||
Have you checked that the patch does not introduce buffer overflows or
|
||||
other security issues?
|
||||
@item
|
||||
Did you test your decoder or demuxer against damaged data? If no, see
|
||||
tools/trasher and the noise bitstream filter. Your decoder or demuxer
|
||||
should not crash or end in a (near) infinite loop when fed damaged data.
|
||||
@item
|
||||
Does the patch not mix functional and cosmetic changes?
|
||||
@item
|
||||
Did you add tabs or trailing whitespace to the code? Both are forbidden.
|
||||
@item
|
||||
Is the patch attached to the email you send?
|
||||
@item
|
||||
Is the mime type of the patch correct? It should be text/x-diff or
|
||||
text/x-patch or at least text/plain and not application/octet-stream.
|
||||
@item
|
||||
If the patch fixes a bug, did you provide a verbose analysis of the bug?
|
||||
@item
|
||||
If the patch fixes a bug, did you provide enough information, including
|
||||
a sample, so the bug can be reproduced and the fix can be verified?
|
||||
Note please do not attach samples >100k to mails but rather provide a
|
||||
URL, you can upload to ftp://upload.ffmpeg.org
|
||||
@item
|
||||
Did you provide a verbose summary about what the patch does change?
|
||||
@item
|
||||
Did you provide a verbose explanation why it changes things like it does?
|
||||
@item
|
||||
Did you provide a verbose summary of the user visible advantages and
|
||||
disadvantages if the patch is applied?
|
||||
@item
|
||||
Did you provide an example so we can verify the new feature added by the
|
||||
patch easily?
|
||||
@item
|
||||
If you added a new file, did you insert a license header? It should be
|
||||
taken from FFmpeg, not randomly copied and pasted from somewhere else.
|
||||
@item
|
||||
You should maintain alphabetical order in alphabetically ordered lists as
|
||||
long as doing so does not break API/ABI compatibility.
|
||||
@item
|
||||
Lines with similar content should be aligned vertically when doing so
|
||||
improves readability.
|
||||
@item
|
||||
Consider to add a regression test for your code.
|
||||
@item
|
||||
If you added YASM code please check that things still work with --disable-yasm
|
||||
@end enumerate
|
||||
|
||||
@section Patch review process
|
||||
|
||||
All patches posted to ffmpeg-devel will be reviewed, unless they contain a
|
||||
clear note that the patch is not for the git master branch.
|
||||
Reviews and comments will be posted as replies to the patch on the
|
||||
mailing list. The patch submitter then has to take care of every comment,
|
||||
that can be by resubmitting a changed patch or by discussion. Resubmitted
|
||||
patches will themselves be reviewed like any other patch. If at some point
|
||||
a patch passes review with no comments then it is approved, that can for
|
||||
simple and small patches happen immediately while large patches will generally
|
||||
have to be changed and reviewed many times before they are approved.
|
||||
After a patch is approved it will be committed to the repository.
|
||||
|
||||
We will review all submitted patches, but sometimes we are quite busy so
|
||||
especially for large patches this can take several weeks.
|
||||
|
||||
When resubmitting patches, please do not make any significant changes
|
||||
not related to the comments received during review. Such patches will
|
||||
be rejected. Instead, submit significant changes or new features as
|
||||
separate patches.
|
||||
|
||||
@section Regression tests
|
||||
|
||||
Before submitting a patch (or committing to the repository), you should at least
|
||||
test that you did not break anything.
|
||||
|
||||
The regression tests build a synthetic video stream and a synthetic
|
||||
audio stream. These are then encoded and decoded with all codecs or
|
||||
formats. The CRC (or MD5) of each generated file is recorded in a
|
||||
result file. A 'diff' is launched to compare the reference results and
|
||||
the result file. The output is checked immediately after each test
|
||||
has run.
|
||||
|
||||
The regression tests then go on to test the FFserver code with a
|
||||
limited set of streams. It is important that this step runs correctly
|
||||
as well.
|
||||
|
||||
Run 'make test' to test all the codecs and formats. Commands like
|
||||
'make regtest-mpeg2' can be used to run a single test. By default,
|
||||
make will abort if any test fails. To run all tests regardless,
|
||||
use make -k. To get a more verbose output, use 'make V=1 test' or
|
||||
'make V=2 test'.
|
||||
|
||||
Run 'make fulltest' to test all the codecs, formats and FFserver.
|
||||
|
||||
[Of course, some patches may change the results of the regression tests. In
|
||||
this case, the reference results of the regression tests shall be modified
|
||||
accordingly].
|
||||
|
||||
@bye
|
@@ -1,591 +0,0 @@
|
||||
@chapter Encoders
|
||||
@c man begin ENCODERS
|
||||
|
||||
Encoders are configured elements in FFmpeg which allow the encoding of
|
||||
multimedia streams.
|
||||
|
||||
When you configure your FFmpeg build, all the supported native encoders
|
||||
are enabled by default. Encoders requiring an external library must be enabled
|
||||
manually via the corresponding @code{--enable-lib} option. You can list all
|
||||
available encoders using the configure option @code{--list-encoders}.
|
||||
|
||||
You can disable all the encoders with the configure option
|
||||
@code{--disable-encoders} and selectively enable / disable single encoders
|
||||
with the options @code{--enable-encoder=@var{ENCODER}} /
|
||||
@code{--disable-encoder=@var{ENCODER}}.
|
||||
|
||||
The option @code{-codecs} of the ff* tools will display the list of
|
||||
enabled encoders.
|
||||
|
||||
@c man end ENCODERS
|
||||
|
||||
@chapter Audio Encoders
|
||||
@c man begin AUDIO ENCODERS
|
||||
|
||||
A description of some of the currently available audio encoders
|
||||
follows.
|
||||
|
||||
@section ac3 and ac3_fixed
|
||||
|
||||
AC-3 audio encoders.
|
||||
|
||||
These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
|
||||
the undocumented RealAudio 3 (a.k.a. dnet).
|
||||
|
||||
The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
|
||||
encoder only uses fixed-point integer math. This does not mean that one is
|
||||
always faster, just that one or the other may be better suited to a
|
||||
particular system. The floating-point encoder will generally produce better
|
||||
quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
|
||||
default codec for any of the output formats, so it must be specified explicitly
|
||||
using the option @code{-acodec ac3_fixed} in order to use it.
|
||||
|
||||
@subsection AC-3 Metadata
|
||||
|
||||
The AC-3 metadata options are used to set parameters that describe the audio,
|
||||
but in most cases do not affect the audio encoding itself. Some of the options
|
||||
do directly affect or influence the decoding and playback of the resulting
|
||||
bitstream, while others are just for informational purposes. A few of the
|
||||
options will add bits to the output stream that could otherwise be used for
|
||||
audio data, and will thus affect the quality of the output. Those will be
|
||||
indicated accordingly with a note in the option list below.
|
||||
|
||||
These parameters are described in detail in several publicly-available
|
||||
documents.
|
||||
@itemize
|
||||
@item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
|
||||
@item @uref{http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf,A/54 - Guide to the Use of the ATSC Digital Television Standard}
|
||||
@item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
|
||||
@item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
|
||||
@end itemize
|
||||
|
||||
@subsubsection Metadata Control Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item -per_frame_metadata @var{boolean}
|
||||
Allow Per-Frame Metadata. Specifies if the encoder should check for changing
|
||||
metadata for each frame.
|
||||
@table @option
|
||||
@item 0
|
||||
The metadata values set at initialization will be used for every frame in the
|
||||
stream. (default)
|
||||
@item 1
|
||||
Metadata values can be changed before encoding each frame.
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsubsection Downmix Levels
|
||||
|
||||
@table @option
|
||||
|
||||
@item -center_mixlev @var{level}
|
||||
Center Mix Level. The amount of gain the decoder should apply to the center
|
||||
channel when downmixing to stereo. This field will only be written to the
|
||||
bitstream if a center channel is present. The value is specified as a scale
|
||||
factor. There are 3 valid values:
|
||||
@table @option
|
||||
@item 0.707
|
||||
Apply -3dB gain
|
||||
@item 0.595
|
||||
Apply -4.5dB gain (default)
|
||||
@item 0.500
|
||||
Apply -6dB gain
|
||||
@end table
|
||||
|
||||
@item -surround_mixlev @var{level}
|
||||
Surround Mix Level. The amount of gain the decoder should apply to the surround
|
||||
channel(s) when downmixing to stereo. This field will only be written to the
|
||||
bitstream if one or more surround channels are present. The value is specified
|
||||
as a scale factor. There are 3 valid values:
|
||||
@table @option
|
||||
@item 0.707
|
||||
Apply -3dB gain
|
||||
@item 0.500
|
||||
Apply -6dB gain (default)
|
||||
@item 0.000
|
||||
Silence Surround Channel(s)
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsubsection Audio Production Information
|
||||
Audio Production Information is optional information describing the mixing
|
||||
environment. Either none or both of the fields are written to the bitstream.
|
||||
|
||||
@table @option
|
||||
|
||||
@item -mixing_level @var{number}
|
||||
Mixing Level. Specifies peak sound pressure level (SPL) in the production
|
||||
environment when the mix was mastered. Valid values are 80 to 111, or -1 for
|
||||
unknown or not indicated. The default value is -1, but that value cannot be
|
||||
used if the Audio Production Information is written to the bitstream. Therefore,
|
||||
if the @code{room_type} option is not the default value, the @code{mixing_level}
|
||||
option must not be -1.
|
||||
|
||||
@item -room_type @var{type}
|
||||
Room Type. Describes the equalization used during the final mixing session at
|
||||
the studio or on the dubbing stage. A large room is a dubbing stage with the
|
||||
industry standard X-curve equalization; a small room has flat equalization.
|
||||
This field will not be written to the bitstream if both the @code{mixing_level}
|
||||
option and the @code{room_type} option have the default values.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx notindicated
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx large
|
||||
Large Room
|
||||
@item 2
|
||||
@itemx small
|
||||
Small Room
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsubsection Other Metadata Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item -copyright @var{boolean}
|
||||
Copyright Indicator. Specifies whether a copyright exists for this audio.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx off
|
||||
No Copyright Exists (default)
|
||||
@item 1
|
||||
@itemx on
|
||||
Copyright Exists
|
||||
@end table
|
||||
|
||||
@item -dialnorm @var{value}
|
||||
Dialogue Normalization. Indicates how far the average dialogue level of the
|
||||
program is below digital 100% full scale (0 dBFS). This parameter determines a
|
||||
level shift during audio reproduction that sets the average volume of the
|
||||
dialogue to a preset level. The goal is to match volume level between program
|
||||
sources. A value of -31dB will result in no volume level change, relative to
|
||||
the source volume, during audio reproduction. Valid values are whole numbers in
|
||||
the range -31 to -1, with -31 being the default.
|
||||
|
||||
@item -dsur_mode @var{mode}
|
||||
Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
|
||||
(Pro Logic). This field will only be written to the bitstream if the audio
|
||||
stream is stereo. Using this option does @b{NOT} mean the encoder will actually
|
||||
apply Dolby Surround processing.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx notindicated
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx off
|
||||
Not Dolby Surround Encoded
|
||||
@item 2
|
||||
@itemx on
|
||||
Dolby Surround Encoded
|
||||
@end table
|
||||
|
||||
@item -original @var{boolean}
|
||||
Original Bit Stream Indicator. Specifies whether this audio is from the
|
||||
original source and not a copy.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx off
|
||||
Not Original Source
|
||||
@item 1
|
||||
@itemx on
|
||||
Original Source (default)
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Extended Bitstream Information
|
||||
The extended bitstream options are part of the Alternate Bit Stream Syntax as
|
||||
specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
|
||||
If any one parameter in a group is specified, all values in that group will be
|
||||
written to the bitstream. Default values are used for those that are written
|
||||
but have not been specified. If the mixing levels are written, the decoder
|
||||
will use these values instead of the ones specified in the @code{center_mixlev}
|
||||
and @code{surround_mixlev} options if it supports the Alternate Bit Stream
|
||||
Syntax.
|
||||
|
||||
@subsubsection Extended Bitstream Information - Part 1
|
||||
|
||||
@table @option
|
||||
|
||||
@item -dmix_mode @var{mode}
|
||||
Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
|
||||
(Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx notindicated
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx ltrt
|
||||
Lt/Rt Downmix Preferred
|
||||
@item 2
|
||||
@itemx loro
|
||||
Lo/Ro Downmix Preferred
|
||||
@end table
|
||||
|
||||
@item -ltrt_cmixlev @var{level}
|
||||
Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
|
||||
center channel when downmixing to stereo in Lt/Rt mode.
|
||||
@table @option
|
||||
@item 1.414
|
||||
Apply +3dB gain
|
||||
@item 1.189
|
||||
Apply +1.5dB gain
|
||||
@item 1.000
|
||||
Apply 0dB gain
|
||||
@item 0.841
|
||||
Apply -1.5dB gain
|
||||
@item 0.707
|
||||
Apply -3.0dB gain
|
||||
@item 0.595
|
||||
Apply -4.5dB gain (default)
|
||||
@item 0.500
|
||||
Apply -6.0dB gain
|
||||
@item 0.000
|
||||
Silence Center Channel
|
||||
@end table
|
||||
|
||||
@item -ltrt_surmixlev @var{level}
|
||||
Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
|
||||
surround channel(s) when downmixing to stereo in Lt/Rt mode.
|
||||
@table @option
|
||||
@item 0.841
|
||||
Apply -1.5dB gain
|
||||
@item 0.707
|
||||
Apply -3.0dB gain
|
||||
@item 0.595
|
||||
Apply -4.5dB gain
|
||||
@item 0.500
|
||||
Apply -6.0dB gain (default)
|
||||
@item 0.000
|
||||
Silence Surround Channel(s)
|
||||
@end table
|
||||
|
||||
@item -loro_cmixlev @var{level}
|
||||
Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
|
||||
center channel when downmixing to stereo in Lo/Ro mode.
|
||||
@table @option
|
||||
@item 1.414
|
||||
Apply +3dB gain
|
||||
@item 1.189
|
||||
Apply +1.5dB gain
|
||||
@item 1.000
|
||||
Apply 0dB gain
|
||||
@item 0.841
|
||||
Apply -1.5dB gain
|
||||
@item 0.707
|
||||
Apply -3.0dB gain
|
||||
@item 0.595
|
||||
Apply -4.5dB gain (default)
|
||||
@item 0.500
|
||||
Apply -6.0dB gain
|
||||
@item 0.000
|
||||
Silence Center Channel
|
||||
@end table
|
||||
|
||||
@item -loro_surmixlev @var{level}
|
||||
Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
|
||||
surround channel(s) when downmixing to stereo in Lo/Ro mode.
|
||||
@table @option
|
||||
@item 0.841
|
||||
Apply -1.5dB gain
|
||||
@item 0.707
|
||||
Apply -3.0dB gain
|
||||
@item 0.595
|
||||
Apply -4.5dB gain
|
||||
@item 0.500
|
||||
Apply -6.0dB gain (default)
|
||||
@item 0.000
|
||||
Silence Surround Channel(s)
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsubsection Extended Bitstream Information - Part 2
|
||||
|
||||
@table @option
|
||||
|
||||
@item -dsurex_mode @var{mode}
|
||||
Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
|
||||
(7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
|
||||
apply Dolby Surround EX processing.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx notindicated
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx on
|
||||
Dolby Surround EX On
|
||||
@item 2
|
||||
@itemx off
|
||||
Dolby Surround EX Off
|
||||
@end table
|
||||
|
||||
@item -dheadphone_mode @var{mode}
|
||||
Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
|
||||
encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
|
||||
option does @b{NOT} mean the encoder will actually apply Dolby Headphone
|
||||
processing.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx notindicated
|
||||
Not Indicated (default)
|
||||
@item 1
|
||||
@itemx on
|
||||
Dolby Headphone On
|
||||
@item 2
|
||||
@itemx off
|
||||
Dolby Headphone Off
|
||||
@end table
|
||||
|
||||
@item -ad_conv_type @var{type}
|
||||
A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
|
||||
conversion.
|
||||
@table @option
|
||||
@item 0
|
||||
@itemx standard
|
||||
Standard A/D Converter (default)
|
||||
@item 1
|
||||
@itemx hdcd
|
||||
HDCD A/D Converter
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Other AC-3 Encoding Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item -stereo_rematrixing @var{boolean}
|
||||
Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
|
||||
is an optional AC-3 feature that increases quality by selectively encoding
|
||||
the left/right channels as mid/side. This option is enabled by default, and it
|
||||
is highly recommended that it be left as enabled except for testing purposes.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Floating-Point-Only AC-3 Encoding Options
|
||||
|
||||
These options are only valid for the floating-point encoder and do not exist
|
||||
for the fixed-point encoder due to the corresponding features not being
|
||||
implemented in fixed-point.
|
||||
|
||||
@table @option
|
||||
|
||||
@item -channel_coupling @var{boolean}
|
||||
Enables/Disables use of channel coupling, which is an optional AC-3 feature
|
||||
that increases quality by combining high frequency information from multiple
|
||||
channels into a single channel. The per-channel high frequency information is
|
||||
sent with less accuracy in both the frequency and time domains. This allows
|
||||
more bits to be used for lower frequencies while preserving enough information
|
||||
to reconstruct the high frequencies. This option is enabled by default for the
|
||||
floating-point encoder and should generally be left as enabled except for
|
||||
testing purposes or to increase encoding speed.
|
||||
@table @option
|
||||
@item -1
|
||||
@itemx auto
|
||||
Selected by Encoder (default)
|
||||
@item 0
|
||||
@itemx off
|
||||
Disable Channel Coupling
|
||||
@item 1
|
||||
@itemx on
|
||||
Enable Channel Coupling
|
||||
@end table
|
||||
|
||||
@item -cpl_start_band @var{number}
|
||||
Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
|
||||
value higher than the bandwidth is used, it will be reduced to 1 less than the
|
||||
coupling end band. If @var{auto} is used, the start band will be determined by
|
||||
the encoder based on the bit rate, sample rate, and channel layout. This option
|
||||
has no effect if channel coupling is disabled.
|
||||
@table @option
|
||||
@item -1
|
||||
@itemx auto
|
||||
Selected by Encoder (default)
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@c man end AUDIO ENCODERS
|
||||
|
||||
@chapter Video Encoders
|
||||
@c man begin VIDEO ENCODERS
|
||||
|
||||
A description of some of the currently available video encoders
|
||||
follows.
|
||||
|
||||
@section libvpx
|
||||
|
||||
VP8 format supported through libvpx.
|
||||
|
||||
Requires the presence of the libvpx headers and library during configuration.
|
||||
You need to explicitly configure the build with @code{--enable-libvpx}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
|
||||
|
||||
@table @option
|
||||
|
||||
@item threads
|
||||
g_threads
|
||||
|
||||
@item profile
|
||||
g_profile
|
||||
|
||||
@item vb
|
||||
rc_target_bitrate
|
||||
|
||||
@item g
|
||||
kf_max_dist
|
||||
|
||||
@item keyint_min
|
||||
kf_min_dist
|
||||
|
||||
@item qmin
|
||||
rc_min_quantizer
|
||||
|
||||
@item qmax
|
||||
rc_max_quantizer
|
||||
|
||||
@item bufsize, vb
|
||||
rc_buf_sz
|
||||
@code{(bufsize * 1000 / vb)}
|
||||
|
||||
rc_buf_optimal_sz
|
||||
@code{(bufsize * 1000 / vb * 5 / 6)}
|
||||
|
||||
@item rc_init_occupancy, vb
|
||||
rc_buf_initial_sz
|
||||
@code{(rc_init_occupancy * 1000 / vb)}
|
||||
|
||||
@item rc_buffer_aggressivity
|
||||
rc_undershoot_pct
|
||||
|
||||
@item skip_threshold
|
||||
rc_dropframe_thresh
|
||||
|
||||
@item qcomp
|
||||
rc_2pass_vbr_bias_pct
|
||||
|
||||
@item maxrate, vb
|
||||
rc_2pass_vbr_maxsection_pct
|
||||
@code{(maxrate * 100 / vb)}
|
||||
|
||||
@item minrate, vb
|
||||
rc_2pass_vbr_minsection_pct
|
||||
@code{(minrate * 100 / vb)}
|
||||
|
||||
@item minrate, maxrate, vb
|
||||
@code{VPX_CBR}
|
||||
@code{(minrate == maxrate == vb)}
|
||||
|
||||
@item crf
|
||||
@code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
|
||||
|
||||
@item quality
|
||||
@table @option
|
||||
@item @var{best}
|
||||
@code{VPX_DL_BEST_QUALITY}
|
||||
@item @var{good}
|
||||
@code{VPX_DL_GOOD_QUALITY}
|
||||
@item @var{realtime}
|
||||
@code{VPX_DL_REALTIME}
|
||||
@end table
|
||||
|
||||
@item speed
|
||||
@code{VP8E_SET_CPUUSED}
|
||||
|
||||
@item nr
|
||||
@code{VP8E_SET_NOISE_SENSITIVITY}
|
||||
|
||||
@item mb_threshold
|
||||
@code{VP8E_SET_STATIC_THRESHOLD}
|
||||
|
||||
@item slices
|
||||
@code{VP8E_SET_TOKEN_PARTITIONS}
|
||||
|
||||
@item Alternate reference frame related
|
||||
@table @option
|
||||
@item vp8flags altref
|
||||
@code{VP8E_SET_ENABLEAUTOALTREF}
|
||||
@item @var{arnr_max_frames}
|
||||
@code{VP8E_SET_ARNR_MAXFRAMES}
|
||||
@item @var{arnr_type}
|
||||
@code{VP8E_SET_ARNR_TYPE}
|
||||
@item @var{arnr_strength}
|
||||
@code{VP8E_SET_ARNR_STRENGTH}
|
||||
@item @var{rc_lookahead}
|
||||
g_lag_in_frames
|
||||
@end table
|
||||
|
||||
@item vp8flags error_resilient
|
||||
g_error_resilient
|
||||
|
||||
@end table
|
||||
|
||||
For more information about libvpx see:
|
||||
@url{http://www.webmproject.org/}
|
||||
|
||||
@section libx264
|
||||
|
||||
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 format supported through
|
||||
libx264.
|
||||
|
||||
Requires the presence of the libx264 headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libx264}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item preset @var{preset_name}
|
||||
Set the encoding preset.
|
||||
|
||||
@item tune @var{tune_name}
|
||||
Tune the encoding params.
|
||||
Deprecated in favor of @var{x264_opts}
|
||||
|
||||
@item fastfirstpass @var{bool}
|
||||
Use fast settings when encoding first pass, default value is 1.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item profile @var{profile_name}
|
||||
Set profile restrictions.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item level @var{level}
|
||||
Specify level (as defined by Annex A).
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item passlogfile @var{filename}
|
||||
Specify filename for 2 pass stats.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item wpredp @var{wpred_type}
|
||||
Specify Weighted prediction for P-frames.
|
||||
Deprecated in favor of @var{x264_opts}.
|
||||
|
||||
@item x264opts @var{options}
|
||||
Allow to set any x264 option, see x264 manual for a list.
|
||||
|
||||
@var{options} is a list of @var{key}=@var{value} couples separated by
|
||||
":".
|
||||
@end table
|
||||
|
||||
For example to specify libx264 encoding options with @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
|
||||
@end example
|
||||
|
||||
For more information about libx264 and the supported options see:
|
||||
@url{http://www.videolan.org/developers/x264.html}
|
||||
|
||||
@c man end VIDEO ENCODERS
|
158
doc/eval.texi
158
doc/eval.texi
@@ -1,158 +0,0 @@
|
||||
@chapter Expression Evaluation
|
||||
@c man begin EXPRESSION EVALUATION
|
||||
|
||||
When evaluating an arithemetic expression, FFmpeg uses an internal
|
||||
formula evaluator, implemented through the @file{libavutil/eval.h}
|
||||
interface.
|
||||
|
||||
An expression may contain unary, binary operators, constants, and
|
||||
functions.
|
||||
|
||||
Two expressions @var{expr1} and @var{expr2} can be combined to form
|
||||
another expression "@var{expr1};@var{expr2}".
|
||||
@var{expr1} and @var{expr2} are evaluated in turn, and the new
|
||||
expression evaluates to the value of @var{expr2}.
|
||||
|
||||
The following binary operators are available: @code{+}, @code{-},
|
||||
@code{*}, @code{/}, @code{^}.
|
||||
|
||||
The following unary operators are available: @code{+}, @code{-}.
|
||||
|
||||
The following functions are available:
|
||||
@table @option
|
||||
@item sinh(x)
|
||||
@item cosh(x)
|
||||
@item tanh(x)
|
||||
@item sin(x)
|
||||
@item cos(x)
|
||||
@item tan(x)
|
||||
@item atan(x)
|
||||
@item asin(x)
|
||||
@item acos(x)
|
||||
@item exp(x)
|
||||
@item log(x)
|
||||
@item abs(x)
|
||||
@item squish(x)
|
||||
@item gauss(x)
|
||||
@item isnan(x)
|
||||
Return 1.0 if @var{x} is NAN, 0.0 otherwise.
|
||||
|
||||
@item mod(x, y)
|
||||
@item max(x, y)
|
||||
@item min(x, y)
|
||||
@item eq(x, y)
|
||||
@item gte(x, y)
|
||||
@item gt(x, y)
|
||||
@item lte(x, y)
|
||||
@item lt(x, y)
|
||||
@item st(var, expr)
|
||||
Allow to store the value of the expression @var{expr} in an internal
|
||||
variable. @var{var} specifies the number of the variable where to
|
||||
store the value, and it is a value ranging from 0 to 9. The function
|
||||
returns the value stored in the internal variable.
|
||||
|
||||
@item ld(var)
|
||||
Allow to load the value of the internal variable with number
|
||||
@var{var}, which was previosly stored with st(@var{var}, @var{expr}).
|
||||
The function returns the loaded value.
|
||||
|
||||
@item while(cond, expr)
|
||||
Evaluate expression @var{expr} while the expression @var{cond} is
|
||||
non-zero, and returns the value of the last @var{expr} evaluation, or
|
||||
NAN if @var{cond} was always false.
|
||||
|
||||
@item ceil(expr)
|
||||
Round the value of expression @var{expr} upwards to the nearest
|
||||
integer. For example, "ceil(1.5)" is "2.0".
|
||||
|
||||
@item floor(expr)
|
||||
Round the value of expression @var{expr} downwards to the nearest
|
||||
integer. For example, "floor(-1.5)" is "-2.0".
|
||||
|
||||
@item trunc(expr)
|
||||
Round the value of expression @var{expr} towards zero to the nearest
|
||||
integer. For example, "trunc(-1.5)" is "-1.0".
|
||||
|
||||
@item sqrt(expr)
|
||||
Compute the square root of @var{expr}. This is equivalent to
|
||||
"(@var{expr})^.5".
|
||||
|
||||
@item not(expr)
|
||||
Return 1.0 if @var{expr} is zero, 0.0 otherwise.
|
||||
|
||||
@item pow(x, y)
|
||||
Compute the power of @var{x} elevated @var{y}, it is equivalent to
|
||||
"(@var{x})^(@var{y})".
|
||||
@end table
|
||||
|
||||
Note that:
|
||||
|
||||
@code{*} works like AND
|
||||
|
||||
@code{+} works like OR
|
||||
|
||||
thus
|
||||
@example
|
||||
if A then B else C
|
||||
@end example
|
||||
is equivalent to
|
||||
@example
|
||||
A*B + not(A)*C
|
||||
@end example
|
||||
|
||||
In your C code, you can extend the list of unary and binary functions,
|
||||
and define recognized constants, so that they are available for your
|
||||
expressions.
|
||||
|
||||
The evaluator also recognizes the International System number
|
||||
postfixes. If 'i' is appended after the postfix, powers of 2 are used
|
||||
instead of powers of 10. The 'B' postfix multiplies the value for 8,
|
||||
and can be appended after another postfix or used alone. This allows
|
||||
using for example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||
|
||||
Follows the list of available International System postfixes, with
|
||||
indication of the corresponding powers of 10 and of 2.
|
||||
@table @option
|
||||
@item y
|
||||
-24 / -80
|
||||
@item z
|
||||
-21 / -70
|
||||
@item a
|
||||
-18 / -60
|
||||
@item f
|
||||
-15 / -50
|
||||
@item p
|
||||
-12 / -40
|
||||
@item n
|
||||
-9 / -30
|
||||
@item u
|
||||
-6 / -20
|
||||
@item m
|
||||
-3 / -10
|
||||
@item c
|
||||
-2
|
||||
@item d
|
||||
-1
|
||||
@item h
|
||||
2
|
||||
@item k
|
||||
3 / 10
|
||||
@item K
|
||||
3 / 10
|
||||
@item M
|
||||
6 / 20
|
||||
@item G
|
||||
9 / 30
|
||||
@item T
|
||||
12 / 40
|
||||
@item P
|
||||
15 / 40
|
||||
@item E
|
||||
18 / 50
|
||||
@item Z
|
||||
21 / 60
|
||||
@item Y
|
||||
24 / 70
|
||||
@end table
|
||||
|
||||
@c man end
|
@@ -1,21 +0,0 @@
|
||||
# use pkg-config for getting CFLAGS abd LDFLAGS
|
||||
FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
|
||||
CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
|
||||
LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
|
||||
|
||||
EXAMPLES=encoding-example muxing-example
|
||||
|
||||
OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||
|
||||
%: %.o
|
||||
$(CC) $< $(LDFLAGS) -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $< $(CFLAGS) -c -o $@
|
||||
|
||||
.phony: all clean
|
||||
|
||||
all: $(OBJS) $(EXAMPLES)
|
||||
|
||||
clean:
|
||||
rm -rf $(EXAMPLES) $(OBJS)
|
108
doc/faq.texi
108
doc/faq.texi
@@ -2,12 +2,11 @@
|
||||
|
||||
@settitle FFmpeg FAQ
|
||||
@titlepage
|
||||
@sp 7
|
||||
@center @titlefont{FFmpeg FAQ}
|
||||
@sp 3
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter General Questions
|
||||
|
||||
@@ -21,11 +20,10 @@ request more timely and/or frequent releases unless you are willing to
|
||||
help out creating them.
|
||||
|
||||
@section I have a problem with an old version of FFmpeg; where should I report it?
|
||||
Nowhere. We do not support old FFmpeg versions in any way, we simply lack
|
||||
the time, motivation and manpower to do so. If you have a problem with an
|
||||
old version of FFmpeg, upgrade to the latest git snapshot. If you
|
||||
still experience the problem, then you can report it according to the
|
||||
guidelines in @url{http://ffmpeg.org/bugreports.html}.
|
||||
Nowhere. Upgrade to the latest release or if there is no recent release upgrade
|
||||
to Subversion HEAD. You could also try to report it. Maybe you will get lucky and
|
||||
become the first person in history to get an answer different from "upgrade
|
||||
to Subversion HEAD".
|
||||
|
||||
@section Why doesn't FFmpeg support feature [xyz]?
|
||||
|
||||
@@ -46,8 +44,8 @@ Likely reasons
|
||||
@itemize
|
||||
@item We are busy and haven't had time yet to read your report or
|
||||
investigate the issue.
|
||||
@item You didn't follow @url{http://ffmpeg.org/bugreports.html}.
|
||||
@item You didn't use git HEAD.
|
||||
@item You didn't follow bugreports.html.
|
||||
@item You didn't use Subversion HEAD.
|
||||
@item You reported a segmentation fault without gdb output.
|
||||
@item You describe a problem but not how to reproduce it.
|
||||
@item It's unclear if you use ffmpeg as command line tool or use
|
||||
@@ -87,7 +85,7 @@ The following list of video codecs should work on most Windows systems:
|
||||
.asf only
|
||||
@item mpeg4
|
||||
Only if you have some MPEG-4 codec like ffdshow or Xvid installed.
|
||||
@item mpeg1video
|
||||
@item mpeg1
|
||||
.mpg only
|
||||
@end table
|
||||
Note, ASF files often have .wmv or .wma extensions in Windows. It should also
|
||||
@@ -99,9 +97,9 @@ The following list of audio codecs should work on most Windows systems:
|
||||
@table @option
|
||||
@item adpcm_ima_wav
|
||||
@item adpcm_ms
|
||||
@item pcm_s16le
|
||||
@item pcm
|
||||
always
|
||||
@item libmp3lame
|
||||
@item mp3
|
||||
If some MP3 codec like LAME is installed.
|
||||
@end table
|
||||
|
||||
@@ -140,25 +138,6 @@ Notice that @samp{%d} is replaced by the image number.
|
||||
|
||||
@file{img%03d.jpg} means the sequence @file{img001.jpg}, @file{img002.jpg}, etc...
|
||||
|
||||
If you have large number of pictures to rename, you can use the
|
||||
following command to ease the burden. The command, using the bourne
|
||||
shell syntax, symbolically links all files in the current directory
|
||||
that match @code{*jpg} to the @file{/tmp} directory in the sequence of
|
||||
@file{img001.jpg}, @file{img002.jpg} and so on.
|
||||
|
||||
@example
|
||||
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
|
||||
@end example
|
||||
|
||||
If you want to sequence them by oldest modified first, substitute
|
||||
@code{$(ls -r -t *jpg)} in place of @code{*jpg}.
|
||||
|
||||
Then run:
|
||||
|
||||
@example
|
||||
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
|
||||
@end example
|
||||
|
||||
The same logic is used for any image format that ffmpeg reads.
|
||||
|
||||
@section How do I encode movie to single pictures?
|
||||
@@ -197,6 +176,27 @@ quite logical that there is a small reduction of quality. This is not a bug.
|
||||
|
||||
Use @file{-} as file name.
|
||||
|
||||
@section Why does FFmpeg not decode audio in VOB files?
|
||||
|
||||
The audio is AC-3 (a.k.a. A/52). AC-3 decoding is an optional component in FFmpeg
|
||||
as the component that handles AC-3 decoding is currently released under the GPL.
|
||||
Enable AC-3 decoding with @code{./configure --enable-gpl}. Take care: By
|
||||
enabling AC-3, you automatically change the license of libavcodec from
|
||||
LGPL to GPL.
|
||||
|
||||
@section Why does the chrominance data seem to be sampled at a different time from the luminance data on bt8x8 captures on Linux?
|
||||
|
||||
This is a well-known bug in the bt8x8 driver. For 2.4.26 there is a patch at
|
||||
(@url{http://svn.ffmpeg.org/michael/trunk/patches/bttv-420-2.4.26.patch?view=co}). This may also
|
||||
apply cleanly to other 2.4-series kernels.
|
||||
|
||||
@section How do I avoid the ugly aliasing artifacts in bt8x8 captures on Linux?
|
||||
|
||||
Pass 'combfilter=1 lumafilter=1' to the bttv driver. Note though that 'combfilter=1'
|
||||
will cause somewhat too strong filtering. A fix is to apply (@url{http://svn.ffmpeg.org/michael/trunk/patches/bttv-comb-2.4.26.patch?view=co})
|
||||
or (@url{http://svn.ffmpeg.org/michael/trunk/patches/bttv-comb-2.6.6.patch?view=co})
|
||||
and pass 'combfilter=2'.
|
||||
|
||||
@section -f jpeg doesn't work.
|
||||
|
||||
Try '-f image2 test%d.jpg'.
|
||||
@@ -222,11 +222,11 @@ default.
|
||||
@item needed stuff
|
||||
-acodec libfaac -vcodec mpeg4 width<=320 height<=240
|
||||
@item working stuff
|
||||
mv4, title
|
||||
4mv, title
|
||||
@item non-working stuff
|
||||
B-frames
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
|
||||
ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv -trellis 2 -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X output.mp4
|
||||
@end table
|
||||
|
||||
@section How do I encode videos which play on the PSP?
|
||||
@@ -235,11 +235,11 @@ ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +m
|
||||
@item needed stuff
|
||||
-acodec libfaac -vcodec mpeg4 width*height<=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
|
||||
@item working stuff
|
||||
mv4, title
|
||||
4mv, title
|
||||
@item non-working stuff
|
||||
B-frames
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
|
||||
ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -ar 24000 -mbd 2 -flags +4mv -trellis 2 -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp output.mp4
|
||||
@item needed stuff for H.264
|
||||
-acodec libfaac -vcodec libx264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
|
||||
@item working stuff for H.264
|
||||
@@ -247,16 +247,16 @@ title, loop filter
|
||||
@item non-working stuff for H.264
|
||||
CAVLC
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
|
||||
ffmpeg -i input -acodec libfaac -ab 128kb -vcodec libx264 -b 1200kb -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
|
||||
@item higher resolution for newer PSP firmwares, width<=480, height<=272
|
||||
-vcodec libx264 -level 21 -coder 1 -f psp
|
||||
@item example command line
|
||||
ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
|
||||
ffmpeg -i input -acodec libfaac -ab 128kb -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640kb -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
|
||||
@end table
|
||||
|
||||
@section Which are good parameters for encoding high quality MPEG-4?
|
||||
|
||||
'-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
|
||||
'-mbd rd -flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
|
||||
things to try: '-bf 2', '-flags qprd', '-flags mv0', '-flags skiprd'.
|
||||
|
||||
@section Which are good parameters for encoding high quality MPEG-1/MPEG-2?
|
||||
@@ -275,12 +275,14 @@ material, and try '-top 0/1' if the result looks really messed-up.
|
||||
If you have built FFmpeg with @code{./configure --enable-avisynth}
|
||||
(only possible on MinGW/Cygwin platforms),
|
||||
then you may use any file that DirectShow can read as input.
|
||||
(Be aware that this feature has been recently added,
|
||||
so you will need to help yourself in case of problems.)
|
||||
|
||||
Just create an "input.avs" text file with this single line ...
|
||||
@example
|
||||
DirectShowSource("C:\path to your file\yourfile.asf")
|
||||
@end example
|
||||
... and then feed that text file to ffmpeg:
|
||||
... and then feed that text file to FFmpeg:
|
||||
@example
|
||||
ffmpeg -i input.avs
|
||||
@end example
|
||||
@@ -322,10 +324,6 @@ ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
|
||||
|
||||
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
|
||||
allow concatenation, and the transcoding step is almost lossless.
|
||||
When using multiple yuv4mpegpipe(s), the first line needs to be discarded
|
||||
from all but the first stream. This can be accomplished by piping through
|
||||
@code{tail} as seen below. Note that when piping through @code{tail} you
|
||||
must use command grouping, @code{@{ ;@}}, to background properly.
|
||||
|
||||
For example, let's say we want to join two FLV files into an output.flv file:
|
||||
|
||||
@@ -339,7 +337,7 @@ mkfifo all.v
|
||||
ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp1.a < /dev/null &
|
||||
ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp2.a < /dev/null &
|
||||
ffmpeg -i input1.flv -an -f yuv4mpegpipe - > temp1.v < /dev/null &
|
||||
@{ ffmpeg -i input2.flv -an -f yuv4mpegpipe - < /dev/null | tail -n +2 > temp2.v ; @} &
|
||||
ffmpeg -i input2.flv -an -f yuv4mpegpipe - > temp2.v < /dev/null &
|
||||
cat temp1.a temp2.a > all.a &
|
||||
cat temp1.v temp2.v > all.v &
|
||||
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
||||
@@ -348,7 +346,7 @@ ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
||||
rm temp[12].[av] all.[av]
|
||||
@end example
|
||||
|
||||
@section The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.
|
||||
@section FFmpeg does not adhere to the -maxrate setting, some frames are bigger than maxrate/fps.
|
||||
|
||||
Read the MPEG spec about video buffer verifier.
|
||||
|
||||
@@ -423,7 +421,7 @@ read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}).
|
||||
|
||||
The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
|
||||
information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
|
||||
you need the debug information, use the *_g versions.
|
||||
you need the debug information, used the *_g versions.
|
||||
|
||||
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
||||
|
||||
@@ -447,15 +445,10 @@ 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}
|
||||
|
||||
@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?
|
||||
|
||||
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
||||
FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer sources.
|
||||
You have to implement a URLProtocol, see libavformat/file.c in FFmpeg
|
||||
and libmpdemux/demux_lavf.c in MPlayer sources.
|
||||
|
||||
@section I get "No compatible shell script interpreter found." in MSys.
|
||||
|
||||
@@ -465,13 +458,18 @@ The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
|
||||
|
||||
The standard MSys install doesn't come with pr. You need to get it from the coreutils package.
|
||||
|
||||
@section I tried to pass RTP packets into a decoder, but it doesn't work.
|
||||
|
||||
RTP is a container format like any other, you must first depacketize the
|
||||
codec frames/samples stored in RTP and then feed to the decoder.
|
||||
|
||||
@section Where can I find libav* headers for Pascal/Delphi?
|
||||
|
||||
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
||||
|
||||
@section Where is the documentation about ffv1, msmpeg4, asv1, 4xm?
|
||||
|
||||
see @url{http://www.ffmpeg.org/~michael/}
|
||||
see @url{http://svn.ffmpeg.org/michael/trunk/docs/}
|
||||
|
||||
@section How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?
|
||||
|
||||
|
45
doc/fate.txt
45
doc/fate.txt
@@ -1,45 +0,0 @@
|
||||
FATE Automated Testing Environment
|
||||
|
||||
FATE provides a regression testsuite that can be run locally or configured
|
||||
to send reports to fate.ffmpeg.org.
|
||||
In order to run, it needs a large amount of data (samples and references)
|
||||
that is provided separately from the actual source distribution.
|
||||
|
||||
Use the following command to get the fate test samples
|
||||
|
||||
# make fate-rsync SAMPLES=fate-suite/
|
||||
|
||||
To inform the build system about the testsuite location, pass
|
||||
`--samples=<path to the samples>` to configure or set the SAMPLES Make
|
||||
variable or the FATE_SAMPLES environment variable to a suitable value.
|
||||
|
||||
For information on how to set up FATE to send results to the official FFmpeg
|
||||
testing framework, please refer to the following wiki page:
|
||||
http://wiki.multimedia.cx/index.php?title=FATE
|
||||
|
||||
FATE Makefile targets:
|
||||
|
||||
fate-list
|
||||
Will list all fate/regression test targets.
|
||||
|
||||
fate
|
||||
Run the FATE test suite (requires the fate-suite dataset).
|
||||
|
||||
Fate Makefile variables:
|
||||
|
||||
V
|
||||
Verbosity level, can be set to 0, 1 or 2.
|
||||
* 0: show just the test arguments
|
||||
* 1: show just the command used in the test
|
||||
* 2: show everything
|
||||
|
||||
SAMPLES
|
||||
Specify or override the path to the FATE samples at make time, it has a
|
||||
meaning only while running the regression tests.
|
||||
|
||||
THREADS
|
||||
Specify how many threads to use while running regression tests, it is
|
||||
quite useful to detect thread-related regressions.
|
||||
|
||||
Example:
|
||||
make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
172
doc/ffmpeg_powerpc_performance_evaluation_howto.txt
Normal file
172
doc/ffmpeg_powerpc_performance_evaluation_howto.txt
Normal file
@@ -0,0 +1,172 @@
|
||||
FFmpeg & evaluating performance on the PowerPC Architecture HOWTO
|
||||
|
||||
(c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
|
||||
|
||||
|
||||
|
||||
I - Introduction
|
||||
|
||||
The PowerPC architecture and its SIMD extension AltiVec offer some
|
||||
interesting tools to evaluate performance and improve the code.
|
||||
This document tries to explain how to use those tools with FFmpeg.
|
||||
|
||||
The architecture itself offers two ways to evaluate the performance of
|
||||
a given piece of code:
|
||||
|
||||
1) The Time Base Registers (TBL)
|
||||
2) The Performance Monitor Counter Registers (PMC)
|
||||
|
||||
The first ones are always available, always active, but they're not very
|
||||
accurate: the registers increment by one every four *bus* cycles. On
|
||||
my 667 Mhz tiBook (ppc7450), this means once every twenty *processor*
|
||||
cycles. So we won't use that.
|
||||
|
||||
The PMC are much more useful: not only can they report cycle-accurate
|
||||
timing, but they can also be used to monitor many other parameters,
|
||||
such as the number of AltiVec stalls for every kind of instruction,
|
||||
or instruction cache misses. The downside is that not all processors
|
||||
support the PMC (all G3, all G4 and the 970 do support them), and
|
||||
they're inactive by default - you need to activate them with a
|
||||
dedicated tool. Also, the number of available PMC depends on the
|
||||
procesor: the various 604 have 2, the various 75x (aka. G3) have 4,
|
||||
and the various 74xx (aka G4) have 6.
|
||||
|
||||
*WARNING*: The PowerPC 970 is not very well documented, and its PMC
|
||||
registers are 64 bits wide. To properly notify the code, you *must*
|
||||
tune for the 970 (using --tune=970), or the code will assume 32 bit
|
||||
registers.
|
||||
|
||||
|
||||
II - Enabling FFmpeg PowerPC performance support
|
||||
|
||||
This needs to be done by hand. First, you need to configure FFmpeg as
|
||||
usual, but add the "--powerpc-perf-enable" option. For instance:
|
||||
|
||||
#####
|
||||
./configure --prefix=/usr/local/ffmpeg-svn --cc=gcc-3.3 --tune=7450 --powerpc-perf-enable
|
||||
#####
|
||||
|
||||
This will configure FFmpeg to install inside /usr/local/ffmpeg-svn,
|
||||
compiling with gcc-3.3 (you should try to use this one or a newer
|
||||
gcc), and tuning for the PowerPC 7450 (i.e. the newer G4; as a rule of
|
||||
thumb, those at 550Mhz and more). It will also enable the PMC.
|
||||
|
||||
You may also edit the file "config.h" to enable the following line:
|
||||
|
||||
#####
|
||||
// #define ALTIVEC_USE_REFERENCE_C_CODE 1
|
||||
#####
|
||||
|
||||
If you enable this line, then the code will not make use of AltiVec,
|
||||
but will use the reference C code instead. This is useful to compare
|
||||
performance between two versions of the code.
|
||||
|
||||
Also, the number of enabled PMC is defined in "libavcodec/ppc/dsputil_ppc.h":
|
||||
|
||||
#####
|
||||
#define POWERPC_NUM_PMC_ENABLED 4
|
||||
#####
|
||||
|
||||
If you have a G4 CPU, you can enable all 6 PMC. DO NOT enable more
|
||||
PMC than available on your CPU!
|
||||
|
||||
Then, simply compile FFmpeg as usual (make && make install).
|
||||
|
||||
|
||||
|
||||
III - Using FFmpeg PowerPC performance support
|
||||
|
||||
This FFmeg can be used exactly as usual. But before exiting, FFmpeg
|
||||
will dump a per-function report that looks like this:
|
||||
|
||||
#####
|
||||
PowerPC performance report
|
||||
Values are from the PMC registers, and represent whatever the
|
||||
registers are set to record.
|
||||
Function "gmc1_altivec" (pmc1):
|
||||
min: 231
|
||||
max: 1339867
|
||||
avg: 558.25 (255302)
|
||||
Function "gmc1_altivec" (pmc2):
|
||||
min: 93
|
||||
max: 2164
|
||||
avg: 267.31 (255302)
|
||||
Function "gmc1_altivec" (pmc3):
|
||||
min: 72
|
||||
max: 1987
|
||||
avg: 276.20 (255302)
|
||||
(...)
|
||||
#####
|
||||
|
||||
In this example, PMC1 was set to record CPU cycles, PMC2 was set to
|
||||
record AltiVec Permute Stall Cycles, and PMC3 was set to record AltiVec
|
||||
Issue Stalls.
|
||||
|
||||
The function "gmc1_altivec" was monitored 255302 times, and the
|
||||
minimum execution time was 231 processor cycles. The max and average
|
||||
aren't much use, as it's very likely the OS interrupted execution for
|
||||
reasons of its own :-(
|
||||
|
||||
With the exact same settings and source file, but using the reference C
|
||||
code we get:
|
||||
|
||||
#####
|
||||
PowerPC performance report
|
||||
Values are from the PMC registers, and represent whatever the
|
||||
registers are set to record.
|
||||
Function "gmc1_altivec" (pmc1):
|
||||
min: 592
|
||||
max: 2532235
|
||||
avg: 962.88 (255302)
|
||||
Function "gmc1_altivec" (pmc2):
|
||||
min: 0
|
||||
max: 33
|
||||
avg: 0.00 (255302)
|
||||
Function "gmc1_altivec" (pmc3):
|
||||
min: 0
|
||||
max: 350
|
||||
avg: 0.03 (255302)
|
||||
(...)
|
||||
#####
|
||||
|
||||
592 cycles, so the fastest AltiVec execution is about 2.5x faster than
|
||||
the fastest C execution in this example. It's not perfect but it's not
|
||||
bad (well I wrote this function so I can't say otherwise :-).
|
||||
|
||||
Once you have that kind of report, you can try to improve things by
|
||||
finding what goes wrong and fixing it; in the example above, one
|
||||
should try to diminish the number of AltiVec stalls, as this *may*
|
||||
improve performance.
|
||||
|
||||
|
||||
|
||||
IV) Enabling the PMC in Mac OS X
|
||||
|
||||
This is easy. Use "Monster" and "monster". Those tools come from
|
||||
Apple's CHUD package, and can be found hidden in the developer web
|
||||
site & FTP site. "MONster" is the graphical application, use it to
|
||||
generate a config file specifying what each register should
|
||||
monitor. Then use the command-line application "monster" to use that
|
||||
config file, and enjoy the results.
|
||||
|
||||
Note that "MONster" can be used for many other things, but it's
|
||||
documented by Apple, it's not my subject.
|
||||
|
||||
If you are using CHUD 4.4.2 or later, you'll notice that MONster is
|
||||
no longer available. It's been superseeded by Shark, where
|
||||
configuration of PMCs is available as a plugin.
|
||||
|
||||
|
||||
|
||||
V) Enabling the PMC on Linux
|
||||
|
||||
On linux you may use oprofile from http://oprofile.sf.net, depending on the
|
||||
version and the cpu you may need to apply a patch[1] to access a set of the
|
||||
possibile counters from the userspace application. You can always define them
|
||||
using the kernel interface /dev/oprofile/* .
|
||||
|
||||
[1] http://dev.gentoo.org/~lu_zero/development/oprofile-g4-20060423.patch
|
||||
|
||||
--
|
||||
Romain Dolbeau <romain@dolbeau.org>
|
||||
Luca Barbato <lu_zero@gentoo.org>
|
@@ -1,38 +1,42 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle ffplay Documentation
|
||||
@settitle FFplay Documentation
|
||||
@titlepage
|
||||
@center @titlefont{ffplay Documentation}
|
||||
@sp 7
|
||||
@center @titlefont{FFplay Documentation}
|
||||
@sp 3
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
@chapter Introduction
|
||||
|
||||
@chapter Synopsis
|
||||
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffplay [options] [@file{input_file}]
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@chapter Description
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
FFplay is a very simple and portable media player using the FFmpeg
|
||||
libraries and the SDL library. It is mostly used as a testbed for the
|
||||
various FFmpeg APIs.
|
||||
@c man end
|
||||
|
||||
@chapter Options
|
||||
@chapter Invocation
|
||||
|
||||
@section Syntax
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffplay [options] @file{input_file}
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@table @option
|
||||
@item -h
|
||||
Show help.
|
||||
@item -version
|
||||
Show version.
|
||||
@item -L
|
||||
Show license.
|
||||
@item -formats
|
||||
Show available formats, codecs, protocols, ...
|
||||
@item -x @var{width}
|
||||
Force displayed width.
|
||||
@item -y @var{height}
|
||||
@@ -46,44 +50,12 @@ Disable audio.
|
||||
Disable video.
|
||||
@item -ss @var{pos}
|
||||
Seek to a given position in seconds.
|
||||
@item -t @var{duration}
|
||||
play <duration> seconds of audio/video
|
||||
@item -bytes
|
||||
Seek by bytes.
|
||||
@item -nodisp
|
||||
Disable graphical display.
|
||||
@item -f @var{fmt}
|
||||
Force format.
|
||||
@item -window_title @var{title}
|
||||
Set window title (default is the input filename).
|
||||
@item -loop @var{number}
|
||||
Loops movie playback <number> times. 0 means forever.
|
||||
@item -showmode @var{mode}
|
||||
Set the show mode to use.
|
||||
Available values for @var{mode} are:
|
||||
@table @samp
|
||||
@item 0, video
|
||||
show video
|
||||
@item 1, waves
|
||||
show audio waves
|
||||
@item 2, rdft
|
||||
show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
|
||||
@end table
|
||||
|
||||
Default value is "video", if video is not present or cannot be played
|
||||
"rdft" is automatically selected.
|
||||
|
||||
You can interactively cycle through the available show modes by
|
||||
pressing the key @key{w}.
|
||||
|
||||
@item -vf @var{filter_graph}
|
||||
@var{filter_graph} is a description of the filter graph to apply to
|
||||
the input video.
|
||||
Use the option "-filters" to show all the available filters (including
|
||||
also sources and sinks).
|
||||
|
||||
@item -i @var{input_file}
|
||||
Read @var{input_file}.
|
||||
@end table
|
||||
|
||||
@section Advanced options
|
||||
@@ -93,8 +65,12 @@ Set pixel format.
|
||||
@item -stats
|
||||
Show the stream duration, the codec parameters, the current position in
|
||||
the stream and the audio/video synchronisation drift.
|
||||
@item -debug
|
||||
Print specific debug info.
|
||||
@item -bug
|
||||
Work around bugs.
|
||||
@item -vismv
|
||||
Visualize motion vectors.
|
||||
@item -fast
|
||||
Non-spec-compliant optimizations.
|
||||
@item -genpts
|
||||
@@ -126,12 +102,6 @@ Select the desired subtitle stream number, counting from 0. The number
|
||||
refers to the list of all the input subtitle streams. If it is greater
|
||||
than the number of subtitle streams minus one, then the last one is
|
||||
selected, if it is negative the subtitle rendering is disabled.
|
||||
@item -autoexit
|
||||
Exit when video is done playing.
|
||||
@item -exitonkeydown
|
||||
Exit if any key is pressed.
|
||||
@item -exitonmousedown
|
||||
Exit if any mouse button is pressed.
|
||||
@end table
|
||||
|
||||
@section While playing
|
||||
@@ -171,26 +141,17 @@ Seek to percentage in file corresponding to fraction of width.
|
||||
|
||||
@c man end
|
||||
|
||||
@include eval.texi
|
||||
@include decoders.texi
|
||||
@include demuxers.texi
|
||||
@include muxers.texi
|
||||
@include indevs.texi
|
||||
@include outdevs.texi
|
||||
@include protocols.texi
|
||||
@include filters.texi
|
||||
|
||||
@ignore
|
||||
|
||||
@setfilename ffplay
|
||||
@settitle FFplay media player
|
||||
|
||||
@c man begin SEEALSO
|
||||
ffmpeg(1), ffprobe(1), ffserver(1) and the FFmpeg HTML documentation
|
||||
ffmpeg(1), ffserver(1) and the HTML documentation of @file{ffmpeg}.
|
||||
@c man end
|
||||
|
||||
@c man begin AUTHORS
|
||||
The FFmpeg developers
|
||||
@c man begin AUTHOR
|
||||
Fabrice Bellard
|
||||
@c man end
|
||||
|
||||
@end ignore
|
137
doc/ffprobe.texi
137
doc/ffprobe.texi
@@ -1,137 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle ffprobe Documentation
|
||||
@titlepage
|
||||
@center @titlefont{ffprobe Documentation}
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Synopsis
|
||||
|
||||
The generic syntax is:
|
||||
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffprobe [options] [@file{input_file}]
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@chapter Description
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
ffprobe gathers information from multimedia streams and prints it in
|
||||
human- and machine-readable fashion.
|
||||
|
||||
For example it can be used to check the format of the container used
|
||||
by a multimedia stream and the format and type of each media stream
|
||||
contained in it.
|
||||
|
||||
If a filename is specified in input, ffprobe will try to open and
|
||||
probe the file content. If the file cannot be opened or recognized as
|
||||
a multimedia file, a positive exit code is returned.
|
||||
|
||||
ffprobe may be employed both as a standalone application or in
|
||||
combination with a textual filter, which may perform more
|
||||
sophisticated processing, e.g. statistical processing or plotting.
|
||||
|
||||
Options are used to list some of the formats supported by ffprobe or
|
||||
for specifying which information to display, and for setting how
|
||||
ffprobe will show it.
|
||||
|
||||
ffprobe output is designed to be easily parsable by a textual filter,
|
||||
and consists of one or more sections of the form:
|
||||
@example
|
||||
[SECTION]
|
||||
key1=val1
|
||||
...
|
||||
keyN=valN
|
||||
[/SECTION]
|
||||
@end example
|
||||
|
||||
Metadata tags stored in the container or in the streams are recognized
|
||||
and printed in the corresponding "FORMAT" or "STREAM" section, and
|
||||
are prefixed by the string "TAG:".
|
||||
|
||||
@c man end
|
||||
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@table @option
|
||||
|
||||
@item -f @var{format}
|
||||
Force format to use.
|
||||
|
||||
@item -unit
|
||||
Show the unit of the displayed values.
|
||||
|
||||
@item -prefix
|
||||
Use SI prefixes for the displayed values.
|
||||
Unless the "-byte_binary_prefix" option is used all the prefixes
|
||||
are decimal.
|
||||
|
||||
@item -byte_binary_prefix
|
||||
Force the use of binary prefixes for byte values.
|
||||
|
||||
@item -sexagesimal
|
||||
Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
|
||||
|
||||
@item -pretty
|
||||
Prettify the format of the displayed values, it corresponds to the
|
||||
options "-unit -prefix -byte_binary_prefix -sexagesimal".
|
||||
|
||||
@item -show_format
|
||||
Show information about the container format of the input multimedia
|
||||
stream.
|
||||
|
||||
All the container format information is printed within a section with
|
||||
name "FORMAT".
|
||||
|
||||
@item -show_packets
|
||||
Show information about each packet contained in the input multimedia
|
||||
stream.
|
||||
|
||||
The information for each single packet is printed within a dedicated
|
||||
section with name "PACKET".
|
||||
|
||||
@item -show_streams
|
||||
Show information about each media stream contained in the input
|
||||
multimedia stream.
|
||||
|
||||
Each media stream information is printed within a dedicated section
|
||||
with name "STREAM".
|
||||
|
||||
@item -i @var{input_file}
|
||||
Read @var{input_file}.
|
||||
|
||||
@end table
|
||||
@c man end
|
||||
|
||||
@include decoders.texi
|
||||
@include demuxers.texi
|
||||
@include protocols.texi
|
||||
@include indevs.texi
|
||||
|
||||
@ignore
|
||||
|
||||
@setfilename ffprobe
|
||||
@settitle ffprobe media prober
|
||||
|
||||
@c man begin SEEALSO
|
||||
ffmpeg(1), ffplay(1), ffserver(1) and the FFmpeg HTML documentation
|
||||
@c man end
|
||||
|
||||
@c man begin AUTHORS
|
||||
The FFmpeg developers
|
||||
@c man end
|
||||
|
||||
@end ignore
|
||||
|
||||
@bye
|
@@ -1,33 +1,22 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle ffserver Documentation
|
||||
@settitle FFserver Documentation
|
||||
@titlepage
|
||||
@center @titlefont{ffserver Documentation}
|
||||
@sp 7
|
||||
@center @titlefont{FFserver Documentation}
|
||||
@sp 3
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
@chapter Introduction
|
||||
|
||||
@chapter Synopsys
|
||||
|
||||
The generic syntax is:
|
||||
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffserver [options]
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@chapter Description
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
ffserver is a streaming server for both audio and video. It supports
|
||||
FFserver is a streaming server for both audio and video. It supports
|
||||
several live feeds, streaming from files and time shifting on live feeds
|
||||
(you can seek to positions in the past on each live feed, provided you
|
||||
specify a big enough feed storage in ffserver.conf).
|
||||
|
||||
ffserver runs in daemon mode by default; that is, it puts itself in
|
||||
FFserver runs in daemon mode by default; that is, it puts itself in
|
||||
the background and detaches from its TTY, unless it is launched in
|
||||
debug mode or a NoDaemon option is specified in the configuration
|
||||
file.
|
||||
@@ -39,7 +28,7 @@ information.
|
||||
|
||||
@section How does it work?
|
||||
|
||||
ffserver receives prerecorded files or FFM streams from some ffmpeg
|
||||
FFserver receives prerecorded files or FFM streams from some ffmpeg
|
||||
instance as input, then streams them over RTP/RTSP/HTTP.
|
||||
|
||||
An ffserver instance will listen on some port as specified in the
|
||||
@@ -57,7 +46,7 @@ file.
|
||||
|
||||
@section Status stream
|
||||
|
||||
ffserver supports an HTTP interface which exposes the current status
|
||||
FFserver supports an HTTP interface which exposes the current status
|
||||
of the server.
|
||||
|
||||
Simply point your browser to the address of the special status stream
|
||||
@@ -237,20 +226,31 @@ You use this by adding the ?date= to the end of the URL for the stream.
|
||||
For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
|
||||
@c man end
|
||||
|
||||
@chapter Options
|
||||
@chapter Invocation
|
||||
@section Syntax
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
ffserver [options]
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@section Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@table @option
|
||||
@item -version
|
||||
Show version.
|
||||
@item -L
|
||||
Show license.
|
||||
@item -formats
|
||||
Show available formats, codecs, protocols, ...
|
||||
@item -h
|
||||
Show help.
|
||||
@item -f @var{configfile}
|
||||
Use @file{configfile} instead of @file{/etc/ffserver.conf}.
|
||||
@item -n
|
||||
Enable no-launch mode. This option disables all the Launch directives
|
||||
within the various <Stream> sections. Since ffserver will not launch
|
||||
any ffmpeg instances, you will have to launch them manually.
|
||||
within the various <Stream> sections. FFserver will not launch any
|
||||
ffmpeg instance, so you will have to launch them manually.
|
||||
@item -d
|
||||
Enable debug mode. This option increases log verbosity, directs log
|
||||
messages to stdout and causes ffserver to run in the foreground
|
||||
@@ -261,16 +261,15 @@ rather than as a daemon.
|
||||
@ignore
|
||||
|
||||
@setfilename ffserver
|
||||
@settitle ffserver video server
|
||||
@settitle FFserver video server
|
||||
|
||||
@c man begin SEEALSO
|
||||
|
||||
ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffmpeg/doc/ffserver.conf}
|
||||
example and the FFmpeg HTML documentation
|
||||
ffmpeg(1), ffplay(1), the @file{ffmpeg/doc/ffserver.conf} example and
|
||||
the HTML documentation of @file{ffmpeg}.
|
||||
@c man end
|
||||
|
||||
@c man begin AUTHORS
|
||||
The FFmpeg developers
|
||||
@c man begin AUTHOR
|
||||
Fabrice Bellard
|
||||
@c man end
|
||||
|
||||
@end ignore
|
@@ -306,27 +306,6 @@ StartSendOnKey
|
||||
#</Stream>
|
||||
|
||||
|
||||
# Transcode an incoming live feed to another live feed,
|
||||
# using libx264 and video presets
|
||||
|
||||
#<Stream live.h264>
|
||||
#Format rtp
|
||||
#Feed feed1.ffm
|
||||
#VideoCodec libx264
|
||||
#VideoFrameRate 24
|
||||
#VideoBitRate 100
|
||||
#VideoSize 480x272
|
||||
#AVPresetVideo default
|
||||
#AVPresetVideo baseline
|
||||
#AVOptionVideo flags +global_header
|
||||
#
|
||||
#AudioCodec libfaac
|
||||
#AudioBitRate 32
|
||||
#AudioChannels 2
|
||||
#AudioSampleRate 22050
|
||||
#AVOptionAudio flags +global_header
|
||||
#</Stream>
|
||||
|
||||
##################################################################
|
||||
# SDP/multicast examples
|
||||
#
|
||||
|
@@ -1,93 +0,0 @@
|
||||
All the numerical options, if not specified otherwise, accept in input
|
||||
a string representing a number, which may contain one of the
|
||||
International System number postfixes, for example 'K', 'M', 'G'.
|
||||
If 'i' is appended after the postfix, powers of 2 are used instead of
|
||||
powers of 10. The 'B' postfix multiplies the value for 8, and can be
|
||||
appended after another postfix or used alone. This allows using for
|
||||
example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||
|
||||
Options which do not take arguments are boolean options, and set the
|
||||
corresponding value to true. They can be set to false by prefixing
|
||||
with "no" the option name, for example using "-nofoo" in the
|
||||
commandline will set to false the boolean option with name "foo".
|
||||
|
||||
@section Generic options
|
||||
|
||||
These options are shared amongst the ff* tools.
|
||||
|
||||
@table @option
|
||||
|
||||
@item -L
|
||||
Show license.
|
||||
|
||||
@item -h, -?, -help, --help
|
||||
Show help.
|
||||
|
||||
@item -version
|
||||
Show version.
|
||||
|
||||
@item -formats
|
||||
Show available formats.
|
||||
|
||||
The fields preceding the format names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@end table
|
||||
|
||||
@item -codecs
|
||||
Show available codecs.
|
||||
|
||||
The fields preceding the codec names have the following meanings:
|
||||
@table @samp
|
||||
@item D
|
||||
Decoding available
|
||||
@item E
|
||||
Encoding available
|
||||
@item V/A/S
|
||||
Video/audio/subtitle codec
|
||||
@item S
|
||||
Codec supports slices
|
||||
@item D
|
||||
Codec supports direct rendering
|
||||
@item T
|
||||
Codec can handle input truncated at random locations instead of only at frame boundaries
|
||||
@end table
|
||||
|
||||
@item -bsfs
|
||||
Show available bitstream filters.
|
||||
|
||||
@item -protocols
|
||||
Show available protocols.
|
||||
|
||||
@item -filters
|
||||
Show available libavfilter filters.
|
||||
|
||||
@item -pix_fmts
|
||||
Show available pixel formats.
|
||||
|
||||
@item -loglevel @var{loglevel}
|
||||
Set the logging level used by the library.
|
||||
@var{loglevel} is a number or a string containing one of the following values:
|
||||
@table @samp
|
||||
@item quiet
|
||||
@item panic
|
||||
@item fatal
|
||||
@item error
|
||||
@item warning
|
||||
@item info
|
||||
@item verbose
|
||||
@item debug
|
||||
@end table
|
||||
|
||||
By default the program logs to stderr, if coloring is supported by the
|
||||
terminal, colors are used to mark errors and warnings. Log coloring
|
||||
can be disabled setting the environment variable
|
||||
@env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
|
||||
the environment variable @env{FFMPEG_FORCE_COLOR}.
|
||||
The use of the environment variable @env{NO_COLOR} is deprecated and
|
||||
will be dropped in a following FFmpeg version.
|
||||
|
||||
@end table
|
2000
doc/filters.texi
2000
doc/filters.texi
File diff suppressed because it is too large
Load Diff
766
doc/general.texi
766
doc/general.texi
File diff suppressed because it is too large
Load Diff
@@ -1,259 +0,0 @@
|
||||
|
||||
About Git write access:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Before everything else, you should know how to use GIT properly.
|
||||
Luckily Git comes with excellent documentation.
|
||||
|
||||
git --help
|
||||
man git
|
||||
|
||||
shows you the available subcommands,
|
||||
|
||||
git <command> --help
|
||||
man git-<command>
|
||||
|
||||
shows information about the subcommand <command>.
|
||||
|
||||
The most comprehensive manual is the website Git Reference
|
||||
|
||||
http://gitref.org/
|
||||
|
||||
For more information about the Git project, visit
|
||||
|
||||
http://git-scm.com/
|
||||
|
||||
Consult these resources whenever you have problems, they are quite exhaustive.
|
||||
|
||||
You do not need a special username or password.
|
||||
All you need is to provide a ssh public key to the Git server admin.
|
||||
|
||||
What follows now is a basic introduction to Git and some FFmpeg-specific
|
||||
guidelines. Read it at least once, if you are granted commit privileges to the
|
||||
FFmpeg project you are expected to be familiar with these rules.
|
||||
|
||||
|
||||
|
||||
I. BASICS:
|
||||
==========
|
||||
|
||||
0. Get GIT:
|
||||
|
||||
You can get git from http://git-scm.com/
|
||||
|
||||
|
||||
1. Cloning the source tree:
|
||||
|
||||
git clone git://git.videolan.org/ffmpeg <target>
|
||||
|
||||
This will put the FFmpeg sources into the directory <target>.
|
||||
|
||||
git clone git@git.videolan.org:ffmpeg <target>
|
||||
|
||||
This will put the FFmpeg sources into the directory <target> and let
|
||||
you push back your changes to the remote repository.
|
||||
|
||||
|
||||
2. Updating the source tree to the latest revision:
|
||||
|
||||
git pull (--ff-only)
|
||||
|
||||
pulls in the latest changes from the tracked branch. The tracked branch
|
||||
can be remote. By default the master branch tracks the branch master in
|
||||
the remote origin.
|
||||
Caveat: Since merge commits are forbidden at least for the initial
|
||||
months of git --ff-only or --rebase (see below) are recommended.
|
||||
--ff-only will fail and not create merge commits if your branch
|
||||
has diverged (has a different history) from the tracked branch.
|
||||
|
||||
2.a Rebasing your local branches:
|
||||
|
||||
git pull --rebase
|
||||
|
||||
fetches the changes from the main repository and replays your local commits
|
||||
over it. This is required to keep all your local changes at the top of
|
||||
FFmpeg's master tree. The master tree will reject pushes with merge commits.
|
||||
|
||||
|
||||
3. Adding/removing files/directories:
|
||||
|
||||
git add [-A] <filename/dirname>
|
||||
git rm [-r] <filename/dirname>
|
||||
|
||||
GIT needs to get notified of all changes you make to your working
|
||||
directory that makes files appear or disappear.
|
||||
Line moves across files are automatically tracked.
|
||||
|
||||
|
||||
4. Showing modifications:
|
||||
|
||||
git diff <filename(s)>
|
||||
|
||||
will show all local modifications in your working directory as unified diff.
|
||||
|
||||
|
||||
5. Inspecting the changelog:
|
||||
|
||||
git log <filename(s)>
|
||||
|
||||
You may also use the graphical tools like gitview or gitk or the web
|
||||
interface available at http://git.videolan.org
|
||||
|
||||
6. Checking source tree status:
|
||||
|
||||
git status
|
||||
|
||||
detects all the changes you made and lists what actions will be taken in case
|
||||
of a commit (additions, modifications, deletions, etc.).
|
||||
|
||||
|
||||
7. Committing:
|
||||
|
||||
git diff --check
|
||||
|
||||
to double check your changes before committing them to avoid trouble later
|
||||
on. All experienced developers do this on each and every commit, no matter
|
||||
how small.
|
||||
Every one of them has been saved from looking like a fool by this many times.
|
||||
It's very easy for stray debug output or cosmetic modifications to slip in,
|
||||
please avoid problems through this extra level of scrutiny.
|
||||
|
||||
For cosmetics-only commits you should get (almost) empty output from
|
||||
|
||||
git diff -w -b <filename(s)>
|
||||
|
||||
Also check the output of
|
||||
|
||||
git status
|
||||
|
||||
to make sure you don't have untracked files or deletions.
|
||||
|
||||
git add [-i|-p|-A] <filenames/dirnames>
|
||||
|
||||
Make sure you have told git your name and email address, e.g. by running
|
||||
git config --global user.name "My Name"
|
||||
git config --global user.email my@email.invalid
|
||||
(--global to set the global configuration for all your git checkouts).
|
||||
|
||||
Git will select the changes to the files for commit. Optionally you can use
|
||||
the interactive or the patch mode to select hunk by hunk what should be
|
||||
added to the commit.
|
||||
|
||||
git commit
|
||||
|
||||
Git will commit the selected changes to your current local branch.
|
||||
|
||||
You will be prompted for a log message in an editor, which is either
|
||||
set in your personal configuration file through
|
||||
|
||||
git config core.editor
|
||||
|
||||
or set by one of the following environment variables:
|
||||
GIT_EDITOR, VISUAL or EDITOR.
|
||||
|
||||
Log messages should be concise but descriptive. Explain why you made a change,
|
||||
what you did will be obvious from the changes themselves most of the time.
|
||||
Saying just "bug fix" or "10l" is bad. Remember that people of varying skill
|
||||
levels look at and educate themselves while reading through your code. Don't
|
||||
include filenames in log messages, Git provides that information.
|
||||
|
||||
Possibly make the commit message have a terse, descriptive first line, an
|
||||
empty line and then a full description. The first line will be used to name
|
||||
the patch by git format-patch.
|
||||
|
||||
|
||||
8. Renaming/moving/copying files or contents of files:
|
||||
|
||||
Git automatically tracks such changes, making those normal commits.
|
||||
|
||||
mv/cp path/file otherpath/otherfile
|
||||
|
||||
git add [-A] .
|
||||
|
||||
git commit
|
||||
|
||||
Do not move, rename or copy files of which you are not the maintainer without
|
||||
discussing it on the mailing list first!
|
||||
|
||||
9. Reverting broken commits
|
||||
|
||||
git revert <commit>
|
||||
|
||||
git revert will generate a revert commit. This will not make the faulty
|
||||
commit disappear from the history.
|
||||
|
||||
git reset <commit>
|
||||
|
||||
git reset will uncommit the changes till <commit> rewriting the current
|
||||
branch history.
|
||||
|
||||
git commit --amend
|
||||
|
||||
allows to amend the last commit details quickly.
|
||||
|
||||
git rebase -i origin/master
|
||||
|
||||
will replay local commits over the main repository allowing to edit,
|
||||
merge or remove some of them in the process.
|
||||
|
||||
Note that the reset, commit --amend and rebase rewrite history, so you
|
||||
should use them ONLY on your local or topic branches.
|
||||
|
||||
The main repository will reject those changes.
|
||||
|
||||
10. Preparing a patchset.
|
||||
|
||||
git format-patch <commit> [-o directory]
|
||||
|
||||
will generate a set of patches out of the current branch starting from
|
||||
commit. By default the patches are created in the current directory.
|
||||
|
||||
11. Sending patches for review
|
||||
|
||||
git send-email <commit list|directory>
|
||||
|
||||
will send the patches created by git format-patch or directly generates
|
||||
them. All the email fields can be configured in the global/local
|
||||
configuration or overridden by command line.
|
||||
|
||||
12. Pushing changes to remote trees
|
||||
|
||||
git push
|
||||
|
||||
Will push the changes to the default remote (origin).
|
||||
Git will prevent you from pushing changes if the local and remote trees are
|
||||
out of sync. Refer to 2 and 2.a to sync the local tree.
|
||||
|
||||
git remote add <name> <url>
|
||||
|
||||
Will add additional remote with a name reference, it is useful if you want
|
||||
to push your local branch for review on a remote host.
|
||||
|
||||
git push <remote> <refspec>
|
||||
|
||||
Will push the changes to the remote repository. Omitting refspec makes git
|
||||
push update all the remote branches matching the local ones.
|
||||
|
||||
13. Finding a specific svn revision
|
||||
|
||||
Since version 1.7.1 git supports ':/foo' syntax for specifying commits
|
||||
based on a regular expression. see man gitrevisions
|
||||
|
||||
git show :/'as revision 23456'
|
||||
|
||||
will show the svn changeset r23456. With older git versions searching in
|
||||
the git log output is the easiest option (especially if a pager with
|
||||
search capabilities is used).
|
||||
This commit can be checked out with
|
||||
|
||||
git checkout -b svn_23456 :/'as revision 23456'
|
||||
|
||||
or for git < 1.7.1 with
|
||||
|
||||
git checkout -b svn_23456 $SHA1
|
||||
|
||||
where $SHA1 is the commit SHA1 from the 'git log' output.
|
||||
|
||||
|
||||
Contact the project admins <root at ffmpeg dot org> if you have technical
|
||||
problems with the GIT server.
|
299
doc/hooks.texi
Normal file
299
doc/hooks.texi
Normal file
@@ -0,0 +1,299 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle Video Hook Documentation
|
||||
@titlepage
|
||||
@sp 7
|
||||
@center @titlefont{Video Hook Documentation}
|
||||
@sp 3
|
||||
@end titlepage
|
||||
|
||||
|
||||
@chapter Introduction
|
||||
|
||||
@var{Please be aware that vhook is deprecated, and hence its development is
|
||||
frozen (bug fixes are still accepted).
|
||||
The substitute will be 'libavfilter', the result of our 'Video Filter API'
|
||||
Google Summer of Code project. You may monitor its progress by subscribing to
|
||||
the ffmpeg-soc mailing list at
|
||||
@url{http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc}.}
|
||||
|
||||
The video hook functionality is designed (mostly) for live video. It allows
|
||||
the video to be modified or examined between the decoder and the encoder.
|
||||
|
||||
Any number of hook modules can be placed inline, and they are run in the
|
||||
order that they were specified on the ffmpeg command line.
|
||||
|
||||
The video hook modules are provided for use as a base for your own modules,
|
||||
and are described below.
|
||||
|
||||
Modules are loaded using the -vhook option to ffmpeg. The value of this parameter
|
||||
is a space separated list of arguments. The first is the module name, and the rest
|
||||
are passed as arguments to the Configure function of the module.
|
||||
|
||||
The modules are dynamic libraries: They have different suffixes (.so, .dll, .dylib)
|
||||
depending on your platform. And your platform dictates if they need to be
|
||||
somewhere in your PATH, or in your LD_LIBRARY_PATH. Otherwise you will need to
|
||||
specify the full path of the vhook file that you are using.
|
||||
|
||||
@section null.c
|
||||
|
||||
This does nothing. Actually it converts the input image to RGB24 and then converts
|
||||
it back again. This is meant as a sample that you can use to test your setup.
|
||||
|
||||
@section fish.c
|
||||
|
||||
This implements a 'fish detector'. Essentially it converts the image into HSV
|
||||
space and tests whether more than a certain percentage of the pixels fall into
|
||||
a specific HSV cuboid. If so, then the image is saved into a file for processing
|
||||
by other bits of code.
|
||||
|
||||
Why use HSV? It turns out that HSV cuboids represent a more compact range of
|
||||
colors than would an RGB cuboid.
|
||||
|
||||
@section imlib2.c
|
||||
|
||||
This module implements a text overlay for a video image. Currently it
|
||||
supports a fixed overlay or reading the text from a file. The string
|
||||
is passed through strftime() so that it is easy to imprint the date and
|
||||
time onto the image.
|
||||
|
||||
This module depends on the external library imlib2, available on
|
||||
Sourceforge, among other places, if it is not already installed on
|
||||
your system.
|
||||
|
||||
You may also overlay an image (even semi-transparent) like TV stations do.
|
||||
You may move either the text or the image around your video to create
|
||||
scrolling credits, for example.
|
||||
|
||||
The font file used is looked for in a FONTPATH environment variable, and
|
||||
prepended to the point size as a command line option and can be specified
|
||||
with the full path to the font file, as in:
|
||||
@example
|
||||
-F /usr/X11R6/lib/X11/fonts/TTF/VeraBd.ttf/20
|
||||
@end example
|
||||
where 20 is the point size.
|
||||
|
||||
You can specify the filename to read RGB color names from. If it is not
|
||||
specified, these defaults are used: @file{/usr/share/X11/rgb.txt} and
|
||||
@file{/usr/lib/X11/rgb.txt}
|
||||
|
||||
Options:
|
||||
@multitable @columnfractions .2 .8
|
||||
@item @option{-C <rgb.txt>} @tab The filename to read RGB color names from
|
||||
@item @option{-c <color>} @tab The color of the text
|
||||
@item @option{-F <fontname>} @tab The font face and size
|
||||
@item @option{-t <text>} @tab The text
|
||||
@item @option{-f <filename>} @tab The filename to read text from
|
||||
@item @option{-x <expression>}@tab x coordinate of text or image
|
||||
@item @option{-y <expression>}@tab y coordinate of text or image
|
||||
@item @option{-i <filename>} @tab The filename to read a image from
|
||||
@item @option{-R <expression>}@tab Value for R color
|
||||
@item @option{-G <expression>}@tab Value for G color
|
||||
@item @option{-B <expression>}@tab Value for B color
|
||||
@item @option{-A <expression>}@tab Value for Alpha channel
|
||||
@end multitable
|
||||
|
||||
Expressions are functions of these variables:
|
||||
@multitable @columnfractions .2 .8
|
||||
@item @var{N} @tab frame number (starting at zero)
|
||||
@item @var{H} @tab frame height
|
||||
@item @var{W} @tab frame width
|
||||
@item @var{h} @tab image height
|
||||
@item @var{w} @tab image width
|
||||
@item @var{X} @tab previous x coordinate of text or image
|
||||
@item @var{Y} @tab previous y coordinate of text or image
|
||||
@end multitable
|
||||
|
||||
You may also use the constants @var{PI}, @var{E}, and the math functions available at the
|
||||
FFmpeg formula evaluator at (@url{ffmpeg-doc.html#SEC13}), except @var{bits2qp(bits)}
|
||||
and @var{qp2bits(qp)}.
|
||||
|
||||
Usage examples:
|
||||
|
||||
@example
|
||||
# Remember to set the path to your fonts
|
||||
FONTPATH="/cygdrive/c/WINDOWS/Fonts/"
|
||||
FONTPATH="$FONTPATH:/usr/share/imlib2/data/fonts/"
|
||||
FONTPATH="$FONTPATH:/usr/X11R6/lib/X11/fonts/TTF/"
|
||||
export FONTPATH
|
||||
|
||||
# Bulb dancing in a Lissajous pattern
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.dll -x W*(0.5+0.25*sin(N/47*PI))-w/2 -y H*(0.5+0.50*cos(N/97*PI))-h/2 -i /usr/share/imlib2/data/images/bulb.png' \
|
||||
-acodec copy -sameq output.avi
|
||||
|
||||
# Text scrolling
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.dll -c red -F Vera.ttf/20 -x 150+0.5*N -y 70+0.25*N -t Hello' \
|
||||
-acodec copy -sameq output.avi
|
||||
|
||||
# Date and time stamp, security-camera style:
|
||||
ffmpeg -r 29.97 -s 320x256 -f video4linux -i /dev/video0 \
|
||||
-vhook 'vhook/imlib2.so -x 0 -y 0 -i black-260x20.png' \
|
||||
-vhook 'vhook/imlib2.so -c white -F VeraBd.ttf/12 -x 0 -y 0 -t %A-%D-%T' \
|
||||
output.avi
|
||||
|
||||
In this example the video is captured from the first video capture card as a
|
||||
320x256 AVI, and a black 260 by 20 pixel PNG image is placed in the upper
|
||||
left corner, with the day, date and time overlaid on it in Vera Bold 12
|
||||
point font. A simple black PNG file 260 pixels wide and 20 pixels tall
|
||||
was created in the GIMP for this purpose.
|
||||
|
||||
# Scrolling credits from a text file
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.so -c white -F VeraBd.ttf/16 -x 100 -y -1.0*N -f credits.txt' \
|
||||
-sameq output.avi
|
||||
|
||||
In this example, the text is stored in a file, and is positioned 100
|
||||
pixels from the left hand edge of the video. The text is scrolled from the
|
||||
bottom up. Making the y factor positive will scroll from the top down.
|
||||
Increasing the magnitude of the y factor makes the text scroll faster,
|
||||
decreasing it makes it scroll slower. Hint: Blank lines containing only
|
||||
a newline are treated as end-of-file. To create blank lines, use lines
|
||||
that consist of space characters only.
|
||||
|
||||
# Scrolling credits with custom color from a text file
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.so -C rgb.txt -c CustomColor1 -F VeraBd.ttf/16 -x 100 -y -1.0*N -f credits.txt' \
|
||||
-sameq output.avi
|
||||
|
||||
This example does the same as the one above, but specifies an rgb.txt file
|
||||
to be used, which has a custom-made color in it.
|
||||
|
||||
# Variable colors
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.so -t Hello -R abs(255*sin(N/47*PI)) -G abs(255*sin(N/47*PI)) -B abs(255*sin(N/47*PI))' \
|
||||
-sameq output.avi
|
||||
|
||||
In this example, the color for the text goes up and down from black to
|
||||
white.
|
||||
|
||||
# Text fade-out
|
||||
ffmpeg -i input.avi -vhook \
|
||||
'vhook/imlib2.so -t Hello -A max(0,255-exp(N/47))' \
|
||||
-sameq output.avi
|
||||
|
||||
In this example, the text fades out in about 10 seconds for a 25 fps input
|
||||
video file.
|
||||
|
||||
# scrolling credits from a graphics file
|
||||
ffmpeg -sameq -i input.avi \
|
||||
-vhook 'vhook/imlib2.so -x 0 -y -1.0*N -i credits.png' output.avi
|
||||
|
||||
In this example, a transparent PNG file the same width as the video
|
||||
(e.g. 320 pixels), but very long, (e.g. 3000 pixels), was created, and
|
||||
text, graphics, brushstrokes, etc, were added to the image. The image
|
||||
is then scrolled up, from the bottom of the frame.
|
||||
|
||||
@end example
|
||||
|
||||
@section ppm.c
|
||||
|
||||
It's basically a launch point for a PPM pipe, so you can use any
|
||||
executable (or script) which consumes a PPM on stdin and produces a PPM
|
||||
on stdout (and flushes each frame). The Netpbm utilities are a series of
|
||||
such programs.
|
||||
|
||||
A list of them is here:
|
||||
|
||||
@url{http://netpbm.sourceforge.net/doc/directory.html}
|
||||
|
||||
Usage example:
|
||||
|
||||
@example
|
||||
ffmpeg -i input -vhook "/path/to/ppm.so some-ppm-filter args" output
|
||||
@end example
|
||||
|
||||
@section drawtext.c
|
||||
|
||||
This module implements a text overlay for a video image. Currently it
|
||||
supports a fixed overlay or reading the text from a file. The string
|
||||
is passed through strftime() so that it is easy to imprint the date and
|
||||
time onto the image.
|
||||
|
||||
Features:
|
||||
@itemize @minus
|
||||
@item TrueType, Type1 and others via the FreeType2 library
|
||||
@item Font kerning (better output)
|
||||
@item Line Wrap (put the text that doesn't fit one line on the next line)
|
||||
@item Background box (currently in development)
|
||||
@item Outline
|
||||
@end itemize
|
||||
|
||||
Options:
|
||||
@multitable @columnfractions .2 .8
|
||||
@item @option{-c <color>} @tab Foreground color of the text ('internet' way) <#RRGGBB> [default #FFFFFF]
|
||||
@item @option{-C <color>} @tab Background color of the text ('internet' way) <#RRGGBB> [default #000000]
|
||||
@item @option{-f <font-filename>} @tab font file to use
|
||||
@item @option{-t <text>} @tab text to display
|
||||
@item @option{-T <filename>} @tab file to read text from
|
||||
@item @option{-x <pos>} @tab x coordinate of the start of the text
|
||||
@item @option{-y <pos>} @tab y coordinate of the start of the text
|
||||
@end multitable
|
||||
|
||||
Text fonts are being looked for in a FONTPATH environment variable.
|
||||
If the FONTPATH environment variable is not available, or is not checked by
|
||||
your target (i.e. Cygwin), then specify the full path to the font file as in:
|
||||
@example
|
||||
-f /usr/X11R6/lib/X11/fonts/TTF/VeraBd.ttf
|
||||
@end example
|
||||
|
||||
Usage Example:
|
||||
@example
|
||||
# Remember to set the path to your fonts
|
||||
FONTPATH="/cygdrive/c/WINDOWS/Fonts/"
|
||||
FONTPATH="$FONTPATH:/usr/share/imlib2/data/fonts/"
|
||||
FONTPATH="$FONTPATH:/usr/X11R6/lib/X11/fonts/TTF/"
|
||||
export FONTPATH
|
||||
|
||||
# Time and date display
|
||||
ffmpeg -f video4linux2 -i /dev/video0 \
|
||||
-vhook 'vhook/drawtext.so -f VeraBd.ttf -t %A-%D-%T' movie.mpg
|
||||
|
||||
This example grabs video from the first capture card and outputs it to an
|
||||
MPEG video, and places "Weekday-dd/mm/yy-hh:mm:ss" at the top left of the
|
||||
frame, updated every second, using the Vera Bold TrueType Font, which
|
||||
should exist in: /usr/X11R6/lib/X11/fonts/TTF/
|
||||
@end example
|
||||
|
||||
Check the man page for strftime() for all the various ways you can format
|
||||
the date and time.
|
||||
|
||||
@section watermark.c
|
||||
|
||||
Command Line options:
|
||||
@multitable @columnfractions .2 .8
|
||||
@item @option{-m [0|1]} @tab Mode (default: 0, see below)
|
||||
@item @option{-t 000000 - FFFFFF} @tab Threshold, six digit hex number
|
||||
@item @option{-f <filename>} @tab Watermark image filename, must be specified!
|
||||
@end multitable
|
||||
|
||||
MODE 0:
|
||||
The watermark picture works like this (assuming color intensities 0..0xFF):
|
||||
Per color do this:
|
||||
If mask color is 0x80, no change to the original frame.
|
||||
If mask color is < 0x80 the absolute difference is subtracted from the
|
||||
frame. If result < 0, result = 0.
|
||||
If mask color is > 0x80 the absolute difference is added to the
|
||||
frame. If result > 0xFF, result = 0xFF.
|
||||
|
||||
You can override the 0x80 level with the -t flag. E.g. if threshold is
|
||||
000000 the color value of watermark is added to the destination.
|
||||
|
||||
This way a mask that is visible both in light and dark pictures can be made
|
||||
(e.g. by using a picture generated by the Gimp and the bump map tool).
|
||||
|
||||
An example watermark file is at:
|
||||
@url{http://engene.se/ffmpeg_watermark.gif}
|
||||
|
||||
MODE 1:
|
||||
Per color do this:
|
||||
If mask color > threshold color then the watermark pixel is used.
|
||||
|
||||
Example usage:
|
||||
@example
|
||||
ffmpeg -i infile -vhook '/path/watermark.so -f wm.gif' -an out.mov
|
||||
ffmpeg -i infile -vhook '/path/watermark.so -f wm.gif -m 1 -t 222222' -an out.mov
|
||||
@end example
|
||||
|
||||
@bye
|
254
doc/indevs.texi
254
doc/indevs.texi
@@ -1,254 +0,0 @@
|
||||
@chapter Input Devices
|
||||
@c man begin INPUT DEVICES
|
||||
|
||||
Input devices are configured elements in FFmpeg which allow to access
|
||||
the data coming from a multimedia device attached to your system.
|
||||
|
||||
When you configure your FFmpeg build, all the supported input devices
|
||||
are enabled by default. You can list all available ones using the
|
||||
configure option "--list-indevs".
|
||||
|
||||
You can disable all the input devices using the configure option
|
||||
"--disable-indevs", and selectively enable an input device using the
|
||||
option "--enable-indev=@var{INDEV}", or you can disable a particular
|
||||
input device using the option "--disable-indev=@var{INDEV}".
|
||||
|
||||
The option "-formats" of the ff* tools will display the list of
|
||||
supported input devices (amongst the demuxers).
|
||||
|
||||
A description of the currently available input devices follows.
|
||||
|
||||
@section alsa
|
||||
|
||||
ALSA (Advanced Linux Sound Architecture) input device.
|
||||
|
||||
To enable this input device during configuration you need libasound
|
||||
installed on your system.
|
||||
|
||||
This device allows capturing from an ALSA device. The name of the
|
||||
device to capture has to be an ALSA card identifier.
|
||||
|
||||
An ALSA identifier has the syntax:
|
||||
@example
|
||||
hw:@var{CARD}[,@var{DEV}[,@var{SUBDEV}]]
|
||||
@end example
|
||||
|
||||
where the @var{DEV} and @var{SUBDEV} components are optional.
|
||||
|
||||
The three arguments (in order: @var{CARD},@var{DEV},@var{SUBDEV})
|
||||
specify card number or identifier, device number and subdevice number
|
||||
(-1 means any).
|
||||
|
||||
To see the list of cards currently recognized by your system check the
|
||||
files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
|
||||
|
||||
For example to capture with @file{ffmpeg} from an ALSA device with
|
||||
card id 0, you may run the command:
|
||||
@example
|
||||
ffmpeg -f alsa -i hw:0 alsaout.wav
|
||||
@end example
|
||||
|
||||
For more information see:
|
||||
@url{http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html}
|
||||
|
||||
@section bktr
|
||||
|
||||
BSD video input device.
|
||||
|
||||
@section dv1394
|
||||
|
||||
Linux DV 1394 input device.
|
||||
|
||||
@section fbdev
|
||||
|
||||
Linux framebuffer input device.
|
||||
|
||||
The Linux framebuffer is a graphic hardware-independent abstraction
|
||||
layer to show graphics on a computer monitor, typically on the
|
||||
console. It is accessed through a file device node, usually
|
||||
@file{/dev/fb0}.
|
||||
|
||||
For more detailed information read the file
|
||||
Documentation/fb/framebuffer.txt included in the Linux source tree.
|
||||
|
||||
To record from the framebuffer device @file{/dev/fb0} with
|
||||
@file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
|
||||
@end example
|
||||
|
||||
You can take a single screenshot image with the command:
|
||||
@example
|
||||
ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
||||
@end example
|
||||
|
||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
||||
|
||||
@section jack
|
||||
|
||||
JACK input device.
|
||||
|
||||
To enable this input device during configuration you need libjack
|
||||
installed on your system.
|
||||
|
||||
A JACK input device creates one or more JACK writable clients, one for
|
||||
each audio channel, with name @var{client_name}:input_@var{N}, where
|
||||
@var{client_name} is the name provided by the application, and @var{N}
|
||||
is a number which identifies the channel.
|
||||
Each writable client will send the acquired data to the FFmpeg input
|
||||
device.
|
||||
|
||||
Once you have created one or more JACK readable clients, you need to
|
||||
connect them to one or more JACK writable clients.
|
||||
|
||||
To connect or disconnect JACK clients you can use the
|
||||
@file{jack_connect} and @file{jack_disconnect} programs, or do it
|
||||
through a graphical interface, for example with @file{qjackctl}.
|
||||
|
||||
To list the JACK clients and their properties you can invoke the command
|
||||
@file{jack_lsp}.
|
||||
|
||||
Follows an example which shows how to capture a JACK readable client
|
||||
with @file{ffmpeg}.
|
||||
@example
|
||||
# Create a JACK writable client with name "ffmpeg".
|
||||
$ ffmpeg -f jack -i ffmpeg -y out.wav
|
||||
|
||||
# Start the sample jack_metro readable client.
|
||||
$ jack_metro -b 120 -d 0.2 -f 4000
|
||||
|
||||
# List the current JACK clients.
|
||||
$ jack_lsp -c
|
||||
system:capture_1
|
||||
system:capture_2
|
||||
system:playback_1
|
||||
system:playback_2
|
||||
ffmpeg:input_1
|
||||
metro:120_bpm
|
||||
|
||||
# Connect metro to the ffmpeg writable client.
|
||||
$ jack_connect metro:120_bpm ffmpeg:input_1
|
||||
@end example
|
||||
|
||||
For more information read:
|
||||
@url{http://jackaudio.org/}
|
||||
|
||||
@section libdc1394
|
||||
|
||||
IIDC1394 input device, based on libdc1394 and libraw1394.
|
||||
|
||||
@section oss
|
||||
|
||||
Open Sound System input device.
|
||||
|
||||
The filename to provide to the input device is the device node
|
||||
representing the OSS input device, and is usually set to
|
||||
@file{/dev/dsp}.
|
||||
|
||||
For example to grab from @file{/dev/dsp} using @file{ffmpeg} use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
||||
@end example
|
||||
|
||||
For more information about OSS see:
|
||||
@url{http://manuals.opensound.com/usersguide/dsp.html}
|
||||
|
||||
@section sndio
|
||||
|
||||
sndio input device.
|
||||
|
||||
To enable this input device during configuration you need libsndio
|
||||
installed on your system.
|
||||
|
||||
The filename to provide to the input device is the device node
|
||||
representing the sndio input device, and is usually set to
|
||||
@file{/dev/audio0}.
|
||||
|
||||
For example to grab from @file{/dev/audio0} using @file{ffmpeg} use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
|
||||
@end example
|
||||
|
||||
@section video4linux and video4linux2
|
||||
|
||||
Video4Linux and Video4Linux2 input video devices.
|
||||
|
||||
The name of the device to grab is a file device node, usually Linux
|
||||
systems tend to automatically create such nodes when the device
|
||||
(e.g. an USB webcam) is plugged into the system, and has a name of the
|
||||
kind @file{/dev/video@var{N}}, where @var{N} is a number associated to
|
||||
the device.
|
||||
|
||||
Video4Linux and Video4Linux2 devices only support a limited set of
|
||||
@var{width}x@var{height} sizes and framerates. You can check which are
|
||||
supported for example with the command @file{dov4l} for Video4Linux
|
||||
devices and the command @file{v4l-info} for Video4Linux2 devices.
|
||||
|
||||
If the size for the device is set to 0x0, the input device will
|
||||
try to autodetect the size to use.
|
||||
Only for the video4linux2 device, if the frame rate is set to 0/0 the
|
||||
input device will use the frame rate value already set in the driver.
|
||||
|
||||
Video4Linux support is deprecated since Linux 2.6.30, and will be
|
||||
dropped in later versions.
|
||||
|
||||
Follow some usage examples of the video4linux devices with the ff*
|
||||
tools.
|
||||
@example
|
||||
# Grab and show the input of a video4linux device, frame rate is set
|
||||
# to the default of 25/1.
|
||||
ffplay -s 320x240 -f video4linux /dev/video0
|
||||
|
||||
# Grab and show the input of a video4linux2 device, autoadjust size.
|
||||
ffplay -f video4linux2 /dev/video0
|
||||
|
||||
# Grab and record the input of a video4linux2 device, autoadjust size,
|
||||
# frame rate value defaults to 0/0 so it is read from the video4linux2
|
||||
# driver.
|
||||
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
|
||||
@end example
|
||||
|
||||
@section vfwcap
|
||||
|
||||
VfW (Video for Windows) capture input device.
|
||||
|
||||
The filename passed as input is the capture driver number, ranging from
|
||||
0 to 9. You may use "list" as filename to print a list of drivers. Any
|
||||
other filename will be interpreted as device number 0.
|
||||
|
||||
@section x11grab
|
||||
|
||||
X11 video input device.
|
||||
|
||||
This device allows to capture a region of an X11 display.
|
||||
|
||||
The filename passed as input has the syntax:
|
||||
@example
|
||||
[@var{hostname}]:@var{display_number}.@var{screen_number}[+@var{x_offset},@var{y_offset}]
|
||||
@end example
|
||||
|
||||
@var{hostname}:@var{display_number}.@var{screen_number} specifies the
|
||||
X11 display name of the screen to grab from. @var{hostname} can be
|
||||
ommitted, and defaults to "localhost". The environment variable
|
||||
@env{DISPLAY} contains the default display name.
|
||||
|
||||
@var{x_offset} and @var{y_offset} specify the offsets of the grabbed
|
||||
area with respect to the top-left border of the X11 screen. They
|
||||
default to 0.
|
||||
|
||||
Check the X11 documentation (e.g. man X) for more detailed information.
|
||||
|
||||
Use the @file{dpyinfo} program for getting basic information about the
|
||||
properties of your X11 display (e.g. grep for "name" or "dimensions").
|
||||
|
||||
For example to grab from @file{:0.0} using @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||
|
||||
# Grab at position 10,20.
|
||||
ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
|
||||
@end example
|
||||
|
||||
@c man end INPUT DEVICES
|
@@ -5,17 +5,34 @@ NOTE: This is a draft.
|
||||
|
||||
Overview:
|
||||
---------
|
||||
FFmpeg uses Trac for tracking issues, new issues and changes to
|
||||
existing issues can be done through a web interface.
|
||||
FFmpeg uses Roundup for tracking issues, new issues and changes to
|
||||
existing issues can be done through a web interface and through email.
|
||||
It is possible to subscribe to individual issues by adding yourself to the
|
||||
nosy list or to subscribe to the ffmpeg-issues mailing list which receives
|
||||
a mail for every change to every issue. Replies to such mails will also
|
||||
be properly added to the respective issue.
|
||||
(the above does all work already after light testing)
|
||||
The subscription URL for the ffmpeg-trac list is:
|
||||
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
||||
The subscription URL for the ffmpeg-issues list is:
|
||||
http://live.polito/mailman/listinfo/ffmpeg-issues
|
||||
The URL of the webinterface of the tracker is:
|
||||
http(s)://ffmpeg.org/trac/ffmpeg
|
||||
http(s)://roundup.ffmpeg/roundup/ffmpeg/
|
||||
Note the URLs in this document are obfuscated, you must append the top level
|
||||
domain for non-profit organizations to the tracker, and of Italy to the
|
||||
mailing list.
|
||||
|
||||
Email Interface:
|
||||
----------------
|
||||
There is a mailing list to which all new issues and changes to existing issues
|
||||
are sent. You can subscribe through
|
||||
http://live.polito/mailman/listinfo/ffmpeg-issues
|
||||
Replies to messages there will have their text added to the specific issues.
|
||||
Attachments will be added as if they had been uploaded via the web interface.
|
||||
You can change the status, substatus, topic, ... by changing the subject in
|
||||
your reply like:
|
||||
Re: [issue94] register_avcodec and allcodecs.h [type=patch;status=open;substatus=approved]
|
||||
Roundup will then change things as you requested and remove the [...] from
|
||||
the subject before forwarding the mail to the mailing list.
|
||||
|
||||
|
||||
NOTE: issue = (bug report || patch || feature request)
|
||||
|
||||
|
@@ -1,105 +0,0 @@
|
||||
\input texinfo @c -*- texinfo -*-
|
||||
|
||||
@settitle Libavfilter Documentation
|
||||
@titlepage
|
||||
@center @titlefont{Libavfilter Documentation}
|
||||
@end titlepage
|
||||
|
||||
@top
|
||||
|
||||
@contents
|
||||
|
||||
@chapter Introduction
|
||||
|
||||
Libavfilter is the filtering API of FFmpeg. It is the substitute of the
|
||||
now deprecated 'vhooks' and started as a Google Summer of Code project.
|
||||
|
||||
Integrating libavfilter into the main FFmpeg repository is a work in
|
||||
progress. If you wish to try the unfinished development code of
|
||||
libavfilter then check it out from the libavfilter repository into
|
||||
some directory of your choice by:
|
||||
|
||||
@example
|
||||
svn checkout svn://svn.ffmpeg.org/soc/libavfilter
|
||||
@end example
|
||||
|
||||
And then read the README file in the top directory to learn how to
|
||||
integrate it into ffmpeg and ffplay.
|
||||
|
||||
But note that there may still be serious bugs in the code and its API
|
||||
and ABI should not be considered stable yet!
|
||||
|
||||
@chapter Tutorial
|
||||
|
||||
In libavfilter, it is possible for filters to have multiple inputs and
|
||||
multiple outputs.
|
||||
To illustrate the sorts of things that are possible, we can
|
||||
use a complex filter graph. For example, the following one:
|
||||
|
||||
@example
|
||||
input --> split --> fifo -----------------------> overlay --> output
|
||||
| ^
|
||||
| |
|
||||
+------> fifo --> crop --> vflip --------+
|
||||
@end example
|
||||
|
||||
splits the stream in two streams, sends one stream through the crop filter
|
||||
and the vflip filter before merging it back with the other stream by
|
||||
overlaying it on top. You can use the following command to achieve this:
|
||||
|
||||
@example
|
||||
./ffmpeg -i in.avi -s 240x320 -vf "[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2]
|
||||
@end example
|
||||
|
||||
where input_video.avi has a vertical resolution of 480 pixels. The
|
||||
result will be that in output the top half of the video is mirrored
|
||||
onto the bottom half.
|
||||
|
||||
Video filters are loaded using the @var{-vf} option passed to
|
||||
ffmpeg or to ffplay. Filters in the same linear chain are separated by
|
||||
commas. In our example, @var{split, fifo, overlay} are in one linear
|
||||
chain, and @var{fifo, crop, vflip} are in another. The points where
|
||||
the linear chains join are labeled by names enclosed in square
|
||||
brackets. In our example, that is @var{[T1]} and @var{[T2]}. The magic
|
||||
labels @var{[in]} and @var{[out]} are the points where video is input
|
||||
and output.
|
||||
|
||||
Some filters take in input a list of parameters: they are specified
|
||||
after the filter name and an equal sign, and are separated each other
|
||||
by a semicolon.
|
||||
|
||||
There exist so-called @var{source filters} that do not have a video
|
||||
input, and we expect in the future some @var{sink filters} that will
|
||||
not have video output.
|
||||
|
||||
@chapter graph2dot
|
||||
|
||||
The @file{graph2dot} program included in the FFmpeg @file{tools}
|
||||
directory can be used to parse a filter graph description and issue a
|
||||
corresponding textual representation in the dot language.
|
||||
|
||||
Invoke the command:
|
||||
@example
|
||||
graph2dot -h
|
||||
@end example
|
||||
|
||||
to see how to use @file{graph2dot}.
|
||||
|
||||
You can then pass the dot description to the @file{dot} program (from
|
||||
the graphviz suite of programs) and obtain a graphical representation
|
||||
of the filter graph.
|
||||
|
||||
For example the sequence of commands:
|
||||
@example
|
||||
echo @var{GRAPH_DESCRIPTION} | \
|
||||
tools/graph2dot -o graph.tmp && \
|
||||
dot -Tpng graph.tmp -o graph.png && \
|
||||
display graph.png
|
||||
@end example
|
||||
|
||||
can be used to create and display an image representing the graph
|
||||
described by the @var{GRAPH_DESCRIPTION} string.
|
||||
|
||||
@include filters.texi
|
||||
|
||||
@bye
|
@@ -1,68 +0,0 @@
|
||||
@chapter Metadata
|
||||
@c man begin METADATA
|
||||
|
||||
FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
|
||||
INI-like text file and then load it back using the metadata muxer/demuxer.
|
||||
|
||||
The file format is as follows:
|
||||
@enumerate
|
||||
|
||||
@item
|
||||
A file consists of a header and a number of metadata tags divided into sections,
|
||||
each on its own line.
|
||||
|
||||
@item
|
||||
The header is a ';FFMETADATA' string, followed by a version number (now 1).
|
||||
|
||||
@item
|
||||
Metadata tags are of the form 'key=value'
|
||||
|
||||
@item
|
||||
Immediately after header follows global metadata
|
||||
|
||||
@item
|
||||
After global metadata there may be sections with per-stream/per-chapter
|
||||
metadata.
|
||||
|
||||
@item
|
||||
A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
|
||||
brackets ('[', ']') and ends with next section or end of file.
|
||||
|
||||
@item
|
||||
At the beginning of a chapter section there may be an optional timebase to be
|
||||
used for start/end values. It must be in form 'TIMEBASE=num/den', where num and
|
||||
den are integers. If the timebase is missing then start/end times are assumed to
|
||||
be in milliseconds.
|
||||
Next a chapter section must contain chapter start and end times in form
|
||||
'START=num', 'END=num', where num is a positive integer.
|
||||
|
||||
@item
|
||||
Empty lines and lines starting with ';' or '#' are ignored.
|
||||
|
||||
@item
|
||||
Metadata keys or values containing special characters ('=', ';', '#', '\' and a
|
||||
newline) must be escaped with a backslash '\'.
|
||||
|
||||
@item
|
||||
Note that whitespace in metadata (e.g. foo = bar) is considered to be a part of
|
||||
the tag (in the example above key is 'foo ', value is ' bar').
|
||||
@end enumerate
|
||||
|
||||
A ffmetadata file might look like this:
|
||||
@example
|
||||
;FFMETADATA1
|
||||
title=bike\\shed
|
||||
;this is a comment
|
||||
artist=FFmpeg troll team
|
||||
|
||||
[CHAPTER]
|
||||
TIMEBASE=1/1000
|
||||
START=0
|
||||
#chapter ends at 0:01:00
|
||||
END=60000
|
||||
title=chapter \#1
|
||||
[STREAM]
|
||||
title=multi\
|
||||
line
|
||||
@end example
|
||||
@c man end METADATA
|
@@ -1,65 +0,0 @@
|
||||
FFmpeg multithreading methods
|
||||
==============================================
|
||||
|
||||
FFmpeg provides two methods for multithreading codecs.
|
||||
|
||||
Slice threading decodes multiple parts of a frame at the same time, using
|
||||
AVCodecContext execute() and execute2().
|
||||
|
||||
Frame threading decodes multiple frames at the same time.
|
||||
It accepts N future frames and delays decoded pictures by N-1 frames.
|
||||
The later frames are decoded in separate threads while the user is
|
||||
displaying the current one.
|
||||
|
||||
Restrictions on clients
|
||||
==============================================
|
||||
|
||||
Slice threading -
|
||||
* The client's draw_horiz_band() must be thread-safe according to the comment
|
||||
in avcodec.h.
|
||||
|
||||
Frame threading -
|
||||
* Restrictions with slice threading also apply.
|
||||
* For best performance, the client should set thread_safe_callbacks if it
|
||||
provides a thread-safe get_buffer() callback.
|
||||
* There is one frame of delay added for every thread beyond the first one.
|
||||
Clients must be able to handle this; the pkt_dts and pkt_pts fields in
|
||||
AVFrame will work as usual.
|
||||
|
||||
Restrictions on codec implementations
|
||||
==============================================
|
||||
|
||||
Slice threading -
|
||||
None except that there must be something worth executing in parallel.
|
||||
|
||||
Frame threading -
|
||||
* Codecs can only accept entire pictures per packet.
|
||||
* Codecs similar to ffv1, whose streams don't reset across frames,
|
||||
will not work because their bitstreams cannot be decoded in parallel.
|
||||
|
||||
* The contents of buffers must not be read before ff_thread_await_progress()
|
||||
has been called on them. reget_buffer() and buffer age optimizations no longer work.
|
||||
* The contents of buffers must not be written to after ff_thread_report_progress()
|
||||
has been called on them. This includes draw_edges().
|
||||
|
||||
Porting codecs to frame threading
|
||||
==============================================
|
||||
|
||||
Find all context variables that are needed by the next frame. Move all
|
||||
code changing them, as well as code calling get_buffer(), up to before
|
||||
the decode process starts. Call ff_thread_finish_setup() afterwards. If
|
||||
some code can't be moved, have update_thread_context() run it in the next
|
||||
thread.
|
||||
|
||||
If the codec allocates writable tables in its init(), add an init_thread_copy()
|
||||
which re-allocates them for other threads.
|
||||
|
||||
Add CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little
|
||||
speed gain at this point but it should work.
|
||||
|
||||
Call ff_thread_report_progress() after some part of the current picture has decoded.
|
||||
A good place to put this is where draw_horiz_band() is called - add this if it isn't
|
||||
called anywhere, as it's useful too and the implementation is trivial when you're
|
||||
doing this. Note that draw_edges() needs to be called before reporting progress.
|
||||
|
||||
Before accessing a reference frame or its MVs, call ff_thread_await_progress().
|
276
doc/muxers.texi
276
doc/muxers.texi
@@ -1,276 +0,0 @@
|
||||
@chapter Muxers
|
||||
@c man begin MUXERS
|
||||
|
||||
Muxers are configured elements in FFmpeg which allow writing
|
||||
multimedia streams to a particular type of file.
|
||||
|
||||
When you configure your FFmpeg build, all the supported muxers
|
||||
are enabled by default. You can list all available muxers using the
|
||||
configure option @code{--list-muxers}.
|
||||
|
||||
You can disable all the muxers with the configure option
|
||||
@code{--disable-muxers} and selectively enable / disable single muxers
|
||||
with the options @code{--enable-muxer=@var{MUXER}} /
|
||||
@code{--disable-muxer=@var{MUXER}}.
|
||||
|
||||
The option @code{-formats} of the ff* tools will display the list of
|
||||
enabled muxers.
|
||||
|
||||
A description of some of the currently available muxers follows.
|
||||
|
||||
@anchor{crc}
|
||||
@section crc
|
||||
|
||||
CRC (Cyclic Redundancy Check) testing format.
|
||||
|
||||
This muxer computes and prints the Adler-32 CRC of all the input audio
|
||||
and video frames. By default audio frames are converted to signed
|
||||
16-bit raw audio and video frames to raw video before computing the
|
||||
CRC.
|
||||
|
||||
The output of the muxer consists of a single line of the form:
|
||||
CRC=0x@var{CRC}, where @var{CRC} is a hexadecimal number 0-padded to
|
||||
8 digits containing the CRC for all the decoded input frames.
|
||||
|
||||
For example to compute the CRC of the input, and store it in the file
|
||||
@file{out.crc}:
|
||||
@example
|
||||
ffmpeg -i INPUT -f crc out.crc
|
||||
@end example
|
||||
|
||||
You can print the CRC to stdout with the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -f crc -
|
||||
@end example
|
||||
|
||||
You can select the output format of each frame with @file{ffmpeg} by
|
||||
specifying the audio and video codec and format. For example to
|
||||
compute the CRC of the input audio converted to PCM unsigned 8-bit
|
||||
and the input video converted to MPEG-2 video, use the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
|
||||
@end example
|
||||
|
||||
See also the @code{framecrc} muxer (@pxref{framecrc}).
|
||||
|
||||
@anchor{framecrc}
|
||||
@section framecrc
|
||||
|
||||
Per-frame CRC (Cyclic Redundancy Check) testing format.
|
||||
|
||||
This muxer computes and prints the Adler-32 CRC for each decoded audio
|
||||
and video frame. By default audio frames are converted to signed
|
||||
16-bit raw audio and video frames to raw video before computing the
|
||||
CRC.
|
||||
|
||||
The output of the muxer consists of a line for each audio and video
|
||||
frame of the form: @var{stream_index}, @var{frame_dts},
|
||||
@var{frame_size}, 0x@var{CRC}, where @var{CRC} is a hexadecimal
|
||||
number 0-padded to 8 digits containing the CRC of the decoded frame.
|
||||
|
||||
For example to compute the CRC of each decoded frame in the input, and
|
||||
store it in the file @file{out.crc}:
|
||||
@example
|
||||
ffmpeg -i INPUT -f framecrc out.crc
|
||||
@end example
|
||||
|
||||
You can print the CRC of each decoded frame to stdout with the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -f framecrc -
|
||||
@end example
|
||||
|
||||
You can select the output format of each frame with @file{ffmpeg} by
|
||||
specifying the audio and video codec and format. For example, to
|
||||
compute the CRC of each decoded input audio frame converted to PCM
|
||||
unsigned 8-bit and of each decoded input video frame converted to
|
||||
MPEG-2 video, use the command:
|
||||
@example
|
||||
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
|
||||
@end example
|
||||
|
||||
See also the @code{crc} muxer (@pxref{crc}).
|
||||
|
||||
@section image2
|
||||
|
||||
Image file muxer.
|
||||
|
||||
The image file muxer writes video frames to image files.
|
||||
|
||||
The output filenames are specified by a pattern, which can be used to
|
||||
produce sequentially numbered series of files.
|
||||
The pattern may contain the string "%d" or "%0@var{N}d", this string
|
||||
specifies the position of the characters representing a numbering in
|
||||
the filenames. If the form "%0@var{N}d" is used, the string
|
||||
representing the number in each filename is 0-padded to @var{N}
|
||||
digits. The literal character '%' can be specified in the pattern with
|
||||
the string "%%".
|
||||
|
||||
If the pattern contains "%d" or "%0@var{N}d", the first filename of
|
||||
the file list specified will contain the number 1, all the following
|
||||
numbers will be sequential.
|
||||
|
||||
The pattern may contain a suffix which is used to automatically
|
||||
determine the format of the image files to write.
|
||||
|
||||
For example the pattern "img-%03d.bmp" will specify a sequence of
|
||||
filenames of the form @file{img-001.bmp}, @file{img-002.bmp}, ...,
|
||||
@file{img-010.bmp}, etc.
|
||||
The pattern "img%%-%d.jpg" will specify a sequence of filenames of the
|
||||
form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg},
|
||||
etc.
|
||||
|
||||
The following example shows how to use @file{ffmpeg} for creating a
|
||||
sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ...,
|
||||
taking one image every second from the input video:
|
||||
@example
|
||||
ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
|
||||
@end example
|
||||
|
||||
Note that with @file{ffmpeg}, if the format is not specified with the
|
||||
@code{-f} option and the output filename specifies an image file
|
||||
format, the image2 muxer is automatically selected, so the previous
|
||||
command can be written as:
|
||||
@example
|
||||
ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
|
||||
@end example
|
||||
|
||||
Note also that the pattern must not necessarily contain "%d" or
|
||||
"%0@var{N}d", for example to create a single image file
|
||||
@file{img.jpeg} from the input video you can employ the command:
|
||||
@example
|
||||
ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
|
||||
@end example
|
||||
|
||||
The image muxer supports the .Y.U.V image file format. This format is
|
||||
special in that that each image frame consists of three files, for
|
||||
each of the YUV420P components. To read or write this image file format,
|
||||
specify the name of the '.Y' file. The muxer will automatically open the
|
||||
'.U' and '.V' files as required.
|
||||
|
||||
@section mpegts
|
||||
|
||||
MPEG transport stream muxer.
|
||||
|
||||
This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
|
||||
|
||||
The muxer options are:
|
||||
|
||||
@table @option
|
||||
@item -mpegts_original_network_id @var{number}
|
||||
Set the original_network_id (default 0x0001). This is unique identifier
|
||||
of a network in DVB. Its main use is in the unique identification of a
|
||||
service through the path Original_Network_ID, Transport_Stream_ID.
|
||||
@item -mpegts_transport_stream_id @var{number}
|
||||
Set the transport_stream_id (default 0x0001). This identifies a
|
||||
transponder in DVB.
|
||||
@item -mpegts_service_id @var{number}
|
||||
Set the service_id (default 0x0001) also known as program in DVB.
|
||||
@item -mpegts_pmt_start_pid @var{number}
|
||||
Set the first PID for PMT (default 0x1000, max 0x1f00).
|
||||
@item -mpegts_start_pid @var{number}
|
||||
Set the first PID for data packets (default 0x0100, max 0x0f00).
|
||||
@end table
|
||||
|
||||
The recognized metadata settings in mpegts muxer are @code{service_provider}
|
||||
and @code{service_name}. If they are not set the default for
|
||||
@code{service_provider} is "FFmpeg" and the default for
|
||||
@code{service_name} is "Service01".
|
||||
|
||||
@example
|
||||
ffmpeg -i file.mpg -acodec copy -vcodec copy \
|
||||
-mpegts_original_network_id 0x1122 \
|
||||
-mpegts_transport_stream_id 0x3344 \
|
||||
-mpegts_service_id 0x5566 \
|
||||
-mpegts_pmt_start_pid 0x1500 \
|
||||
-mpegts_start_pid 0x150 \
|
||||
-metadata service_provider="Some provider" \
|
||||
-metadata service_name="Some Channel" \
|
||||
-y out.ts
|
||||
@end example
|
||||
|
||||
@section null
|
||||
|
||||
Null muxer.
|
||||
|
||||
This muxer does not generate any output file, it is mainly useful for
|
||||
testing or benchmarking purposes.
|
||||
|
||||
For example to benchmark decoding with @file{ffmpeg} you can use the
|
||||
command:
|
||||
@example
|
||||
ffmpeg -benchmark -i INPUT -f null out.null
|
||||
@end example
|
||||
|
||||
Note that the above command does not read or write the @file{out.null}
|
||||
file, but specifying the output file is required by the @file{ffmpeg}
|
||||
syntax.
|
||||
|
||||
Alternatively you can write the command as:
|
||||
@example
|
||||
ffmpeg -benchmark -i INPUT -f null -
|
||||
@end example
|
||||
|
||||
@section matroska
|
||||
|
||||
Matroska container muxer.
|
||||
|
||||
This muxer implements the matroska and webm container specs.
|
||||
|
||||
The recognized metadata settings in this muxer are:
|
||||
|
||||
@table @option
|
||||
|
||||
@item title=@var{title name}
|
||||
Name provided to a single track
|
||||
@end table
|
||||
|
||||
@table @option
|
||||
|
||||
@item language=@var{language name}
|
||||
Specifies the language of the track in the Matroska languages form
|
||||
@end table
|
||||
|
||||
@table @option
|
||||
|
||||
@item stereo_mode=@var{mode}
|
||||
Stereo 3D video layout of two views in a single video track
|
||||
@table @option
|
||||
@item mono
|
||||
video is not stereo
|
||||
@item left_right
|
||||
Both views are arranged side by side, Left-eye view is on the left
|
||||
@item bottom_top
|
||||
Both views are arranged in top-bottom orientation, Left-eye view is at bottom
|
||||
@item top_bottom
|
||||
Both views are arranged in top-bottom orientation, Left-eye view is on top
|
||||
@item checkerboard_rl
|
||||
Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
|
||||
@item checkerboard_lr
|
||||
Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
|
||||
@item row_interleaved_rl
|
||||
Each view is constituted by a row based interleaving, Right-eye view is first row
|
||||
@item row_interleaved_lr
|
||||
Each view is constituted by a row based interleaving, Left-eye view is first row
|
||||
@item col_interleaved_rl
|
||||
Both views are arranged in a column based interleaving manner, Right-eye view is first column
|
||||
@item col_interleaved_lr
|
||||
Both views are arranged in a column based interleaving manner, Left-eye view is first column
|
||||
@item anaglyph_cyan_red
|
||||
All frames are in anaglyph format viewable through red-cyan filters
|
||||
@item right_left
|
||||
Both views are arranged side by side, Right-eye view is on the left
|
||||
@item anaglyph_green_magenta
|
||||
All frames are in anaglyph format viewable through green-magenta filters
|
||||
@item block_lr
|
||||
Both eyes laced in one Block, Left-eye view is first
|
||||
@item block_rl
|
||||
Both eyes laced in one Block, Right-eye view is first
|
||||
@end table
|
||||
@end table
|
||||
|
||||
For example a 3D WebM clip can be created using the following command line:
|
||||
@example
|
||||
ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
||||
@end example
|
||||
|
||||
@c man end MUXERS
|
@@ -17,15 +17,15 @@ Understanding these overoptimized functions:
|
||||
As many functions tend to be a bit difficult to understand because
|
||||
of optimizations, it can be hard to optimize them further, or write
|
||||
architecture-specific versions. It is recommended to look at older
|
||||
revisions of the interesting files (web frontends for the various FFmpeg
|
||||
branches are listed at http://ffmpeg.org/download.html).
|
||||
revisions of the interesting files (for a web frontend try ViewVC at
|
||||
http://svn.ffmpeg.org/ffmpeg/trunk/).
|
||||
Alternatively, look into the other architecture-specific versions in
|
||||
the x86/, ppc/, alpha/ subdirectories. Even if you don't exactly
|
||||
comprehend the instructions, it could help understanding the functions
|
||||
and how they can be optimized.
|
||||
|
||||
NOTE: If you still don't understand some function, ask at our mailing list!!!
|
||||
(http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel)
|
||||
(http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel)
|
||||
|
||||
|
||||
When is an optimization justified?
|
||||
@@ -157,68 +157,15 @@ Use asm loops like:
|
||||
__asm__(
|
||||
"1: ....
|
||||
...
|
||||
"jump_instruction ....
|
||||
"jump_instruciton ....
|
||||
Do not use C loops:
|
||||
do{
|
||||
__asm__(
|
||||
...
|
||||
}while()
|
||||
|
||||
For x86, mark registers that are clobbered in your asm. This means both
|
||||
general x86 registers (e.g. eax) as well as XMM registers. This last one is
|
||||
particularly important on Win64, where xmm6-15 are callee-save, and not
|
||||
restoring their contents leads to undefined results. In external asm (e.g.
|
||||
yasm), you do this by using:
|
||||
cglobal functon_name, num_args, num_regs, num_xmm_regs
|
||||
In inline asm, you specify clobbered registers at the end of your asm:
|
||||
__asm__(".." ::: "%eax").
|
||||
If gcc is not set to support sse (-msse) it will not accept xmm registers
|
||||
in the clobber list. For that we use two macros to declare the clobbers.
|
||||
XMM_CLOBBERS should be used when there are other clobbers, for example:
|
||||
__asm__(".." ::: XMM_CLOBBERS("xmm0",) "eax");
|
||||
and XMM_CLOBBERS_ONLY should be used when the only clobbers are xmm registers:
|
||||
__asm__(".." :: XMM_CLOBBERS_ONLY("xmm0"));
|
||||
|
||||
Do not expect a compiler to maintain values in your registers between separate
|
||||
(inline) asm code blocks. It is not required to. For example, this is bad:
|
||||
__asm__("movdqa %0, %%xmm7" : src);
|
||||
/* do something */
|
||||
__asm__("movdqa %%xmm7, %1" : dst);
|
||||
- first of all, you're assuming that the compiler will not use xmm7 in
|
||||
between the two asm blocks. It probably won't when you test it, but it's
|
||||
a poor assumption that will break at some point for some --cpu compiler flag
|
||||
- secondly, you didn't mark xmm7 as clobbered. If you did, the compiler would
|
||||
have restored the original value of xmm7 after the first asm block, thus
|
||||
rendering the combination of the two blocks of code invalid
|
||||
Code that depends on data in registries being untouched, should be written as
|
||||
a single __asm__() statement. Ideally, a single function contains only one
|
||||
__asm__() block.
|
||||
|
||||
Use external asm (nasm/yasm) or inline asm (__asm__()), do not use intrinsics.
|
||||
The latter requires a good optimizing compiler which gcc is not.
|
||||
|
||||
Inline asm vs. external asm
|
||||
---------------------------
|
||||
Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc)
|
||||
and external asm (.s or .asm files, handled by an assembler such as yasm/nasm)
|
||||
are accepted in FFmpeg. Which one to use differs per specific case.
|
||||
|
||||
- if your code is intended to be inlined in a C function, inline asm is always
|
||||
better, because external asm cannot be inlined
|
||||
- if your code calls external functions, yasm is always better
|
||||
- if your code takes huge and complex structs as function arguments (e.g.
|
||||
MpegEncContext; note that this is not ideal and is discouraged if there
|
||||
are alternatives), then inline asm is always better, because predicting
|
||||
member offsets in complex structs is almost impossible. It's safest to let
|
||||
the compiler take care of that
|
||||
- in many cases, both can be used and it just depends on the preference of the
|
||||
person writing the asm. For new asm, the choice is up to you. For existing
|
||||
asm, you'll likely want to maintain whatever form it is currently in unless
|
||||
there is a good reason to change it.
|
||||
- if, for some reason, you believe that a particular chunk of existing external
|
||||
asm could be improved upon further if written in inline asm (or the other
|
||||
way around), then please make the move from external asm <-> inline asm a
|
||||
separate patch before your patches that actually improve the asm.
|
||||
Use __asm__() instead of intrinsics. The latter requires a good optimizing compiler
|
||||
which gcc is not.
|
||||
|
||||
|
||||
Links:
|
||||
|
@@ -1,73 +0,0 @@
|
||||
@chapter Output Devices
|
||||
@c man begin OUTPUT DEVICES
|
||||
|
||||
Output devices are configured elements in FFmpeg which allow to write
|
||||
multimedia data to an output device attached to your system.
|
||||
|
||||
When you configure your FFmpeg build, all the supported output devices
|
||||
are enabled by default. You can list all available ones using the
|
||||
configure option "--list-outdevs".
|
||||
|
||||
You can disable all the output devices using the configure option
|
||||
"--disable-outdevs", and selectively enable an output device using the
|
||||
option "--enable-outdev=@var{OUTDEV}", or you can disable a particular
|
||||
input device using the option "--disable-outdev=@var{OUTDEV}".
|
||||
|
||||
The option "-formats" of the ff* tools will display the list of
|
||||
enabled output devices (amongst the muxers).
|
||||
|
||||
A description of the currently available output devices follows.
|
||||
|
||||
@section alsa
|
||||
|
||||
ALSA (Advanced Linux Sound Architecture) output device.
|
||||
|
||||
@section oss
|
||||
|
||||
OSS (Open Sound System) output device.
|
||||
|
||||
@section sdl
|
||||
|
||||
SDL (Simple Directmedia Layer) output device.
|
||||
|
||||
This output devices allows to show a video stream in an SDL
|
||||
window. Only one SDL window is allowed per application, so you can
|
||||
have only one instance of this output device in an application.
|
||||
|
||||
To enable this output device you need libsdl installed on your system
|
||||
when configuring your build.
|
||||
|
||||
For more information about SDL, check:
|
||||
@url{http://www.libsdl.org/}
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item window_title
|
||||
Set the SDL window title, if not specified default to the filename
|
||||
specified for the output device.
|
||||
|
||||
@item icon_title
|
||||
Set the name of the iconified SDL window, if not specified it is set
|
||||
to the same value of @var{window_title}.
|
||||
|
||||
@item window_size
|
||||
Set the SDL window size, can be a string of the form
|
||||
@var{width}x@var{height} or a video size abbreviation.
|
||||
If not specified it defaults to the size of the input video.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
||||
The following command shows the @file{ffmpeg} output is an
|
||||
SDL window, forcing its size to the qcif format:
|
||||
@example
|
||||
ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
|
||||
@end example
|
||||
|
||||
@section sndio
|
||||
|
||||
sndio audio output device.
|
||||
|
||||
@c man end OUTPUT DEVICES
|
@@ -1,480 +0,0 @@
|
||||
@chapter Protocols
|
||||
@c man begin PROTOCOLS
|
||||
|
||||
Protocols are configured elements in FFmpeg which allow to access
|
||||
resources which require the use of a particular protocol.
|
||||
|
||||
When you configure your FFmpeg build, all the supported protocols are
|
||||
enabled by default. You can list all available ones using the
|
||||
configure option "--list-protocols".
|
||||
|
||||
You can disable all the protocols using the configure option
|
||||
"--disable-protocols", and selectively enable a protocol using the
|
||||
option "--enable-protocol=@var{PROTOCOL}", or you can disable a
|
||||
particular protocol using the option
|
||||
"--disable-protocol=@var{PROTOCOL}".
|
||||
|
||||
The option "-protocols" of the ff* tools will display the list of
|
||||
supported protocols.
|
||||
|
||||
A description of the currently available protocols follows.
|
||||
|
||||
@section applehttp
|
||||
|
||||
Read Apple HTTP Live Streaming compliant segmented stream as
|
||||
a uniform one. The M3U8 playlists describing the segments can be
|
||||
remote HTTP resources or local files, accessed using the standard
|
||||
file protocol.
|
||||
HTTP is default, specific protocol can be declared by specifying
|
||||
"+@var{proto}" after the applehttp URI scheme name, where @var{proto}
|
||||
is either "file" or "http".
|
||||
|
||||
@example
|
||||
applehttp://host/path/to/remote/resource.m3u8
|
||||
applehttp+http://host/path/to/remote/resource.m3u8
|
||||
applehttp+file://path/to/local/resource.m3u8
|
||||
@end example
|
||||
|
||||
@section concat
|
||||
|
||||
Physical concatenation protocol.
|
||||
|
||||
Allow to read and seek from many resource in sequence as if they were
|
||||
a unique resource.
|
||||
|
||||
A URL accepted by this protocol has the syntax:
|
||||
@example
|
||||
concat:@var{URL1}|@var{URL2}|...|@var{URLN}
|
||||
@end example
|
||||
|
||||
where @var{URL1}, @var{URL2}, ..., @var{URLN} are the urls of the
|
||||
resource to be concatenated, each one possibly specifying a distinct
|
||||
protocol.
|
||||
|
||||
For example to read a sequence of files @file{split1.mpeg},
|
||||
@file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the
|
||||
command:
|
||||
@example
|
||||
ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
||||
@end example
|
||||
|
||||
Note that you may need to escape the character "|" which is special for
|
||||
many shells.
|
||||
|
||||
@section file
|
||||
|
||||
File access protocol.
|
||||
|
||||
Allow to read from or read to a file.
|
||||
|
||||
For example to read from a file @file{input.mpeg} with @file{ffmpeg}
|
||||
use the command:
|
||||
@example
|
||||
ffmpeg -i file:input.mpeg output.mpeg
|
||||
@end example
|
||||
|
||||
The ff* tools default to the file protocol, that is a resource
|
||||
specified with the name "FILE.mpeg" is interpreted as the URL
|
||||
"file:FILE.mpeg".
|
||||
|
||||
@section gopher
|
||||
|
||||
Gopher protocol.
|
||||
|
||||
@section http
|
||||
|
||||
HTTP (Hyper Text Transfer Protocol).
|
||||
|
||||
@section mmst
|
||||
|
||||
MMS (Microsoft Media Server) protocol over TCP.
|
||||
|
||||
@section mmsh
|
||||
|
||||
MMS (Microsoft Media Server) protocol over HTTP.
|
||||
|
||||
The required syntax is:
|
||||
@example
|
||||
mmsh://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
|
||||
@end example
|
||||
|
||||
@section md5
|
||||
|
||||
MD5 output protocol.
|
||||
|
||||
Computes the MD5 hash of the data to be written, and on close writes
|
||||
this to the designated output or stdout if none is specified. It can
|
||||
be used to test muxers without writing an actual file.
|
||||
|
||||
Some examples follow.
|
||||
@example
|
||||
# Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
|
||||
ffmpeg -i input.flv -f avi -y md5:output.avi.md5
|
||||
|
||||
# Write the MD5 hash of the encoded AVI file to stdout.
|
||||
ffmpeg -i input.flv -f avi -y md5:
|
||||
@end example
|
||||
|
||||
Note that some formats (typically MOV) require the output protocol to
|
||||
be seekable, so they will fail with the MD5 output protocol.
|
||||
|
||||
@section pipe
|
||||
|
||||
UNIX pipe access protocol.
|
||||
|
||||
Allow to read and write from UNIX pipes.
|
||||
|
||||
The accepted syntax is:
|
||||
@example
|
||||
pipe:[@var{number}]
|
||||
@end example
|
||||
|
||||
@var{number} is the number corresponding to the file descriptor of the
|
||||
pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number}
|
||||
is not specified, by default the stdout file descriptor will be used
|
||||
for writing, stdin for reading.
|
||||
|
||||
For example to read from stdin with @file{ffmpeg}:
|
||||
@example
|
||||
cat test.wav | ffmpeg -i pipe:0
|
||||
# ...this is the same as...
|
||||
cat test.wav | ffmpeg -i pipe:
|
||||
@end example
|
||||
|
||||
For writing to stdout with @file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
||||
# ...this is the same as...
|
||||
ffmpeg -i test.wav -f avi pipe: | cat > test.avi
|
||||
@end example
|
||||
|
||||
Note that some formats (typically MOV), require the output protocol to
|
||||
be seekable, so they will fail with the pipe output protocol.
|
||||
|
||||
@section rtmp
|
||||
|
||||
Real-Time Messaging Protocol.
|
||||
|
||||
The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
|
||||
dia content across a TCP/IP network.
|
||||
|
||||
The required syntax is:
|
||||
@example
|
||||
rtmp://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
|
||||
@end example
|
||||
|
||||
The accepted parameters are:
|
||||
@table @option
|
||||
|
||||
@item server
|
||||
The address of the RTMP server.
|
||||
|
||||
@item port
|
||||
The number of the TCP port to use (by default is 1935).
|
||||
|
||||
@item app
|
||||
It is the name of the application to access. It usually corresponds to
|
||||
the path where the application is installed on the RTMP server
|
||||
(e.g. @file{/ondemand/}, @file{/flash/live/}, etc.).
|
||||
|
||||
@item playpath
|
||||
It is the path or name of the resource to play with reference to the
|
||||
application specified in @var{app}, may be prefixed by "mp4:".
|
||||
|
||||
@end table
|
||||
|
||||
For example to read with @file{ffplay} a multimedia resource named
|
||||
"sample" from the application "vod" from an RTMP server "myserver":
|
||||
@example
|
||||
ffplay rtmp://myserver/vod/sample
|
||||
@end example
|
||||
|
||||
@section rtmp, rtmpe, rtmps, rtmpt, rtmpte
|
||||
|
||||
Real-Time Messaging Protocol and its variants supported through
|
||||
librtmp.
|
||||
|
||||
Requires the presence of the librtmp headers and library during
|
||||
configuration. You need to explicitely configure the build with
|
||||
"--enable-librtmp". If enabled this will replace the native RTMP
|
||||
protocol.
|
||||
|
||||
This protocol provides most client functions and a few server
|
||||
functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
|
||||
encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
|
||||
variants of these encrypted types (RTMPTE, RTMPTS).
|
||||
|
||||
The required syntax is:
|
||||
@example
|
||||
@var{rtmp_proto}://@var{server}[:@var{port}][/@var{app}][/@var{playpath}] @var{options}
|
||||
@end example
|
||||
|
||||
where @var{rtmp_proto} is one of the strings "rtmp", "rtmpt", "rtmpe",
|
||||
"rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
|
||||
@var{server}, @var{port}, @var{app} and @var{playpath} have the same
|
||||
meaning as specified for the RTMP native protocol.
|
||||
@var{options} contains a list of space-separated options of the form
|
||||
@var{key}=@var{val}.
|
||||
|
||||
See the librtmp manual page (man 3 librtmp) for more information.
|
||||
|
||||
For example, to stream a file in real-time to an RTMP server using
|
||||
@file{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
|
||||
@end example
|
||||
|
||||
To play the same stream using @file{ffplay}:
|
||||
@example
|
||||
ffplay "rtmp://myserver/live/mystream live=1"
|
||||
@end example
|
||||
|
||||
@section rtp
|
||||
|
||||
Real-Time Protocol.
|
||||
|
||||
@section rtsp
|
||||
|
||||
RTSP is not technically a protocol handler in libavformat, it is a demuxer
|
||||
and muxer. The demuxer supports both normal RTSP (with data transferred
|
||||
over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
|
||||
data transferred over RDT).
|
||||
|
||||
The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
||||
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
||||
RTSP server, @url{http://github.com/revmischa/rtsp-server}).
|
||||
|
||||
The required syntax for a RTSP url is:
|
||||
@example
|
||||
rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}]
|
||||
@end example
|
||||
|
||||
@var{options} is a @code{&}-separated list. The following options
|
||||
are supported:
|
||||
|
||||
@table @option
|
||||
|
||||
@item udp
|
||||
Use UDP as lower transport protocol.
|
||||
|
||||
@item tcp
|
||||
Use TCP (interleaving within the RTSP control channel) as lower
|
||||
transport protocol.
|
||||
|
||||
@item multicast
|
||||
Use UDP multicast as lower transport protocol.
|
||||
|
||||
@item http
|
||||
Use HTTP tunneling as lower transport protocol, which is useful for
|
||||
passing proxies.
|
||||
|
||||
@item filter_src
|
||||
Accept packets only from negotiated peer address and port.
|
||||
@end table
|
||||
|
||||
Multiple lower transport protocols may be specified, in that case they are
|
||||
tried one at a time (if the setup of one fails, the next one is tried).
|
||||
For the muxer, only the @code{tcp} and @code{udp} options are supported.
|
||||
|
||||
When receiving data over UDP, the demuxer tries to reorder received packets
|
||||
(since they may arrive out of order, or packets may get lost totally). In
|
||||
order for this to be enabled, a maximum delay must be specified in the
|
||||
@code{max_delay} field of AVFormatContext.
|
||||
|
||||
When watching multi-bitrate Real-RTSP streams with @file{ffplay}, the
|
||||
streams to display can be chosen with @code{-vst} @var{n} and
|
||||
@code{-ast} @var{n} for video and audio respectively, and can be switched
|
||||
on the fly by pressing @code{v} and @code{a}.
|
||||
|
||||
Example command lines:
|
||||
|
||||
To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
|
||||
|
||||
@example
|
||||
ffplay -max_delay 500000 rtsp://server/video.mp4?udp
|
||||
@end example
|
||||
|
||||
To watch a stream tunneled over HTTP:
|
||||
|
||||
@example
|
||||
ffplay rtsp://server/video.mp4?http
|
||||
@end example
|
||||
|
||||
To send a stream in realtime to a RTSP server, for others to watch:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
|
||||
@end example
|
||||
|
||||
@section sap
|
||||
|
||||
Session Announcement Protocol (RFC 2974). This is not technically a
|
||||
protocol handler in libavformat, it is a muxer and demuxer.
|
||||
It is used for signalling of RTP streams, by announcing the SDP for the
|
||||
streams regularly on a separate port.
|
||||
|
||||
@subsection Muxer
|
||||
|
||||
The syntax for a SAP url given to the muxer is:
|
||||
@example
|
||||
sap://@var{destination}[:@var{port}][?@var{options}]
|
||||
@end example
|
||||
|
||||
The RTP packets are sent to @var{destination} on port @var{port},
|
||||
or to port 5004 if no port is specified.
|
||||
@var{options} is a @code{&}-separated list. The following options
|
||||
are supported:
|
||||
|
||||
@table @option
|
||||
|
||||
@item announce_addr=@var{address}
|
||||
Specify the destination IP address for sending the announcements to.
|
||||
If omitted, the announcements are sent to the commonly used SAP
|
||||
announcement multicast address 224.2.127.254 (sap.mcast.net), or
|
||||
ff0e::2:7ffe if @var{destination} is an IPv6 address.
|
||||
|
||||
@item announce_port=@var{port}
|
||||
Specify the port to send the announcements on, defaults to
|
||||
9875 if not specified.
|
||||
|
||||
@item ttl=@var{ttl}
|
||||
Specify the time to live value for the announcements and RTP packets,
|
||||
defaults to 255.
|
||||
|
||||
@item same_port=@var{0|1}
|
||||
If set to 1, send all RTP streams on the same port pair. If zero (the
|
||||
default), all streams are sent on unique ports, with each stream on a
|
||||
port 2 numbers higher than the previous.
|
||||
VLC/Live555 requires this to be set to 1, to be able to receive the stream.
|
||||
The RTP stack in libavformat for receiving requires all streams to be sent
|
||||
on unique ports.
|
||||
@end table
|
||||
|
||||
Example command lines follow.
|
||||
|
||||
To broadcast a stream on the local subnet, for watching in VLC:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
|
||||
@end example
|
||||
|
||||
Similarly, for watching in ffplay:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255
|
||||
@end example
|
||||
|
||||
And for watching in ffplay, over IPv6:
|
||||
|
||||
@example
|
||||
ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
|
||||
@end example
|
||||
|
||||
@subsection Demuxer
|
||||
|
||||
The syntax for a SAP url given to the demuxer is:
|
||||
@example
|
||||
sap://[@var{address}][:@var{port}]
|
||||
@end example
|
||||
|
||||
@var{address} is the multicast address to listen for announcements on,
|
||||
if omitted, the default 224.2.127.254 (sap.mcast.net) is used. @var{port}
|
||||
is the port that is listened on, 9875 if omitted.
|
||||
|
||||
The demuxers listens for announcements on the given address and port.
|
||||
Once an announcement is received, it tries to receive that particular stream.
|
||||
|
||||
Example command lines follow.
|
||||
|
||||
To play back the first stream announced on the normal SAP multicast address:
|
||||
|
||||
@example
|
||||
ffplay sap://
|
||||
@end example
|
||||
|
||||
To play back the first stream announced on one the default IPv6 SAP multicast address:
|
||||
|
||||
@example
|
||||
ffplay sap://[ff0e::2:7ffe]
|
||||
@end example
|
||||
|
||||
@section tcp
|
||||
|
||||
Trasmission Control Protocol.
|
||||
|
||||
The required syntax for a TCP url is:
|
||||
@example
|
||||
tcp://@var{hostname}:@var{port}[?@var{options}]
|
||||
@end example
|
||||
|
||||
@table @option
|
||||
|
||||
@item listen
|
||||
Listen for an incoming connection
|
||||
|
||||
@example
|
||||
ffmpeg -i @var{input} -f @var{format} tcp://@var{hostname}:@var{port}?listen
|
||||
ffplay tcp://@var{hostname}:@var{port}
|
||||
@end example
|
||||
|
||||
@end table
|
||||
|
||||
@section udp
|
||||
|
||||
User Datagram Protocol.
|
||||
|
||||
The required syntax for a UDP url is:
|
||||
@example
|
||||
udp://@var{hostname}:@var{port}[?@var{options}]
|
||||
@end example
|
||||
|
||||
@var{options} contains a list of &-seperated options of the form @var{key}=@var{val}.
|
||||
Follow the list of supported options.
|
||||
|
||||
@table @option
|
||||
|
||||
@item buffer_size=@var{size}
|
||||
set the UDP buffer size in bytes
|
||||
|
||||
@item localport=@var{port}
|
||||
override the local UDP port to bind with
|
||||
|
||||
@item pkt_size=@var{size}
|
||||
set the size in bytes of UDP packets
|
||||
|
||||
@item reuse=@var{1|0}
|
||||
explicitly allow or disallow reusing UDP sockets
|
||||
|
||||
@item ttl=@var{ttl}
|
||||
set the time to live value (for multicast only)
|
||||
|
||||
@item connect=@var{1|0}
|
||||
Initialize the UDP socket with @code{connect()}. In this case, the
|
||||
destination address can't be changed with ff_udp_set_remote_url later.
|
||||
If the destination address isn't known at the start, this option can
|
||||
be specified in ff_udp_set_remote_url, too.
|
||||
This allows finding out the source address for the packets with getsockname,
|
||||
and makes writes return with AVERROR(ECONNREFUSED) if "destination
|
||||
unreachable" is received.
|
||||
For receiving, this gives the benefit of only receiving packets from
|
||||
the specified peer address/port.
|
||||
@end table
|
||||
|
||||
Some usage examples of the udp protocol with @file{ffmpeg} follow.
|
||||
|
||||
To stream over UDP to a remote endpoint:
|
||||
@example
|
||||
ffmpeg -i @var{input} -f @var{format} udp://@var{hostname}:@var{port}
|
||||
@end example
|
||||
|
||||
To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
|
||||
@example
|
||||
ffmpeg -i @var{input} -f mpegts udp://@var{hostname}:@var{port}?pkt_size=188&buffer_size=65535
|
||||
@end example
|
||||
|
||||
To receive over UDP from a remote endpoint:
|
||||
@example
|
||||
ffmpeg -i udp://[@var{multicast-address}]:@var{port}
|
||||
@end example
|
||||
|
||||
@c man end PROTOCOLS
|
@@ -1,61 +0,0 @@
|
||||
A Quick Description Of Rate Distortion Theory.
|
||||
|
||||
We want to encode a video, picture or piece of music optimally. What does
|
||||
"optimally" really mean? It means that we want to get the best quality at a
|
||||
given filesize OR we want to get the smallest filesize at a given quality
|
||||
(in practice, these 2 goals are usually the same).
|
||||
|
||||
Solving this directly is not practical; trying all byte sequences 1
|
||||
megabyte in length and selecting the "best looking" sequence will yield
|
||||
256^1000000 cases to try.
|
||||
|
||||
But first, a word about quality, which is also called distortion.
|
||||
Distortion can be quantified by almost any quality measurement one chooses.
|
||||
Commonly, the sum of squared differences is used but more complex methods
|
||||
that consider psychovisual effects can be used as well. It makes no
|
||||
difference in this discussion.
|
||||
|
||||
|
||||
First step: that rate distortion factor called lambda...
|
||||
Let's consider the problem of minimizing:
|
||||
|
||||
distortion + lambda*rate
|
||||
|
||||
rate is the filesize
|
||||
distortion is the quality
|
||||
lambda is a fixed value choosen as a tradeoff between quality and filesize
|
||||
Is this equivalent to finding the best quality for a given max
|
||||
filesize? The answer is yes. For each filesize limit there is some lambda
|
||||
factor for which minimizing above will get you the best quality (using your
|
||||
chosen quality measurement) at the desired (or lower) filesize.
|
||||
|
||||
|
||||
Second step: splitting the problem.
|
||||
Directly splitting the problem of finding the best quality at a given
|
||||
filesize is hard because we do not know how many bits from the total
|
||||
filesize should be allocated to each of the subproblems. But the formula
|
||||
from above:
|
||||
|
||||
distortion + lambda*rate
|
||||
|
||||
can be trivially split. Consider:
|
||||
|
||||
(distortion0 + distortion1) + lambda*(rate0 + rate1)
|
||||
|
||||
This creates a problem made of 2 independent subproblems. The subproblems
|
||||
might be 2 16x16 macroblocks in a frame of 32x16 size. To minimize:
|
||||
|
||||
(distortion0 + distortion1) + lambda*(rate0 + rate1)
|
||||
|
||||
we just have to minimize:
|
||||
|
||||
distortion0 + lambda*rate0
|
||||
|
||||
and
|
||||
|
||||
distortion1 + lambda*rate1
|
||||
|
||||
I.e, the 2 problems can be solved independently.
|
||||
|
||||
Author: Michael Niedermayer
|
||||
Copyright: LGPL
|
@@ -9,14 +9,14 @@ it's a little late for this year's soc (2006).
|
||||
The Goal:
|
||||
Our goal in respect to soc is and must be of course exactly one thing and
|
||||
that is to improve FFmpeg, to reach this goal, code must
|
||||
* conform to the development policy and patch submission guidelines
|
||||
* conform to the svn policy and patch submission guidelines
|
||||
* must improve FFmpeg somehow (faster, smaller, "better",
|
||||
more codecs supported, fewer bugs, cleaner, ...)
|
||||
|
||||
for mentors and other developers to help students to reach that goal it is
|
||||
essential that changes to their codebase are publicly visible, clean and
|
||||
easy reviewable that again leads us to:
|
||||
* use of a revision control system like git
|
||||
* use of a revision control system like svn
|
||||
* separation of cosmetic from non-cosmetic changes (this is almost entirely
|
||||
ignored by mentors and students in soc 2006 which might lead to a suprise
|
||||
when the code will be reviewed at the end before a possible inclusion in
|
||||
|
@@ -30,7 +30,7 @@ slices, that is, consecutive non-overlapping rectangles of dimension
|
||||
|
||||
special converter
|
||||
These generally are unscaled converters of common
|
||||
formats, like YUV 4:2:0/4:2:2 -> RGB12/15/16/24/32. Though it could also
|
||||
formats, like YUV 4:2:0/4:2:2 -> RGB15/16/24/32. Though it could also
|
||||
in principle contain scalers optimized for specific common cases.
|
||||
|
||||
Main path
|
||||
|
24
doc/t2h.init
24
doc/t2h.init
@@ -1,24 +0,0 @@
|
||||
# no horiz rules between sections
|
||||
$end_section = \&FFMPEG_end_section;
|
||||
sub FFMPEG_end_section($$)
|
||||
{
|
||||
}
|
||||
|
||||
$print_page_foot = \&FFMPEG_print_page_foot;
|
||||
sub FFMPEG_print_page_foot($$)
|
||||
{
|
||||
my $fh = shift;
|
||||
print $fh "$SMALL_RULE\n";
|
||||
T2H_DEFAULT_print_page_foot($fh);
|
||||
}
|
||||
|
||||
# no navigation elements
|
||||
$SECTION_NAVIGATION = 0;
|
||||
# the same for texi2html 5.0
|
||||
$HEADERS = 0;
|
||||
|
||||
# TOC and Chapter headings link
|
||||
$TOC_LINKS = 1;
|
||||
|
||||
# print the TOC where @contents is used
|
||||
$INLINE_CONTENTS = 1;
|
@@ -1,70 +0,0 @@
|
||||
Writing a table generator
|
||||
|
||||
This documentation is preliminary.
|
||||
Parts of the API are not good and should be changed.
|
||||
|
||||
Basic concepts
|
||||
|
||||
A table generator consists of two files, *_tablegen.c and *_tablegen.h.
|
||||
The .h file will provide the variable declarations and initialization
|
||||
code for the tables, the .c calls the initialization code and then prints
|
||||
the tables as a header file using the tableprint.h helpers.
|
||||
Both of these files will be compiled for the host system, so to avoid
|
||||
breakage with cross-compilation neither of them may include, directly
|
||||
or indirectly, config.h or avconfig.h.
|
||||
This means that e.g. libavutil/mathematics.h is ok but libavutil/libm.h is not.
|
||||
Due to this, the .c file or Makefile may have to provide additional defines
|
||||
or stubs, though if possible this should be avoided.
|
||||
In particular, CONFIG_HARDCODED_TABLES should always be defined to 0.
|
||||
|
||||
The .c file
|
||||
|
||||
This file should include the *_tablegen.h and tableprint.h files and
|
||||
anything else it needs as long as it does not depend on config.h or
|
||||
avconfig.h.
|
||||
In addition to that it must contain a main() function which initializes
|
||||
all tables by calling the init functions from the .h file and then prints
|
||||
them.
|
||||
The printing code typically looks like this:
|
||||
write_fileheader();
|
||||
printf("static const uint8_t my_array[100] = {\n");
|
||||
write_uint8_t_array(my_array, 100);
|
||||
printf("};\n");
|
||||
|
||||
This is the more generic form, in case you need to do something special.
|
||||
Usually you should instead use the short form:
|
||||
write_fileheader();
|
||||
WRITE_ARRAY("static const", uint8_t, my_array);
|
||||
|
||||
write_fileheader() adds some minor things like a "this is a generated file"
|
||||
comment and some standard includes.
|
||||
tablegen.h defines some write functions for one- and two-dimensional arrays
|
||||
for standard types - they print only the "core" parts so they are easier
|
||||
to reuse for multi-dimensional arrays so the outermost {} must be printed
|
||||
separately.
|
||||
If there's no standard function for printing the type you need, the
|
||||
WRITE_1D_FUNC_ARGV macro is a very quick way to create one.
|
||||
See libavcodec/dv_tablegen.c for an example.
|
||||
|
||||
|
||||
The .h file
|
||||
|
||||
This file should contain:
|
||||
- one or more initialization functions
|
||||
- the table variable declarations
|
||||
If CONFIG_HARDCODED_TABLES is set, the initialization functions should
|
||||
not do anything, and instead of the variable declarations the
|
||||
generated *_tables.h file should be included.
|
||||
Since that will be generated in the build directory, the path must be
|
||||
included, i.e.
|
||||
#include "libavcodec/example_tables.h"
|
||||
not
|
||||
#include "example_tables.h"
|
||||
|
||||
Makefile changes
|
||||
|
||||
To make the automatic table creation work, you must manually declare the
|
||||
new dependency.
|
||||
For this add a line similar to this:
|
||||
$(SUBDIR)example.o: $(SUBDIR)example_tables.h
|
||||
under the "ifdef CONFIG_HARDCODED_TABLES" section in the Makefile.
|
@@ -26,7 +26,6 @@
|
||||
$output = 0;
|
||||
$skipping = 0;
|
||||
%sects = ();
|
||||
@sects_sequence = ();
|
||||
$section = "";
|
||||
@icstack = ();
|
||||
@endwstack = ();
|
||||
@@ -100,21 +99,15 @@ while(<$inf>) {
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@include\s+(.+)$/ and do {
|
||||
push @instack, $inf;
|
||||
$inf = gensym();
|
||||
|
||||
# Try cwd and $ibase.
|
||||
open($inf, "<" . $1)
|
||||
or open($inf, "<" . $ibase . "/" . $1)
|
||||
or die "cannot open $1 or $ibase/$1: $!\n";
|
||||
next;
|
||||
};
|
||||
|
||||
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
||||
# This really oughta be @ifman ... @end ifman and the like, but such
|
||||
# would require rev'ing all other Texinfo translators.
|
||||
/^\@c\s+man\s+begin\s+([A-Za-z ]+)/ and $sect = $1, push (@sects_sequence, $sect), $output = 1, next;
|
||||
/^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
|
||||
$output = 1 if exists $defs{$2};
|
||||
$sect = $1;
|
||||
next;
|
||||
};
|
||||
/^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
|
||||
/^\@c\s+man\s+end/ and do {
|
||||
$sects{$sect} = "" unless exists $sects{$sect};
|
||||
$sects{$sect} .= postprocess($section);
|
||||
@@ -231,18 +224,27 @@ while(<$inf>) {
|
||||
|
||||
# Single line command handlers.
|
||||
|
||||
/^\@(?:section|unnumbered|unnumberedsec|center|heading)\s+(.+)$/
|
||||
/^\@include\s+(.+)$/ and do {
|
||||
push @instack, $inf;
|
||||
$inf = gensym();
|
||||
|
||||
# Try cwd and $ibase.
|
||||
open($inf, "<" . $1)
|
||||
or open($inf, "<" . $ibase . "/" . $1)
|
||||
or die "cannot open $1 or $ibase/$1: $!\n";
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
|
||||
and $_ = "\n=head2 $1\n";
|
||||
/^\@(?:subsection|subheading)\s+(.+)$/
|
||||
/^\@subsection\s+(.+)$/
|
||||
and $_ = "\n=head3 $1\n";
|
||||
/^\@(?:subsubsection|subsubheading)\s+(.+)$/
|
||||
and $_ = "\n=head4 $1\n";
|
||||
|
||||
# Block command handlers:
|
||||
/^\@itemize\s*(\@[a-z]+|\*|-)?/ and do {
|
||||
/^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @icstack, $ic;
|
||||
$ic = $1 ? $1 : "*";
|
||||
$ic = $1;
|
||||
$_ = "\n=over 4\n";
|
||||
$endw = "itemize";
|
||||
};
|
||||
@@ -301,8 +303,8 @@ die "No filename or title\n" unless defined $fn && defined $tl;
|
||||
$sects{NAME} = "$fn \- $tl\n";
|
||||
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
|
||||
|
||||
unshift @sects_sequence, "NAME";
|
||||
for $sect (@sects_sequence) {
|
||||
for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES ENVIRONMENT FILES
|
||||
BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
|
||||
if(exists $sects{$sect}) {
|
||||
$head = $sect;
|
||||
$head =~ s/SEEALSO/SEE ALSO/;
|
||||
@@ -348,7 +350,6 @@ sub postprocess
|
||||
# @* is also impossible in .pod; we discard it and any newline that
|
||||
# follows it. Similarly, our macro @gol must be discarded.
|
||||
|
||||
s/\@anchor{(?:[^\}]*)\}//g;
|
||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||
|
110
doc/viterbi.txt
110
doc/viterbi.txt
@@ -1,110 +0,0 @@
|
||||
This is a quick description of the viterbi aka dynamic programing
|
||||
algorthm.
|
||||
|
||||
Its reason for existence is that wikipedia has become very poor on
|
||||
describing algorithms in a way that makes it useable for understanding
|
||||
them or anything else actually. It tends now to describe the very same
|
||||
algorithm under 50 different names and pages with few understandable
|
||||
by even people who fully understand the algorithm and the theory behind.
|
||||
|
||||
Problem description: (that is what it can solve)
|
||||
assume we have a 2d table, or you could call it a graph or matrix if you
|
||||
prefer
|
||||
|
||||
O O O O O O O
|
||||
|
||||
O O O O O O O
|
||||
|
||||
O O O O O O O
|
||||
|
||||
O O O O O O O
|
||||
|
||||
|
||||
That table has edges connecting points from each column to the next column
|
||||
and each edge has a score like: (only some edge and scores shown to keep it
|
||||
readable)
|
||||
|
||||
|
||||
O--5--O-----O-----O-----O-----O
|
||||
2 / 7 / \ / \ / \ /
|
||||
\ / \ / \ / \ / \ /
|
||||
O7-/--O--/--O--/--O--/--O--/--O
|
||||
\/ \/ 1/ \/ \/ \/ \/ \/ \/ \/
|
||||
/\ /\ 2\ /\ /\ /\ /\ /\ /\ /\
|
||||
O3-/--O--/--O--/--O--/--O--/--O
|
||||
/ \ / \ / \ / \ / \
|
||||
1 \ 9 \ / \ / \ / \
|
||||
O--2--O--1--O--5--O--3--O--8--O
|
||||
|
||||
|
||||
|
||||
Our goal is to find a path from left to right through it which
|
||||
minimizes the sum of the score of all edges.
|
||||
(and of course left/right is just a convention here it could be top down too)
|
||||
Similarly the minimum could be the maximum by just fliping the sign,
|
||||
Example of a path with scores:
|
||||
|
||||
O O O O O O O
|
||||
|
||||
>---O. O O .O-2-O O O
|
||||
5. .7 .
|
||||
O O-1-O O O 8 O O
|
||||
.
|
||||
O O O O O O-1-O---> (sum here is 24)
|
||||
|
||||
|
||||
The viterbi algorthm now solves this simply column by column
|
||||
For the previous column each point has a best path and a associated
|
||||
score:
|
||||
|
||||
O-----5 O
|
||||
\
|
||||
\
|
||||
O \ 1 O
|
||||
\/
|
||||
/\
|
||||
O / 2 O
|
||||
/
|
||||
/
|
||||
O-----2 O
|
||||
|
||||
|
||||
To move one column forward we just need to find the best path and associated
|
||||
scores for the next column
|
||||
here are some edges we could choose from:
|
||||
|
||||
|
||||
O-----5--3--O
|
||||
\ \8
|
||||
\ \
|
||||
O \ 1--9--O
|
||||
\/ \3
|
||||
/\ \
|
||||
O / 2--1--O
|
||||
/ \2
|
||||
/ \
|
||||
O-----2--4--O
|
||||
|
||||
Finding the new best pathes and scores for each point of our new column is
|
||||
trivial given we know the previous column best pathes and scores:
|
||||
|
||||
O-----0-----8
|
||||
\
|
||||
\
|
||||
O \ 0----10
|
||||
\/
|
||||
/\
|
||||
O / 0-----3
|
||||
/ \
|
||||
/ \
|
||||
O 0 4
|
||||
|
||||
|
||||
the viterbi algorthm continues exactly like this column for column until the
|
||||
end and then just picks the path with the best score (above that would be the
|
||||
one with score 3)
|
||||
|
||||
|
||||
Author: Michael niedermayer
|
||||
Copyright LGPL
|
||||
|
@@ -1,17 +0,0 @@
|
||||
vcodec=libvpx
|
||||
g=120
|
||||
rc_lookahead=16
|
||||
quality=good
|
||||
speed=0
|
||||
profile=1
|
||||
qmax=51
|
||||
qmin=11
|
||||
slices=4
|
||||
vb=2M
|
||||
|
||||
#ignored unless using -pass 2
|
||||
maxrate=24M
|
||||
minrate=100k
|
||||
arnr_max_frames=7
|
||||
arnr_strength=5
|
||||
arnr_type=3
|
@@ -1,17 +0,0 @@
|
||||
vcodec=libvpx
|
||||
g=120
|
||||
rc_lookahead=25
|
||||
quality=good
|
||||
speed=0
|
||||
profile=1
|
||||
qmax=51
|
||||
qmin=11
|
||||
slices=4
|
||||
vb=2M
|
||||
|
||||
#ignored unless using -pass 2
|
||||
maxrate=24M
|
||||
minrate=100k
|
||||
arnr_max_frames=7
|
||||
arnr_strength=5
|
||||
arnr_type=3
|
@@ -1,16 +0,0 @@
|
||||
vcodec=libvpx
|
||||
g=120
|
||||
rc_lookahead=16
|
||||
quality=good
|
||||
speed=0
|
||||
profile=0
|
||||
qmax=63
|
||||
qmin=0
|
||||
vb=768k
|
||||
|
||||
#ignored unless using -pass 2
|
||||
maxrate=1.5M
|
||||
minrate=40k
|
||||
arnr_max_frames=7
|
||||
arnr_strength=5
|
||||
arnr_type=3
|
@@ -1,17 +0,0 @@
|
||||
vcodec=libvpx
|
||||
g=120
|
||||
rc_lookahead=16
|
||||
quality=good
|
||||
speed=0
|
||||
profile=0
|
||||
qmax=51
|
||||
qmin=11
|
||||
slices=4
|
||||
vb=2M
|
||||
|
||||
#ignored unless using -pass 2
|
||||
maxrate=24M
|
||||
minrate=100k
|
||||
arnr_max_frames=7
|
||||
arnr_strength=5
|
||||
arnr_type=3
|
@@ -1,17 +0,0 @@
|
||||
vcodec=libvpx
|
||||
g=120
|
||||
rc_lookahead=25
|
||||
quality=good
|
||||
speed=0
|
||||
profile=0
|
||||
qmax=51
|
||||
qmin=11
|
||||
slices=4
|
||||
vb=2M
|
||||
|
||||
#ignored unless using -pass 2
|
||||
maxrate=24M
|
||||
minrate=100k
|
||||
arnr_max_frames=7
|
||||
arnr_strength=5
|
||||
arnr_type=3
|
@@ -1,4 +1,4 @@
|
||||
coder=0
|
||||
bf=0
|
||||
flags2=-wpred-dct8x8
|
||||
flags2=-wpred-dct8x8+mbtree
|
||||
wpredp=0
|
||||
|
22
ffpresets/libx264-default.ffpreset
Normal file
22
ffpresets/libx264-default.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
|
||||
me_method=hex
|
||||
subq=7
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=3
|
||||
directpred=1
|
||||
trellis=1
|
||||
flags2=+mixed_refs+wpred+dct8x8+fastpskip+mbtree
|
||||
wpredp=2
|
22
ffpresets/libx264-fastfirstpass.ffpreset
Normal file
22
ffpresets/libx264-fastfirstpass.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
|
||||
me_method=dia
|
||||
subq=2
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=1
|
||||
directpred=3
|
||||
trellis=0
|
||||
flags2=-bpyramid-wpred-mixed_refs-dct8x8+fastpskip+mbtree
|
||||
wpredp=2
|
22
ffpresets/libx264-hq.ffpreset
Normal file
22
ffpresets/libx264-hq.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
|
||||
me_method=umh
|
||||
subq=8
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=2
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=4
|
||||
directpred=3
|
||||
trellis=1
|
||||
flags2=+wpred+mixed_refs+dct8x8+fastpskip+mbtree
|
||||
wpredp=2
|
@@ -1,6 +1,6 @@
|
||||
coder=0
|
||||
bf=0
|
||||
flags2=-wpred-dct8x8
|
||||
flags2=-wpred-dct8x8+mbtree
|
||||
level=13
|
||||
maxrate=768000
|
||||
bufsize=3000000
|
||||
|
@@ -1,7 +1,7 @@
|
||||
coder=0
|
||||
bf=0
|
||||
refs=1
|
||||
flags2=-wpred-dct8x8
|
||||
flags2=-wpred-dct8x8+mbtree
|
||||
level=30
|
||||
maxrate=10000000
|
||||
bufsize=10000000
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=0
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8+parti4x4+partp8x8-partp4x4-partb8x8
|
||||
me_method=hex
|
||||
@@ -11,10 +11,10 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
flags2=+fastpskip+mbtree
|
||||
cqp=0
|
||||
wpredp=0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=esa
|
||||
@@ -11,11 +11,11 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
refs=16
|
||||
directpred=1
|
||||
flags2=+mixed_refs+dct8x8+fastpskip
|
||||
flags2=+mixed_refs+dct8x8+fastpskip+mbtree
|
||||
cqp=0
|
||||
wpredp=2
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=hex
|
||||
@@ -11,10 +11,10 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
flags2=+fastpskip+mbtree
|
||||
cqp=0
|
||||
wpredp=2
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=umh
|
||||
@@ -11,11 +11,11 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
refs=2
|
||||
directpred=1
|
||||
flags2=+dct8x8+fastpskip
|
||||
flags2=+dct8x8+fastpskip+mbtree
|
||||
cqp=0
|
||||
wpredp=2
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=1
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||
me_method=umh
|
||||
@@ -11,11 +11,11 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
refs=4
|
||||
directpred=1
|
||||
flags2=+mixed_refs+dct8x8+fastpskip
|
||||
flags2=+mixed_refs+dct8x8+fastpskip+mbtree
|
||||
cqp=0
|
||||
wpredp=2
|
||||
|
@@ -1,5 +1,5 @@
|
||||
coder=0
|
||||
flags=+loop+cgop
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
|
||||
me_method=dia
|
||||
@@ -11,9 +11,9 @@ sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=0
|
||||
qmax=69
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
directpred=1
|
||||
flags2=+fastpskip
|
||||
flags2=+fastpskip+mbtree
|
||||
cqp=0
|
||||
|
1
ffpresets/libx264-main.ffpreset
Normal file
1
ffpresets/libx264-main.ffpreset
Normal file
@@ -0,0 +1 @@
|
||||
flags2=-dct8x8+mbtree
|
22
ffpresets/libx264-max.ffpreset
Normal file
22
ffpresets/libx264-max.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
|
||||
me_method=tesa
|
||||
subq=10
|
||||
me_range=24
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=2
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=16
|
||||
directpred=3
|
||||
trellis=2
|
||||
flags2=+wpred+mixed_refs+dct8x8-fastpskip+mbtree
|
||||
wpredp=2
|
22
ffpresets/libx264-normal.ffpreset
Normal file
22
ffpresets/libx264-normal.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
|
||||
me_method=hex
|
||||
subq=6
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=1
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=2
|
||||
directpred=3
|
||||
trellis=0
|
||||
flags2=+wpred+dct8x8+fastpskip+mbtree
|
||||
wpredp=2
|
22
ffpresets/libx264-slowfirstpass.ffpreset
Normal file
22
ffpresets/libx264-slowfirstpass.ffpreset
Normal file
@@ -0,0 +1,22 @@
|
||||
coder=1
|
||||
flags=+loop
|
||||
cmp=+chroma
|
||||
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
|
||||
me_method=hex
|
||||
subq=6
|
||||
me_range=16
|
||||
g=250
|
||||
keyint_min=25
|
||||
sc_threshold=40
|
||||
i_qfactor=0.71
|
||||
b_strategy=2
|
||||
qcomp=0.6
|
||||
qmin=10
|
||||
qmax=51
|
||||
qdiff=4
|
||||
bf=3
|
||||
refs=1
|
||||
directpred=3
|
||||
trellis=0
|
||||
flags2=+wpred+dct8x8+fastpskip+mbtree
|
||||
wpredp=2
|
419
ffprobe.c
419
ffprobe.c
@@ -1,419 +0,0 @@
|
||||
/*
|
||||
* ffprobe : Simple Media Prober based on the FFmpeg libraries
|
||||
* Copyright (c) 2007-2010 Stefano Sabatini
|
||||
*
|
||||
* 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 "config.h"
|
||||
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavdevice/avdevice.h"
|
||||
#include "cmdutils.h"
|
||||
|
||||
const char program_name[] = "ffprobe";
|
||||
const int program_birth_year = 2007;
|
||||
|
||||
static int do_show_format = 0;
|
||||
static int do_show_packets = 0;
|
||||
static int do_show_streams = 0;
|
||||
|
||||
static int show_value_unit = 0;
|
||||
static int use_value_prefix = 0;
|
||||
static int use_byte_value_binary_prefix = 0;
|
||||
static int use_value_sexagesimal_format = 0;
|
||||
|
||||
/* globals */
|
||||
static const OptionDef options[];
|
||||
|
||||
/* FFprobe context */
|
||||
static const char *input_filename;
|
||||
static AVInputFormat *iformat = NULL;
|
||||
|
||||
static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
|
||||
static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" };
|
||||
|
||||
static const char *unit_second_str = "s" ;
|
||||
static const char *unit_hertz_str = "Hz" ;
|
||||
static const char *unit_byte_str = "byte" ;
|
||||
static const char *unit_bit_per_second_str = "bit/s";
|
||||
|
||||
static char *value_string(char *buf, int buf_size, double val, const char *unit)
|
||||
{
|
||||
if (unit == unit_second_str && use_value_sexagesimal_format) {
|
||||
double secs;
|
||||
int hours, mins;
|
||||
secs = val;
|
||||
mins = (int)secs / 60;
|
||||
secs = secs - mins * 60;
|
||||
hours = mins / 60;
|
||||
mins %= 60;
|
||||
snprintf(buf, buf_size, "%d:%02d:%09.6f", hours, mins, secs);
|
||||
} else if (use_value_prefix) {
|
||||
const char *prefix_string;
|
||||
int index;
|
||||
|
||||
if (unit == unit_byte_str && use_byte_value_binary_prefix) {
|
||||
index = (int) (log(val)/log(2)) / 10;
|
||||
index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1);
|
||||
val /= pow(2, index*10);
|
||||
prefix_string = binary_unit_prefixes[index];
|
||||
} else {
|
||||
index = (int) (log10(val)) / 3;
|
||||
index = av_clip(index, 0, FF_ARRAY_ELEMS(decimal_unit_prefixes) -1);
|
||||
val /= pow(10, index*3);
|
||||
prefix_string = decimal_unit_prefixes[index];
|
||||
}
|
||||
|
||||
snprintf(buf, buf_size, "%.3f %s%s", val, prefix_string, show_value_unit ? unit : "");
|
||||
} else {
|
||||
snprintf(buf, buf_size, "%f %s", val, show_value_unit ? unit : "");
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRational *time_base)
|
||||
{
|
||||
if (val == AV_NOPTS_VALUE) {
|
||||
snprintf(buf, buf_size, "N/A");
|
||||
} else {
|
||||
value_string(buf, buf_size, val * av_q2d(*time_base), unit_second_str);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *ts_value_string (char *buf, int buf_size, int64_t ts)
|
||||
{
|
||||
if (ts == AV_NOPTS_VALUE) {
|
||||
snprintf(buf, buf_size, "N/A");
|
||||
} else {
|
||||
snprintf(buf, buf_size, "%"PRId64, ts);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static const char *media_type_string(enum AVMediaType media_type)
|
||||
{
|
||||
switch (media_type) {
|
||||
case AVMEDIA_TYPE_VIDEO: return "video";
|
||||
case AVMEDIA_TYPE_AUDIO: return "audio";
|
||||
case AVMEDIA_TYPE_DATA: return "data";
|
||||
case AVMEDIA_TYPE_SUBTITLE: return "subtitle";
|
||||
case AVMEDIA_TYPE_ATTACHMENT: return "attachment";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt)
|
||||
{
|
||||
char val_str[128];
|
||||
AVStream *st = fmt_ctx->streams[pkt->stream_index];
|
||||
|
||||
printf("[PACKET]\n");
|
||||
printf("codec_type=%s\n" , media_type_string(st->codec->codec_type));
|
||||
printf("stream_index=%d\n" , pkt->stream_index);
|
||||
printf("pts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->pts));
|
||||
printf("pts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->pts, &st->time_base));
|
||||
printf("dts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->dts));
|
||||
printf("dts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->dts, &st->time_base));
|
||||
printf("duration=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->duration));
|
||||
printf("duration_time=%s\n", time_value_string(val_str, sizeof(val_str), pkt->duration, &st->time_base));
|
||||
printf("size=%s\n" , value_string (val_str, sizeof(val_str), pkt->size, unit_byte_str));
|
||||
printf("pos=%"PRId64"\n" , pkt->pos);
|
||||
printf("flags=%c\n" , pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_');
|
||||
printf("[/PACKET]\n");
|
||||
}
|
||||
|
||||
static void show_packets(AVFormatContext *fmt_ctx)
|
||||
{
|
||||
AVPacket pkt;
|
||||
|
||||
av_init_packet(&pkt);
|
||||
|
||||
while (!av_read_frame(fmt_ctx, &pkt))
|
||||
show_packet(fmt_ctx, &pkt);
|
||||
}
|
||||
|
||||
static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
|
||||
{
|
||||
AVStream *stream = fmt_ctx->streams[stream_idx];
|
||||
AVCodecContext *dec_ctx;
|
||||
AVCodec *dec;
|
||||
char val_str[128];
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
AVRational display_aspect_ratio;
|
||||
|
||||
printf("[STREAM]\n");
|
||||
|
||||
printf("index=%d\n", stream->index);
|
||||
|
||||
if ((dec_ctx = stream->codec)) {
|
||||
if ((dec = dec_ctx->codec)) {
|
||||
printf("codec_name=%s\n", dec->name);
|
||||
printf("codec_long_name=%s\n", dec->long_name);
|
||||
} else {
|
||||
printf("codec_name=unknown\n");
|
||||
}
|
||||
|
||||
printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type));
|
||||
printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den);
|
||||
|
||||
/* print AVI/FourCC tag */
|
||||
av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag);
|
||||
printf("codec_tag_string=%s\n", val_str);
|
||||
printf("codec_tag=0x%04x\n", dec_ctx->codec_tag);
|
||||
|
||||
switch (dec_ctx->codec_type) {
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
printf("width=%d\n", dec_ctx->width);
|
||||
printf("height=%d\n", dec_ctx->height);
|
||||
printf("has_b_frames=%d\n", dec_ctx->has_b_frames);
|
||||
if (dec_ctx->sample_aspect_ratio.num) {
|
||||
printf("sample_aspect_ratio=%d:%d\n", dec_ctx->sample_aspect_ratio.num,
|
||||
dec_ctx->sample_aspect_ratio.den);
|
||||
av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
|
||||
dec_ctx->width * dec_ctx->sample_aspect_ratio.num,
|
||||
dec_ctx->height * dec_ctx->sample_aspect_ratio.den,
|
||||
1024*1024);
|
||||
printf("display_aspect_ratio=%d:%d\n", display_aspect_ratio.num,
|
||||
display_aspect_ratio.den);
|
||||
}
|
||||
printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ?
|
||||
av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
|
||||
break;
|
||||
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str),
|
||||
dec_ctx->sample_rate,
|
||||
unit_hertz_str));
|
||||
printf("channels=%d\n", dec_ctx->channels);
|
||||
printf("bits_per_sample=%d\n", av_get_bits_per_sample(dec_ctx->codec_id));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
printf("codec_type=unknown\n");
|
||||
}
|
||||
|
||||
if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS)
|
||||
printf("id=0x%x\n", stream->id);
|
||||
printf("r_frame_rate=%d/%d\n", stream->r_frame_rate.num, stream->r_frame_rate.den);
|
||||
printf("avg_frame_rate=%d/%d\n", stream->avg_frame_rate.num, stream->avg_frame_rate.den);
|
||||
printf("time_base=%d/%d\n", stream->time_base.num, stream->time_base.den);
|
||||
printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), stream->start_time,
|
||||
&stream->time_base));
|
||||
printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), stream->duration,
|
||||
&stream->time_base));
|
||||
if (stream->nb_frames)
|
||||
printf("nb_frames=%"PRId64"\n", stream->nb_frames);
|
||||
|
||||
while ((tag = av_dict_get(stream->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
printf("TAG:%s=%s\n", tag->key, tag->value);
|
||||
|
||||
printf("[/STREAM]\n");
|
||||
}
|
||||
|
||||
static void show_format(AVFormatContext *fmt_ctx)
|
||||
{
|
||||
AVDictionaryEntry *tag = NULL;
|
||||
char val_str[128];
|
||||
|
||||
printf("[FORMAT]\n");
|
||||
|
||||
printf("filename=%s\n", fmt_ctx->filename);
|
||||
printf("nb_streams=%d\n", fmt_ctx->nb_streams);
|
||||
printf("format_name=%s\n", fmt_ctx->iformat->name);
|
||||
printf("format_long_name=%s\n", fmt_ctx->iformat->long_name);
|
||||
printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->start_time,
|
||||
&AV_TIME_BASE_Q));
|
||||
printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->duration,
|
||||
&AV_TIME_BASE_Q));
|
||||
printf("size=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->file_size,
|
||||
unit_byte_str));
|
||||
printf("bit_rate=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->bit_rate,
|
||||
unit_bit_per_second_str));
|
||||
|
||||
while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||
printf("TAG:%s=%s\n", tag->key, tag->value);
|
||||
|
||||
printf("[/FORMAT]\n");
|
||||
}
|
||||
|
||||
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
||||
{
|
||||
int err, i;
|
||||
AVFormatContext *fmt_ctx = NULL;
|
||||
AVDictionaryEntry *t;
|
||||
|
||||
if ((err = avformat_open_input(&fmt_ctx, filename, iformat, &format_opts)) < 0) {
|
||||
print_error(filename, err);
|
||||
return err;
|
||||
}
|
||||
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);
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
/* fill the streams in the format context */
|
||||
if ((err = av_find_stream_info(fmt_ctx)) < 0) {
|
||||
print_error(filename, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
av_dump_format(fmt_ctx, 0, filename, 0);
|
||||
|
||||
/* bind a decoder to each input stream */
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
||||
AVStream *stream = fmt_ctx->streams[i];
|
||||
AVCodec *codec;
|
||||
|
||||
if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
||||
fprintf(stderr, "Unsupported codec with id %d for input stream %d\n",
|
||||
stream->codec->codec_id, stream->index);
|
||||
} else if (avcodec_open(stream->codec, codec) < 0) {
|
||||
fprintf(stderr, "Error while opening codec for input stream %d\n",
|
||||
stream->index);
|
||||
}
|
||||
}
|
||||
|
||||
*fmt_ctx_ptr = fmt_ctx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int probe_file(const char *filename)
|
||||
{
|
||||
AVFormatContext *fmt_ctx;
|
||||
int ret, i;
|
||||
|
||||
if ((ret = open_input_file(&fmt_ctx, filename)))
|
||||
return ret;
|
||||
|
||||
if (do_show_packets)
|
||||
show_packets(fmt_ctx);
|
||||
|
||||
if (do_show_streams)
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++)
|
||||
show_stream(fmt_ctx, i);
|
||||
|
||||
if (do_show_format)
|
||||
show_format(fmt_ctx);
|
||||
|
||||
av_close_input_file(fmt_ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void show_usage(void)
|
||||
{
|
||||
printf("Simple multimedia streams analyzer\n");
|
||||
printf("usage: ffprobe [OPTIONS] [INPUT_FILE]\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static int opt_format(const char *opt, const char *arg)
|
||||
{
|
||||
iformat = av_find_input_format(arg);
|
||||
if (!iformat) {
|
||||
fprintf(stderr, "Unknown input format: %s\n", arg);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int opt_input_file(const char *opt, const char *arg)
|
||||
{
|
||||
if (input_filename) {
|
||||
fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n",
|
||||
arg, input_filename);
|
||||
exit(1);
|
||||
}
|
||||
if (!strcmp(arg, "-"))
|
||||
arg = "pipe:";
|
||||
input_filename = arg;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int opt_help(const char *opt, const char *arg)
|
||||
{
|
||||
av_log_set_callback(log_callback_help);
|
||||
show_usage();
|
||||
show_help_options(options, "Main options:\n", 0, 0);
|
||||
printf("\n");
|
||||
av_opt_show2(avformat_opts, NULL,
|
||||
AV_OPT_FLAG_DECODING_PARAM, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void opt_pretty(void)
|
||||
{
|
||||
show_value_unit = 1;
|
||||
use_value_prefix = 1;
|
||||
use_byte_value_binary_prefix = 1;
|
||||
use_value_sexagesimal_format = 1;
|
||||
}
|
||||
|
||||
static const OptionDef options[] = {
|
||||
#include "cmdutils_common_opts.h"
|
||||
{ "f", HAS_ARG, {(void*)opt_format}, "force format", "format" },
|
||||
{ "unit", OPT_BOOL, {(void*)&show_value_unit}, "show unit of the displayed values" },
|
||||
{ "prefix", OPT_BOOL, {(void*)&use_value_prefix}, "use SI prefixes for the displayed values" },
|
||||
{ "byte_binary_prefix", OPT_BOOL, {(void*)&use_byte_value_binary_prefix},
|
||||
"use binary prefixes for byte units" },
|
||||
{ "sexagesimal", OPT_BOOL, {(void*)&use_value_sexagesimal_format},
|
||||
"use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
|
||||
{ "pretty", 0, {(void*)&opt_pretty},
|
||||
"prettify the format of displayed values, make it more human readable" },
|
||||
{ "show_format", OPT_BOOL, {(void*)&do_show_format} , "show format/container info" },
|
||||
{ "show_packets", OPT_BOOL, {(void*)&do_show_packets}, "show packets info" },
|
||||
{ "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" },
|
||||
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
|
||||
{ "i", HAS_ARG, {(void *)opt_input_file}, "read specified file", "input_file"},
|
||||
{ NULL, },
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
av_register_all();
|
||||
init_opts();
|
||||
#if CONFIG_AVDEVICE
|
||||
avdevice_register_all();
|
||||
#endif
|
||||
|
||||
show_banner();
|
||||
parse_options(argc, argv, options, opt_input_file);
|
||||
|
||||
if (!input_filename) {
|
||||
show_usage();
|
||||
fprintf(stderr, "You have to specify one input file.\n");
|
||||
fprintf(stderr, "Use -h to get full help or, even better, run 'man ffprobe'.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ret = probe_file(input_filename);
|
||||
|
||||
av_free(avformat_opts);
|
||||
|
||||
return ret;
|
||||
}
|
1302
ffserver.c
1302
ffserver.c
File diff suppressed because it is too large
Load Diff
171
libavcodec/4xm.c
171
libavcodec/4xm.c
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @file libavcodec/4xm.c
|
||||
* 4XM codec.
|
||||
*/
|
||||
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "get_bits.h"
|
||||
#include "bitstream.h"
|
||||
#include "bytestream.h"
|
||||
|
||||
//#undef NDEBUG
|
||||
@@ -139,8 +139,8 @@ typedef struct FourXContext{
|
||||
int mv[256];
|
||||
VLC pre_vlc;
|
||||
int last_dc;
|
||||
DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
|
||||
void *bitstream_buffer;
|
||||
DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
|
||||
uint8_t *bitstream_buffer;
|
||||
unsigned int bitstream_buffer_size;
|
||||
int version;
|
||||
CFrameBuffer cfrm[CFRAME_BUFFER_COUNT];
|
||||
@@ -239,15 +239,12 @@ static void idct(DCTELEM block[64]){
|
||||
}
|
||||
|
||||
static av_cold void init_vlcs(FourXContext *f){
|
||||
static VLC_TYPE table[8][32][2];
|
||||
int i;
|
||||
|
||||
for(i=0; i<8; i++){
|
||||
block_type_vlc[0][i].table= table[i];
|
||||
block_type_vlc[0][i].table_allocated= 32;
|
||||
init_vlc(&block_type_vlc[0][i], BLOCK_TYPE_VLC_BITS, 7,
|
||||
&block_type_tab[0][i][0][1], 2, 1,
|
||||
&block_type_tab[0][i][0][0], 2, 1, INIT_VLC_USE_NEW_STATIC);
|
||||
&block_type_tab[0][i][0][0], 2, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,24 +259,7 @@ static void init_mv(FourXContext *f){
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
#define LE_CENTRIC_MUL(dst, src, scale, dc) \
|
||||
{ \
|
||||
unsigned tmpval = AV_RN32(src); \
|
||||
tmpval = (tmpval << 16) | (tmpval >> 16); \
|
||||
tmpval = tmpval * (scale) + (dc); \
|
||||
tmpval = (tmpval << 16) | (tmpval >> 16); \
|
||||
AV_WN32A(dst, tmpval); \
|
||||
}
|
||||
#else
|
||||
#define LE_CENTRIC_MUL(dst, src, scale, dc) \
|
||||
{ \
|
||||
unsigned tmpval = AV_RN32(src) * (scale) + (dc); \
|
||||
AV_WN32A(dst, tmpval); \
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, unsigned dc){
|
||||
static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, int dc){
|
||||
int i;
|
||||
dc*= 0x10001;
|
||||
|
||||
@@ -293,25 +273,25 @@ static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stri
|
||||
break;
|
||||
case 1:
|
||||
for(i=0; i<h; i++){
|
||||
LE_CENTRIC_MUL(dst, src, scale, dc);
|
||||
((uint32_t*)dst)[0] = scale*((uint32_t*)src)[0] + dc;
|
||||
if(scale) src += stride;
|
||||
dst += stride;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
for(i=0; i<h; i++){
|
||||
LE_CENTRIC_MUL(dst, src, scale, dc);
|
||||
LE_CENTRIC_MUL(dst + 2, src + 2, scale, dc);
|
||||
((uint32_t*)dst)[0] = scale*((uint32_t*)src)[0] + dc;
|
||||
((uint32_t*)dst)[1] = scale*((uint32_t*)src)[1] + dc;
|
||||
if(scale) src += stride;
|
||||
dst += stride;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
for(i=0; i<h; i++){
|
||||
LE_CENTRIC_MUL(dst, src, scale, dc);
|
||||
LE_CENTRIC_MUL(dst + 2, src + 2, scale, dc);
|
||||
LE_CENTRIC_MUL(dst + 4, src + 4, scale, dc);
|
||||
LE_CENTRIC_MUL(dst + 6, src + 6, scale, dc);
|
||||
((uint32_t*)dst)[0] = scale*((uint32_t*)src)[0] + dc;
|
||||
((uint32_t*)dst)[1] = scale*((uint32_t*)src)[1] + dc;
|
||||
((uint32_t*)dst)[2] = scale*((uint32_t*)src)[2] + dc;
|
||||
((uint32_t*)dst)[3] = scale*((uint32_t*)src)[3] + dc;
|
||||
if(scale) src += stride;
|
||||
dst += stride;
|
||||
}
|
||||
@@ -330,10 +310,8 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
||||
assert(code>=0 && code<=6);
|
||||
|
||||
if(code == 0){
|
||||
if (f->bytestream_end - f->bytestream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||
if (f->bytestream_end - f->bytestream < 1)
|
||||
return;
|
||||
}
|
||||
src += f->mv[ *f->bytestream++ ];
|
||||
if(start > src || src > end){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
@@ -351,37 +329,29 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
|
||||
}else if(code == 3 && f->version<2){
|
||||
mcdc(dst, src, log2w, h, stride, 1, 0);
|
||||
}else if(code == 4){
|
||||
if (f->bytestream_end - f->bytestream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||
if (f->bytestream_end - f->bytestream < 1)
|
||||
return;
|
||||
}
|
||||
src += f->mv[ *f->bytestream++ ];
|
||||
if(start > src || src > end){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||
return;
|
||||
}
|
||||
if (f->wordstream_end - f->wordstream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
if (f->wordstream_end - f->wordstream < 1)
|
||||
return;
|
||||
}
|
||||
mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));
|
||||
mcdc(dst, src, log2w, h, stride, 1, le2me_16(*f->wordstream++));
|
||||
}else if(code == 5){
|
||||
if (f->wordstream_end - f->wordstream < 1){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
if (f->wordstream_end - f->wordstream < 1)
|
||||
return;
|
||||
}
|
||||
mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
|
||||
mcdc(dst, src, log2w, h, stride, 0, le2me_16(*f->wordstream++));
|
||||
}else if(code == 6){
|
||||
if (f->wordstream_end - f->wordstream < 2){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||
if (f->wordstream_end - f->wordstream < 2)
|
||||
return;
|
||||
}
|
||||
if(log2w){
|
||||
dst[0] = av_le2ne16(*f->wordstream++);
|
||||
dst[1] = av_le2ne16(*f->wordstream++);
|
||||
dst[0] = le2me_16(*f->wordstream++);
|
||||
dst[1] = le2me_16(*f->wordstream++);
|
||||
}else{
|
||||
dst[0 ] = av_le2ne16(*f->wordstream++);
|
||||
dst[stride] = av_le2ne16(*f->wordstream++);
|
||||
dst[0 ] = le2me_16(*f->wordstream++);
|
||||
dst[stride] = le2me_16(*f->wordstream++);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -418,11 +388,8 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
return -1;
|
||||
}
|
||||
|
||||
av_fast_malloc(&f->bitstream_buffer, &f->bitstream_buffer_size, bitstream_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!f->bitstream_buffer)
|
||||
return AVERROR(ENOMEM);
|
||||
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);
|
||||
f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, bitstream_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
f->dsp.bswap_buf((uint32_t*)f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4);
|
||||
init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size);
|
||||
|
||||
f->wordstream= (const uint16_t*)(buf + extra + bitstream_size);
|
||||
@@ -630,10 +597,9 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
|
||||
len_tab[j]= len;
|
||||
}
|
||||
|
||||
if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
|
||||
len_tab , 1, 1,
|
||||
bits_tab, 4, 4, 0))
|
||||
return NULL;
|
||||
init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
|
||||
len_tab , 1, 1,
|
||||
bits_tab, 4, 4, 0);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
@@ -694,13 +660,10 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
unsigned int prestream_size;
|
||||
const uint8_t *prestream;
|
||||
|
||||
if (length < bitstream_size + 12) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
prestream_size = 4 * AV_RL32(buf + bitstream_size + 4);
|
||||
prestream = buf + bitstream_size + 12;
|
||||
if (bitstream_size > (1<<26) || length < bitstream_size + 12)
|
||||
return -1;
|
||||
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)){
|
||||
@@ -716,11 +679,8 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
|
||||
prestream_size= length + buf - prestream;
|
||||
|
||||
av_fast_malloc(&f->bitstream_buffer, &f->bitstream_buffer_size, prestream_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!f->bitstream_buffer)
|
||||
return AVERROR(ENOMEM);
|
||||
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);
|
||||
f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, prestream_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
f->dsp.bswap_buf((uint32_t*)f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4);
|
||||
init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size);
|
||||
|
||||
f->last_dc= 0*128*8*8;
|
||||
@@ -743,10 +703,8 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
|
||||
|
||||
static int decode_frame(AVCodecContext *avctx,
|
||||
void *data, int *data_size,
|
||||
AVPacket *avpkt)
|
||||
const uint8_t *buf, int buf_size)
|
||||
{
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
FourXContext * const f = avctx->priv_data;
|
||||
AVFrame *picture = data;
|
||||
AVFrame *p, temp;
|
||||
@@ -766,10 +724,8 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
const int whole_size= AV_RL32(buf+16);
|
||||
CFrameBuffer *cfrm;
|
||||
|
||||
if (data_size < 0 || whole_size < 0){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "sizes invalid\n");
|
||||
if (data_size < 0 || whole_size < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
for(i=0; i<CFRAME_BUFFER_COUNT; i++){
|
||||
if(f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number)
|
||||
@@ -824,45 +780,34 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management
|
||||
|
||||
if(p->data[0])
|
||||
avctx->release_buffer(avctx, p);
|
||||
|
||||
p->reference= 1;
|
||||
if (avctx->reget_buffer(avctx, p) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
|
||||
if(avctx->get_buffer(avctx, p) < 0){
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(frame_4cc == AV_RL32("ifr2")){
|
||||
p->pict_type= AV_PICTURE_TYPE_I;
|
||||
if(decode_i2_frame(f, buf-4, frame_size+4) < 0){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "decode i2 frame failed\n");
|
||||
p->pict_type= FF_I_TYPE;
|
||||
if(decode_i2_frame(f, buf-4, frame_size) < 0)
|
||||
return -1;
|
||||
}
|
||||
}else if(frame_4cc == AV_RL32("ifrm")){
|
||||
p->pict_type= AV_PICTURE_TYPE_I;
|
||||
if(decode_i_frame(f, buf, frame_size) < 0){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "decode i frame failed\n");
|
||||
p->pict_type= FF_I_TYPE;
|
||||
if(decode_i_frame(f, buf, frame_size) < 0)
|
||||
return -1;
|
||||
}
|
||||
}else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
|
||||
if(!f->last_picture.data[0]){
|
||||
f->last_picture.reference= 1;
|
||||
if(avctx->get_buffer(avctx, &f->last_picture) < 0){
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
p->pict_type= AV_PICTURE_TYPE_P;
|
||||
if(decode_p_frame(f, buf, frame_size) < 0){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "decode p frame failed\n");
|
||||
p->pict_type= FF_P_TYPE;
|
||||
if(decode_p_frame(f, buf, frame_size) < 0)
|
||||
return -1;
|
||||
}
|
||||
}else if(frame_4cc == AV_RL32("snd_")){
|
||||
av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size);
|
||||
}else{
|
||||
av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size);
|
||||
}
|
||||
|
||||
p->key_frame= p->pict_type == AV_PICTURE_TYPE_I;
|
||||
p->key_frame= p->pict_type == FF_I_TYPE;
|
||||
|
||||
*picture= *p;
|
||||
*data_size = sizeof(AVPicture);
|
||||
@@ -888,19 +833,13 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
||||
av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
|
||||
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->last_picture);
|
||||
f->version= AV_RL32(avctx->extradata)>>16;
|
||||
common_init(avctx);
|
||||
init_vlcs(f);
|
||||
|
||||
if(f->version>2) avctx->pix_fmt= PIX_FMT_RGB565;
|
||||
else avctx->pix_fmt= PIX_FMT_BGR555;
|
||||
else avctx->pix_fmt= PIX_FMT_RGB555;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -917,24 +856,20 @@ static av_cold int decode_end(AVCodecContext *avctx){
|
||||
f->cfrm[i].allocated_size= 0;
|
||||
}
|
||||
free_vlc(&f->pre_vlc);
|
||||
if(f->current_picture.data[0])
|
||||
avctx->release_buffer(avctx, &f->current_picture);
|
||||
if(f->last_picture.data[0])
|
||||
avctx->release_buffer(avctx, &f->last_picture);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec ff_fourxm_decoder = {
|
||||
AVCodec fourxm_decoder = {
|
||||
"4xm",
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_TYPE_VIDEO,
|
||||
CODEC_ID_4XM,
|
||||
sizeof(FourXContext),
|
||||
decode_init,
|
||||
NULL,
|
||||
decode_end,
|
||||
decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
/*CODEC_CAP_DR1,*/
|
||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||
};
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @file libavcodec/8bps.c
|
||||
* QT 8BPS Video Decoder by Roberto Togni
|
||||
* For more information about the 8BPS format, visit:
|
||||
* http://www.pcisys.net/~melanson/codecs/
|
||||
@@ -50,8 +50,6 @@ typedef struct EightBpsContext {
|
||||
|
||||
unsigned char planes;
|
||||
unsigned char planemap[4];
|
||||
|
||||
uint32_t pal[256];
|
||||
} EightBpsContext;
|
||||
|
||||
|
||||
@@ -60,10 +58,8 @@ typedef struct EightBpsContext {
|
||||
* Decode a frame
|
||||
*
|
||||
*/
|
||||
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
|
||||
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
|
||||
{
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
EightBpsContext * const c = avctx->priv_data;
|
||||
const unsigned char *encoded = buf;
|
||||
unsigned char *pixptr, *pixptr_end;
|
||||
@@ -102,7 +98,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
for(row = 0; row < height; row++) {
|
||||
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
|
||||
pixptr_end = pixptr + c->pic.linesize[0];
|
||||
dlen = av_be2ne16(*(const unsigned short *)(lp+row*2));
|
||||
dlen = be2me_16(*(const unsigned short *)(lp+row*2));
|
||||
/* Decode a row of this plane */
|
||||
while(dlen > 0) {
|
||||
if(dp + 1 >= buf+buf_size) return -1;
|
||||
@@ -131,16 +127,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
}
|
||||
}
|
||||
|
||||
if (avctx->bits_per_coded_sample <= 8) {
|
||||
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
||||
AV_PKT_DATA_PALETTE,
|
||||
NULL);
|
||||
if (pal) {
|
||||
if (avctx->palctrl) {
|
||||
memcpy (c->pic.data[1], avctx->palctrl->palette, AVPALETTE_SIZE);
|
||||
if (avctx->palctrl->palette_changed) {
|
||||
c->pic.palette_has_changed = 1;
|
||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
||||
}
|
||||
|
||||
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
||||
avctx->palctrl->palette_changed = 0;
|
||||
} else
|
||||
c->pic.palette_has_changed = 0;
|
||||
}
|
||||
|
||||
*data_size = sizeof(AVFrame);
|
||||
@@ -162,14 +155,21 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
|
||||
c->avctx = avctx;
|
||||
|
||||
avcodec_get_frame_defaults(&c->pic);
|
||||
c->pic.data[0] = NULL;
|
||||
|
||||
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (avctx->bits_per_coded_sample) {
|
||||
case 8:
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
c->planes = 1;
|
||||
c->planemap[0] = 0; // 1st plane is palette indexes
|
||||
if (avctx->palctrl == NULL) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error: PAL8 format but no palette from demuxer.\n");
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
||||
@@ -181,7 +181,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
case 32:
|
||||
avctx->pix_fmt = PIX_FMT_RGB32;
|
||||
c->planes = 4;
|
||||
#if HAVE_BIGENDIAN
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
c->planemap[0] = 1; // 1st plane is red
|
||||
c->planemap[1] = 2; // 2nd plane is green
|
||||
c->planemap[2] = 3; // 3rd plane is blue
|
||||
@@ -221,9 +221,9 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
||||
|
||||
|
||||
|
||||
AVCodec ff_eightbps_decoder = {
|
||||
AVCodec eightbps_decoder = {
|
||||
"8bps",
|
||||
AVMEDIA_TYPE_VIDEO,
|
||||
CODEC_TYPE_VIDEO,
|
||||
CODEC_ID_8BPS,
|
||||
sizeof(EightBpsContext),
|
||||
decode_init,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 8SVX audio decoder
|
||||
* Copyright (C) 2008 Jaikrishnan Menon
|
||||
* Copyright (C) 2011 Stefano Sabatini
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
@@ -20,206 +20,92 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @file libavcodec/8svx.c
|
||||
* 8svx audio decoder
|
||||
* @author Jaikrishnan Menon
|
||||
* supports: fibonacci delta encoding
|
||||
* : exponential encoding
|
||||
*
|
||||
* For more information about the 8SVX format:
|
||||
* http://netghost.narod.ru/gff/vendspec/iff/iff.txt
|
||||
* http://sox.sourceforge.net/AudioFormats-11.html
|
||||
* http://aminet.net/package/mus/misc/wavepak
|
||||
* http://amigan.1emu.net/reg/8SVX.txt
|
||||
*
|
||||
* Samples can be found here:
|
||||
* http://aminet.net/mods/smpl/
|
||||
*/
|
||||
|
||||
#include "avcodec.h"
|
||||
|
||||
/** decoder context */
|
||||
typedef struct EightSvxContext {
|
||||
const int8_t *table;
|
||||
|
||||
/* buffer used to store the whole audio decoded/interleaved chunk,
|
||||
* which is sent with the first packet */
|
||||
uint8_t *samples;
|
||||
size_t samples_size;
|
||||
int samples_idx;
|
||||
int16_t fib_acc;
|
||||
const int16_t *table;
|
||||
} EightSvxContext;
|
||||
|
||||
static const int8_t fibonacci[16] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 };
|
||||
static const int8_t exponential[16] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
|
||||
|
||||
#define MAX_FRAME_SIZE 2048
|
||||
|
||||
/**
|
||||
* Interleave samples in buffer containing all left channel samples
|
||||
* at the beginning, and right channel samples at the end.
|
||||
* Each sample is assumed to be in signed 8-bit format.
|
||||
*
|
||||
* @param size the size in bytes of the dst and src buffer
|
||||
*/
|
||||
static void interleave_stereo(uint8_t *dst, const uint8_t *src, int size)
|
||||
{
|
||||
uint8_t *dst_end = dst + size;
|
||||
size = size>>1;
|
||||
|
||||
while (dst < dst_end) {
|
||||
*dst++ = *src;
|
||||
*dst++ = *(src+size);
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delta decode the compressed values in src, and put the resulting
|
||||
* decoded n samples in dst.
|
||||
*
|
||||
* @param val starting value assumed by the delta sequence
|
||||
* @param table delta sequence table
|
||||
* @return size in bytes of the decoded data, must be src_size*2
|
||||
*/
|
||||
static int delta_decode(int8_t *dst, const uint8_t *src, int src_size,
|
||||
int8_t val, const int8_t *table)
|
||||
{
|
||||
int n = src_size;
|
||||
int8_t *dst0 = dst;
|
||||
|
||||
while (n--) {
|
||||
uint8_t d = *src++;
|
||||
val = av_clip(val + table[d & 0x0f], -127, 128);
|
||||
*dst++ = val;
|
||||
val = av_clip(val + table[d >> 4] , -127, 128);
|
||||
*dst++ = val;
|
||||
}
|
||||
|
||||
return dst-dst0;
|
||||
}
|
||||
static const int16_t fibonacci[16] = { -34<<8, -21<<8, -13<<8, -8<<8, -5<<8, -3<<8, -2<<8, -1<<8,
|
||||
0, 1<<8, 2<<8, 3<<8, 5<<8, 8<<8, 13<<8, 21<<8 };
|
||||
static const int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, -4<<8, -2<<8, -1<<8,
|
||||
0, 1<<8, 2<<8, 4<<8, 8<<8, 16<<8, 32<<8, 64<<8 };
|
||||
|
||||
/** decode a frame */
|
||||
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
AVPacket *avpkt)
|
||||
const uint8_t *buf, int buf_size)
|
||||
{
|
||||
EightSvxContext *esc = avctx->priv_data;
|
||||
int out_data_size, n;
|
||||
uint8_t *src, *dst;
|
||||
int16_t *out_data = data;
|
||||
int consumed = buf_size;
|
||||
const uint8_t *buf_end = buf + buf_size;
|
||||
|
||||
/* decode and interleave the first packet */
|
||||
if (!esc->samples && avpkt) {
|
||||
uint8_t *deinterleaved_samples;
|
||||
if((*data_size >> 2) < buf_size)
|
||||
return -1;
|
||||
|
||||
esc->samples_size = avctx->codec->id == CODEC_ID_8SVX_RAW ?
|
||||
avpkt->size : avctx->channels + (avpkt->size-avctx->channels) * 2;
|
||||
if (!(esc->samples = av_malloc(esc->samples_size)))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
/* decompress */
|
||||
if (avctx->codec->id == CODEC_ID_8SVX_FIB || avctx->codec->id == CODEC_ID_8SVX_EXP) {
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
int n = esc->samples_size;
|
||||
|
||||
if (!(deinterleaved_samples = av_mallocz(n)))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
/* the uncompressed starting value is contained in the first byte */
|
||||
if (avctx->channels == 2) {
|
||||
delta_decode(deinterleaved_samples , buf+1, buf_size/2-1, buf[0], esc->table);
|
||||
buf += buf_size/2;
|
||||
delta_decode(deinterleaved_samples+n/2-1, buf+1, buf_size/2-1, buf[0], esc->table);
|
||||
} else
|
||||
delta_decode(deinterleaved_samples , buf+1, buf_size-1 , buf[0], esc->table);
|
||||
} else {
|
||||
deinterleaved_samples = avpkt->data;
|
||||
}
|
||||
|
||||
if (avctx->channels == 2)
|
||||
interleave_stereo(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||
else
|
||||
memcpy(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||
if(avctx->frame_number == 0) {
|
||||
esc->fib_acc = buf[1] << 8;
|
||||
buf_size -= 2;
|
||||
buf += 2;
|
||||
}
|
||||
|
||||
/* return single packed with fixed size */
|
||||
out_data_size = FFMIN(MAX_FRAME_SIZE, esc->samples_size - esc->samples_idx);
|
||||
if (*data_size < out_data_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Provided buffer with size %d is too small.\n", *data_size);
|
||||
return AVERROR(EINVAL);
|
||||
*data_size = buf_size << 2;
|
||||
|
||||
while(buf < buf_end) {
|
||||
uint8_t d = *buf++;
|
||||
esc->fib_acc += esc->table[d & 0x0f];
|
||||
*out_data++ = esc->fib_acc;
|
||||
esc->fib_acc += esc->table[d >> 4];
|
||||
*out_data++ = esc->fib_acc;
|
||||
}
|
||||
|
||||
*data_size = out_data_size;
|
||||
dst = data;
|
||||
src = esc->samples + esc->samples_idx;
|
||||
for (n = out_data_size; n > 0; n--)
|
||||
*dst++ = *src++ + 128;
|
||||
esc->samples_idx += *data_size;
|
||||
|
||||
return avctx->codec->id == CODEC_ID_8SVX_FIB || avctx->codec->id == CODEC_ID_8SVX_EXP ?
|
||||
(avctx->frame_number == 0)*2 + out_data_size / 2 :
|
||||
out_data_size;
|
||||
return consumed;
|
||||
}
|
||||
|
||||
/** initialize 8svx decoder */
|
||||
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
EightSvxContext *esc = avctx->priv_data;
|
||||
|
||||
if (avctx->channels > 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
switch(avctx->codec->id) {
|
||||
case CODEC_ID_8SVX_FIB:
|
||||
esc->table = fibonacci;
|
||||
break;
|
||||
case CODEC_ID_8SVX_EXP:
|
||||
esc->table = exponential;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (avctx->codec->id) {
|
||||
case CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
|
||||
case CODEC_ID_8SVX_EXP: esc->table = exponential; break;
|
||||
case CODEC_ID_8SVX_RAW: esc->table = NULL; break;
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||
|
||||
avctx->sample_fmt = SAMPLE_FMT_S16;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
|
||||
{
|
||||
EightSvxContext *esc = avctx->priv_data;
|
||||
|
||||
av_freep(&esc->samples);
|
||||
esc->samples_size = 0;
|
||||
esc->samples_idx = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec ff_eightsvx_fib_decoder = {
|
||||
AVCodec eightsvx_fib_decoder = {
|
||||
.name = "8svx_fib",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.type = CODEC_TYPE_AUDIO,
|
||||
.id = CODEC_ID_8SVX_FIB,
|
||||
.priv_data_size = sizeof (EightSvxContext),
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||
};
|
||||
|
||||
AVCodec ff_eightsvx_exp_decoder = {
|
||||
AVCodec eightsvx_exp_decoder = {
|
||||
.name = "8svx_exp",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.type = CODEC_TYPE_AUDIO,
|
||||
.id = CODEC_ID_8SVX_EXP,
|
||||
.priv_data_size = sizeof (EightSvxContext),
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||
};
|
||||
|
||||
AVCodec ff_eightsvx_raw_decoder = {
|
||||
.name = "8svx_raw",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = CODEC_ID_8SVX_RAW,
|
||||
.priv_data_size = sizeof(EightSvxContext),
|
||||
.init = eightsvx_decode_init,
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX rawaudio"),
|
||||
};
|
||||
|
@@ -3,22 +3,21 @@ include $(SUBDIR)../config.mak
|
||||
NAME = avcodec
|
||||
FFLIBS = avutil
|
||||
|
||||
HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h
|
||||
HEADERS = avcodec.h opt.h vdpau.h xvmc.h
|
||||
|
||||
OBJS = allcodecs.o \
|
||||
audioconvert.o \
|
||||
avpacket.o \
|
||||
bitstream.o \
|
||||
bitstream_filter.o \
|
||||
dsputil.o \
|
||||
eval.o \
|
||||
faanidct.o \
|
||||
fmtconvert.o \
|
||||
imgconvert.o \
|
||||
jrevdct.o \
|
||||
opt.o \
|
||||
options.o \
|
||||
parser.o \
|
||||
raw.o \
|
||||
rawdec.o \
|
||||
resample.o \
|
||||
resample2.o \
|
||||
simple_idct.o \
|
||||
@@ -26,299 +25,154 @@ OBJS = allcodecs.o \
|
||||
|
||||
# parts needed for many different codecs
|
||||
OBJS-$(CONFIG_AANDCT) += aandcttab.o
|
||||
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o
|
||||
OBJS-$(CONFIG_CRYSTALHD) += crystalhd.o
|
||||
OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o
|
||||
OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o
|
||||
OBJS-$(CONFIG_DWT) += dwt.o
|
||||
OBJS-$(CONFIG_DXVA2) += dxva2.o
|
||||
FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o
|
||||
OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
|
||||
$(FFT-OBJS-yes)
|
||||
OBJS-$(CONFIG_FFT) += fft.o
|
||||
OBJS-$(CONFIG_GOLOMB) += golomb.o
|
||||
OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
||||
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
||||
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||
OBJS-$(CONFIG_LPC) += lpc.o
|
||||
OBJS-$(CONFIG_LSP) += lsp.o
|
||||
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
|
||||
OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
||||
mpegaudiodsp_fixed.o \
|
||||
mpegaudiodsp_float.o
|
||||
RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o
|
||||
OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes)
|
||||
OBJS-$(CONFIG_SINEWIN) += sinewin.o
|
||||
OBJS-$(CONFIG_VAAPI) += vaapi.o
|
||||
OBJS-$(CONFIG_VDPAU) += vdpau.o
|
||||
OBJS-$(CONFIG_MDCT) += mdct.o
|
||||
OBJS-$(CONFIG_OLDSCALER) += imgresample.o
|
||||
OBJS-$(CONFIG_RDFT) += rdft.o
|
||||
|
||||
# decoders/encoders/hardware accelerators
|
||||
OBJS-$(CONFIG_A64MULTI_ENCODER) += a64multienc.o elbg.o
|
||||
OBJS-$(CONFIG_A64MULTI5_ENCODER) += a64multienc.o elbg.o
|
||||
OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps.o \
|
||||
aacadtsdec.o mpeg4audio.o kbdwin.o
|
||||
OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
|
||||
aacpsy.o aactab.o \
|
||||
psymodel.o iirfilter.o \
|
||||
mpeg4audio.o kbdwin.o
|
||||
# decoders/encoders
|
||||
OBJS-$(CONFIG_AAC_DECODER) += aac.o aactab.o mpeg4audio.o aac_parser.o aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
||||
OBJS-$(CONFIG_AC3_DECODER) += ac3dec.o ac3dec_data.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_combined.o ac3enc_fixed.o ac3enc_float.o ac3tab.o ac3.o kbdwin.o ac3enc.o
|
||||
OBJS-$(CONFIG_AC3_FLOAT_ENCODER) += ac3enc_float.o ac3tab.o ac3tab.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3tab.o ac3tab.o ac3.o ac3enc.o
|
||||
OBJS-$(CONFIG_AC3_DECODER) += eac3dec.o ac3dec.o ac3tab.o ac3dec_data.o ac3.o
|
||||
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc.o ac3tab.o ac3.o
|
||||
OBJS-$(CONFIG_ALAC_DECODER) += alac.o
|
||||
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o
|
||||
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_AMRNB_DECODER) += amrnbdec.o celp_filters.o \
|
||||
celp_math.o acelp_filters.o \
|
||||
acelp_vectors.o \
|
||||
acelp_pitch_delay.o
|
||||
OBJS-$(CONFIG_AMRWB_DECODER) += amrwbdec.o celp_filters.o \
|
||||
celp_math.o acelp_filters.o \
|
||||
acelp_vectors.o \
|
||||
acelp_pitch_delay.o lsp.o
|
||||
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o lpc.o
|
||||
OBJS-$(CONFIG_AMV_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_ANM_DECODER) += anm.o
|
||||
OBJS-$(CONFIG_ANSI_DECODER) += ansi.o cga_data.o
|
||||
OBJS-$(CONFIG_APE_DECODER) += apedec.o
|
||||
OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o ass_split.o
|
||||
OBJS-$(CONFIG_ASS_ENCODER) += assenc.o ass.o
|
||||
OBJS-$(CONFIG_ASV1_DECODER) += asv1.o mpeg12data.o
|
||||
OBJS-$(CONFIG_ASV1_ENCODER) += asv1.o mpeg12data.o
|
||||
OBJS-$(CONFIG_ASV2_DECODER) += asv1.o mpeg12data.o
|
||||
OBJS-$(CONFIG_ASV2_ENCODER) += asv1.o mpeg12data.o
|
||||
OBJS-$(CONFIG_ATRAC1_DECODER) += atrac1.o atrac.o
|
||||
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o atrac.o
|
||||
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
|
||||
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
|
||||
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o
|
||||
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
||||
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
||||
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
||||
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkidct.o
|
||||
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o
|
||||
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o
|
||||
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
||||
OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o
|
||||
OBJS-$(CONFIG_C93_DECODER) += c93.o
|
||||
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
|
||||
mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
|
||||
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
|
||||
OBJS-$(CONFIG_CLJR_DECODER) += cljr.o
|
||||
OBJS-$(CONFIG_CLJR_ENCODER) += cljr.o
|
||||
OBJS-$(CONFIG_COOK_DECODER) += cook.o
|
||||
OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
|
||||
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
|
||||
OBJS-$(CONFIG_DCA_DECODER) += dca.o synth_filter.o dcadsp.o
|
||||
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o
|
||||
OBJS-$(CONFIG_DFA_DECODER) += dfa.o
|
||||
OBJS-$(CONFIG_DCA_DECODER) += dca.o
|
||||
OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o
|
||||
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o \
|
||||
mpegvideo_enc.o motion_est.o \
|
||||
ratecontrol.o mpeg12data.o \
|
||||
mpegvideo.o
|
||||
OBJS-$(CONFIG_DPX_DECODER) += dpx.o
|
||||
OBJS-$(CONFIG_DPX_ENCODER) += dpxenc.o
|
||||
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_DSICINAUDIO_DECODER) += dsicinav.o
|
||||
OBJS-$(CONFIG_DSICINVIDEO_DECODER) += dsicinav.o
|
||||
OBJS-$(CONFIG_DVBSUB_DECODER) += dvbsubdec.o
|
||||
OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsub.o
|
||||
OBJS-$(CONFIG_DVDSUB_DECODER) += dvdsubdec.o
|
||||
OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o
|
||||
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o
|
||||
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o
|
||||
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o
|
||||
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o
|
||||
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3dec_data.o
|
||||
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
||||
ac3tab.o ac3.o kbdwin.o
|
||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o ac3dec.o ac3tab.o ac3dec_data.o ac3.o
|
||||
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
||||
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
||||
mpeg12data.o mpegvideo.o \
|
||||
error_resilience.o
|
||||
OBJS-$(CONFIG_EATGQ_DECODER) += eatgq.o eaidct.o
|
||||
OBJS-$(CONFIG_EATGV_DECODER) += eatgv.o
|
||||
OBJS-$(CONFIG_EATQI_DECODER) += eatqi.o eaidct.o mpeg12.o \
|
||||
mpeg12data.o mpegvideo.o \
|
||||
error_resilience.o
|
||||
OBJS-$(CONFIG_EATQI_DECODER) += eatqi.o eaidct.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_EIGHTBPS_DECODER) += 8bps.o
|
||||
OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_EIGHTSVX_RAW_DECODER) += 8svx.o
|
||||
OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o
|
||||
OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
|
||||
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o
|
||||
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o
|
||||
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o lpc.o
|
||||
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
||||
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
||||
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
||||
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
||||
OBJS-$(CONFIG_FLV_DECODER) += h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_FLV_ENCODER) += mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
||||
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
||||
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
|
||||
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o huffman.o
|
||||
OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
|
||||
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
|
||||
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||
OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o \
|
||||
mpegvideo_enc.o motion_est.o \
|
||||
ratecontrol.o mpeg12data.o \
|
||||
mpegvideo.o
|
||||
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \
|
||||
mpeg4video.o mpeg4videodec.o flvdec.o\
|
||||
intelh263dec.o mpegvideo.o \
|
||||
error_resilience.o
|
||||
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||
OBJS-$(CONFIG_H263_ENCODER) += mpegvideo_enc.o mpeg4video.o \
|
||||
mpeg4videoenc.o motion_est.o \
|
||||
ratecontrol.o h263.o ituh263enc.o \
|
||||
flvenc.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
||||
h264_loopfilter.o h264_direct.o \
|
||||
cabac.o h264_sei.o h264_ps.o \
|
||||
h264_refs.o h264_cavlc.o h264_cabac.o\
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
||||
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
||||
OBJS-$(CONFIG_GIF_ENCODER) += gif.o
|
||||
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o h263_parser.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H263I_DECODER) += h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H263_ENCODER) += mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H263P_ENCODER) += mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H264_DECODER) += h264.o h264idct.o h264pred.o h264_parser.o cabac.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_H264_ENCODER) += h264enc.o h264dspenc.o
|
||||
OBJS-$(CONFIG_H264_VDPAU_DECODER) += vdpau.o h264.o h264idct.o h264pred.o h264_parser.o cabac.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o
|
||||
OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o
|
||||
OBJS-$(CONFIG_IFF_BYTERUN1_DECODER) += iff.o
|
||||
OBJS-$(CONFIG_IFF_ILBM_DECODER) += iff.o
|
||||
OBJS-$(CONFIG_IMC_DECODER) += imc.o
|
||||
OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o
|
||||
OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o
|
||||
OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi_common.o ivi_dsp.o
|
||||
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
|
||||
OBJS-$(CONFIG_JPEG2000_DECODER) += j2kdec.o mqcdec.o mqc.o j2k.o j2k_dwt.o
|
||||
#OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
||||
OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o \
|
||||
mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o
|
||||
OBJS-$(CONFIG_JV_DECODER) += jvdec.o
|
||||
OBJS-$(CONFIG_KGV1_DECODER) += kgv1dec.o
|
||||
OBJS-$(CONFIG_KMVC_DECODER) += kmvc.o
|
||||
OBJS-$(CONFIG_LAGARITH_DECODER) += lagarith.o lagarithrac.o
|
||||
OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc.o mjpeg.o \
|
||||
mpegvideo_enc.o motion_est.o \
|
||||
ratecontrol.o mpeg12data.o \
|
||||
mpegvideo.o
|
||||
OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc.o mjpeg.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_LOCO_DECODER) += loco.o
|
||||
OBJS-$(CONFIG_MACE3_DECODER) += mace.o
|
||||
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
|
||||
OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o
|
||||
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o \
|
||||
mpegvideo_enc.o motion_est.o \
|
||||
ratecontrol.o mpeg12data.o \
|
||||
mpegvideo.o
|
||||
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12data.o mpegvideo.o
|
||||
OBJS-$(CONFIG_MJPEGB_DECODER) += mjpegbdec.o mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_MLP_DECODER) += mlpdec.o mlpdsp.o
|
||||
OBJS-$(CONFIG_MLP_DECODER) += mlpdec.o mlp_parser.o mlp.o
|
||||
OBJS-$(CONFIG_MMVIDEO_DECODER) += mmvideo.o
|
||||
OBJS-$(CONFIG_MOTIONPIXELS_DECODER) += motionpixels.o
|
||||
OBJS-$(CONFIG_MP1_DECODER) += mpegaudiodec.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP1FLOAT_DECODER) += mpegaudiodec_float.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP2_DECODER) += mpegaudiodec.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP2_ENCODER) += mpegaudioenc.o mpegaudio.o \
|
||||
mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP2FLOAT_DECODER) += mpegaudiodec_float.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3ADU_DECODER) += mpegaudiodec.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3ADUFLOAT_DECODER) += mpegaudiodec_float.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3ON4_DECODER) += mpegaudiodec.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o \
|
||||
mpeg4audio.o
|
||||
OBJS-$(CONFIG_MP3ON4FLOAT_DECODER) += mpegaudiodec_float.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o \
|
||||
mpeg4audio.o
|
||||
OBJS-$(CONFIG_MP3_DECODER) += mpegaudiodec.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3FLOAT_DECODER) += mpegaudiodec_float.o mpegaudiodecheader.o \
|
||||
mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPC7_DECODER) += mpc7.o mpc.o mpegaudiodec.o \
|
||||
mpegaudiodecheader.o mpegaudio.o \
|
||||
mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o \
|
||||
mpegaudiodecheader.o mpegaudio.o \
|
||||
mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
|
||||
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||
h263.o ituh263dec.o mpeg4videodec.o
|
||||
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||
h263.o ituh263dec.o mpeg4videodec.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||
h263.o ituh263dec.o mpeg4videodec.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||
h263.o ituh263dec.o mpeg4videodec.o
|
||||
OBJS-$(CONFIG_MP1_DECODER) += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP2_DECODER) += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP2_ENCODER) += mpegaudioenc.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3ADU_DECODER) += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3ON4_DECODER) += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_MP3_DECODER) += mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPC7_DECODER) += mpc7.o mpc.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEG_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG1_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12data.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12data.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG4_DECODER) += h263dec.o h263.o mpeg4video_parser.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG4_ENCODER) += mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V1_ENCODER) += msmpeg4.o msmpeg4data.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4data.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4data.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
||||
OBJS-$(CONFIG_MSVIDEO1_DECODER) += msvideo1.o
|
||||
OBJS-$(CONFIG_MSVIDEO1_ENCODER) += msvideo1enc.o elbg.o
|
||||
OBJS-$(CONFIG_MSZH_DECODER) += lcldec.o
|
||||
OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o
|
||||
OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o
|
||||
OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
|
||||
OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PAM_ENCODER) += pamenc.o pnm.o
|
||||
OBJS-$(CONFIG_PBM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PAM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PCX_DECODER) += pcx.o
|
||||
OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o
|
||||
OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PGM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PGMYUV_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PGSSUB_DECODER) += pgssubdec.o
|
||||
OBJS-$(CONFIG_PICTOR_DECODER) += pictordec.o cga_data.o
|
||||
OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o
|
||||
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
||||
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PTX_DECODER) += ptx.o
|
||||
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \
|
||||
celp_filters.o acelp_vectors.o \
|
||||
acelp_filters.o
|
||||
OBJS-$(CONFIG_QDM2_DECODER) += qdm2.o mpegaudiodec.o \
|
||||
mpegaudiodecheader.o mpegaudio.o \
|
||||
mpegaudiodata.o
|
||||
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o qcelp_lsp.o celp_math.o celp_filters.o
|
||||
OBJS-$(CONFIG_QDM2_DECODER) += qdm2.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_QDRAW_DECODER) += qdrw.o
|
||||
OBJS-$(CONFIG_QPEG_DECODER) += qpeg.o
|
||||
OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
|
||||
OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o
|
||||
OBJS-$(CONFIG_R10K_DECODER) += r210dec.o
|
||||
OBJS-$(CONFIG_R210_DECODER) += r210dec.o
|
||||
OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o
|
||||
OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o
|
||||
OBJS-$(CONFIG_RA_144_DECODER) += ra144.o celp_filters.o
|
||||
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o
|
||||
OBJS-$(CONFIG_RAWVIDEO_DECODER) += rawdec.o
|
||||
OBJS-$(CONFIG_RAWVIDEO_ENCODER) += rawenc.o
|
||||
@@ -328,118 +182,77 @@ OBJS-$(CONFIG_ROQ_ENCODER) += roqvideoenc.o roqvideo.o elbg.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_ENCODER) += roqaudioenc.o
|
||||
OBJS-$(CONFIG_RPZA_DECODER) += rpza.o
|
||||
OBJS-$(CONFIG_RV10_DECODER) += rv10.o
|
||||
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o
|
||||
OBJS-$(CONFIG_RV20_DECODER) += rv10.o
|
||||
OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o
|
||||
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv40dsp.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
||||
OBJS-$(CONFIG_RV10_DECODER) += rv10.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV10_ENCODER) += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV20_DECODER) += rv10.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV20_ENCODER) += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o h264pred.o rv30dsp.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o h264pred.o rv40dsp.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
||||
OBJS-$(CONFIG_SGI_ENCODER) += sgienc.o rle.o
|
||||
OBJS-$(CONFIG_SHORTEN_DECODER) += shorten.o
|
||||
OBJS-$(CONFIG_SIPR_DECODER) += sipr.o acelp_pitch_delay.o \
|
||||
celp_math.o acelp_vectors.o \
|
||||
acelp_filters.o celp_filters.o \
|
||||
sipr16k.o
|
||||
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o
|
||||
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o
|
||||
OBJS-$(CONFIG_SMC_DECODER) += smc.o
|
||||
OBJS-$(CONFIG_SNOW_DECODER) += snow.o rangecoder.o
|
||||
OBJS-$(CONFIG_SNOW_ENCODER) += snow.o rangecoder.o motion_est.o \
|
||||
ratecontrol.o h263.o \
|
||||
mpegvideo.o error_resilience.o \
|
||||
ituh263enc.o mpegvideo_enc.o \
|
||||
mpeg12data.o
|
||||
OBJS-$(CONFIG_SNOW_ENCODER) += snow.o rangecoder.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
|
||||
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
|
||||
OBJS-$(CONFIG_SONIC_LS_ENCODER) += sonic.o
|
||||
OBJS-$(CONFIG_SP5X_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o
|
||||
OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o
|
||||
OBJS-$(CONFIG_SUNRAST_DECODER) += sunrast.o
|
||||
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o \
|
||||
motion_est.o h263.o \
|
||||
mpegvideo.o error_resilience.o \
|
||||
ituh263enc.o mpegvideo_enc.o \
|
||||
ratecontrol.o mpeg12data.o
|
||||
OBJS-$(CONFIG_SVQ3_DECODER) += h264.o svq3.o \
|
||||
h264_loopfilter.o h264_direct.o \
|
||||
h264_sei.o h264_ps.o h264_refs.o \
|
||||
h264_cavlc.o h264_cabac.o cabac.o \
|
||||
mpegvideo.o error_resilience.o \
|
||||
svq1dec.o svq1.o h263.o
|
||||
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o motion_est.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_SVQ3_DECODER) += h264.o h264idct.o h264pred.o h264_parser.o cabac.o mpegvideo.o error_resilience.o svq1dec.o svq1.o h263.o
|
||||
OBJS-$(CONFIG_TARGA_DECODER) += targa.o
|
||||
OBJS-$(CONFIG_TARGA_ENCODER) += targaenc.o rle.o
|
||||
OBJS-$(CONFIG_THEORA_DECODER) += xiph.o
|
||||
OBJS-$(CONFIG_THEORA_DECODER) += vp3.o xiph.o vp3dsp.o
|
||||
OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
|
||||
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o
|
||||
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o
|
||||
OBJS-$(CONFIG_TMV_DECODER) += tmv.o cga_data.o
|
||||
OBJS-$(CONFIG_TRUEMOTION1_DECODER) += truemotion1.o
|
||||
OBJS-$(CONFIG_TRUEMOTION2_DECODER) += truemotion2.o
|
||||
OBJS-$(CONFIG_TRUESPEECH_DECODER) += truespeech.o
|
||||
OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o
|
||||
OBJS-$(CONFIG_TTA_DECODER) += tta.o
|
||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o celp_math.o
|
||||
OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o
|
||||
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
|
||||
OBJS-$(CONFIG_V210_DECODER) += v210dec.o
|
||||
OBJS-$(CONFIG_V210_ENCODER) += v210enc.o
|
||||
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
|
||||
OBJS-$(CONFIG_VB_DECODER) += vb.o
|
||||
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
|
||||
msmpeg4.o msmpeg4data.o \
|
||||
intrax8.o intrax8dsp.o
|
||||
OBJS-$(CONFIG_VC1_DXVA2_HWACCEL) += dxva2_vc1.o
|
||||
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o
|
||||
OBJS-$(CONFIG_VC1_DECODER) += vc1.o vc1data.o vc1dsp.o msmpeg4data.o h263dec.o h263.o intrax8.o intrax8dsp.o error_resilience.o mpegvideo.o msmpeg4.o
|
||||
OBJS-$(CONFIG_VC1_VDPAU_DECODER) += vdpau.o vc1.o vc1data.o vc1dsp.o msmpeg4data.o h263dec.o h263.o intrax8.o intrax8dsp.o error_resilience.o mpegvideo.o msmpeg4.o
|
||||
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
|
||||
OBJS-$(CONFIG_VCR1_ENCODER) += vcr1.o
|
||||
OBJS-$(CONFIG_VMDAUDIO_DECODER) += vmdav.o
|
||||
OBJS-$(CONFIG_VMDVIDEO_DECODER) += vmdav.o
|
||||
OBJS-$(CONFIG_VMNC_DECODER) += vmnc.o
|
||||
OBJS-$(CONFIG_VORBIS_DECODER) += vorbisdec.o vorbis.o \
|
||||
vorbis_data.o xiph.o
|
||||
OBJS-$(CONFIG_VORBIS_ENCODER) += vorbisenc.o vorbis.o \
|
||||
vorbis_data.o
|
||||
OBJS-$(CONFIG_VORBIS_DECODER) += vorbis_dec.o vorbis.o vorbis_data.o xiph.o
|
||||
OBJS-$(CONFIG_VORBIS_ENCODER) += vorbis_enc.o vorbis.o vorbis_data.o
|
||||
OBJS-$(CONFIG_VP3_DECODER) += vp3.o vp3dsp.o
|
||||
OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vp56dsp.o \
|
||||
vp3dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
||||
vp3dsp.o vp6dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vp3dsp.o
|
||||
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp3dsp.o vp6dsp.o huffman.o
|
||||
OBJS-$(CONFIG_VP6A_DECODER) += vp6.o vp56.o vp56data.o vp3dsp.o vp6dsp.o huffman.o
|
||||
OBJS-$(CONFIG_VP6F_DECODER) += vp6.o vp56.o vp56data.o vp3dsp.o vp6dsp.o huffman.o
|
||||
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
|
||||
OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o
|
||||
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o
|
||||
OBJS-$(CONFIG_WMAV1_DECODER) += wmadec.o wma.o aactab.o
|
||||
OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o aactab.o
|
||||
OBJS-$(CONFIG_WMAV2_DECODER) += wmadec.o wma.o aactab.o
|
||||
OBJS-$(CONFIG_WMAV2_ENCODER) += wmaenc.o wma.o aactab.o
|
||||
OBJS-$(CONFIG_WMAVOICE_DECODER) += wmavoice.o \
|
||||
celp_math.o celp_filters.o \
|
||||
acelp_vectors.o acelp_filters.o
|
||||
OBJS-$(CONFIG_WMV1_DECODER) += msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_WMV2_DECODER) += wmv2dec.o wmv2.o \
|
||||
msmpeg4.o msmpeg4data.o \
|
||||
intrax8.o intrax8dsp.o
|
||||
OBJS-$(CONFIG_WMV2_ENCODER) += wmv2enc.o wmv2.o \
|
||||
msmpeg4.o msmpeg4data.o \
|
||||
mpeg4videodec.o ituh263dec.o h263dec.o
|
||||
OBJS-$(CONFIG_WMAV1_DECODER) += wmadec.o wma.o
|
||||
OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o
|
||||
OBJS-$(CONFIG_WMAV2_DECODER) += wmadec.o wma.o
|
||||
OBJS-$(CONFIG_WMAV2_ENCODER) += wmaenc.o wma.o
|
||||
OBJS-$(CONFIG_WMV1_DECODER) += h263dec.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_WMV1_ENCODER) += mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_WMV2_DECODER) += wmv2dec.o wmv2.o msmpeg4.o msmpeg4data.o h263dec.o h263.o intrax8.o intrax8dsp.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_WMV2_ENCODER) += wmv2enc.o wmv2.o msmpeg4.o msmpeg4data.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_WMV3_DECODER) += vc1.o vc1data.o vc1dsp.o msmpeg4data.o h263dec.o h263.o intrax8.o intrax8dsp.o error_resilience.o mpegvideo.o msmpeg4.o
|
||||
OBJS-$(CONFIG_WMV3_VDPAU_DECODER) += vdpau.o vc1.o vc1data.o vc1dsp.o msmpeg4data.o h263dec.o h263.o intrax8.o intrax8dsp.o error_resilience.o mpegvideo.o msmpeg4.o
|
||||
OBJS-$(CONFIG_WNV1_DECODER) += wnv1.o
|
||||
OBJS-$(CONFIG_WS_SND1_DECODER) += ws-snd1.o
|
||||
OBJS-$(CONFIG_XAN_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_XAN_WC3_DECODER) += xan.o
|
||||
OBJS-$(CONFIG_XAN_WC4_DECODER) += xxan.o
|
||||
OBJS-$(CONFIG_XAN_WC4_DECODER) += xan.o
|
||||
OBJS-$(CONFIG_XL_DECODER) += xl.o
|
||||
OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o
|
||||
OBJS-$(CONFIG_XSUB_ENCODER) += xsubenc.o
|
||||
OBJS-$(CONFIG_YOP_DECODER) += yop.o
|
||||
OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o
|
||||
OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o
|
||||
OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o
|
||||
@@ -448,7 +261,6 @@ OBJS-$(CONFIG_ZMBV_ENCODER) += zmbvenc.o
|
||||
# (AD)PCM decoders/encoders
|
||||
OBJS-$(CONFIG_PCM_ALAW_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_ALAW_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_BLURAY_DECODER) += pcm-mpeg.o
|
||||
OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_DVD_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F32BE_DECODER) += pcm.o
|
||||
@@ -459,7 +271,6 @@ OBJS-$(CONFIG_PCM_F64BE_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F64BE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F64LE_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F64LE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_LXF_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_MULAW_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o
|
||||
@@ -506,8 +317,6 @@ OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o
|
||||
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o
|
||||
OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o
|
||||
@@ -535,199 +344,195 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o
|
||||
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcm.o
|
||||
|
||||
# libavformat dependencies
|
||||
OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_DV_DEMUXER) += dvdata.o
|
||||
OBJS-$(CONFIG_DV_MUXER) += dvdata.o
|
||||
OBJS-$(CONFIG_FLAC_DEMUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLAC_MUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||
OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_EAC3_DEMUXER) += ac3_parser.o ac3tab.o aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_FLAC_MUXER) += flacdec.o
|
||||
OBJS-$(CONFIG_GXF_DEMUXER) += mpeg12data.o
|
||||
OBJS-$(CONFIG_IFF_DEMUXER) += iff.o
|
||||
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o vorbis_data.o \
|
||||
flacdec.o flacdata.o flac.o
|
||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
||||
flacdec.o flacdata.o flac.o \
|
||||
mpegaudiodata.o vorbis_data.o
|
||||
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o flacdec.o
|
||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o
|
||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o flacdec.o
|
||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_MPEGTS_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o
|
||||
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
||||
OBJS-$(CONFIG_OGG_DEMUXER) += flacdec.o flacdata.o flac.o \
|
||||
dirac.o mpeg12data.o vorbis_data.o
|
||||
OBJS-$(CONFIG_OGG_MUXER) += xiph.o flacdec.o flacdata.o flac.o \
|
||||
vorbis_data.o
|
||||
OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o mpegvideo.o xiph.o
|
||||
OBJS-$(CONFIG_SPDIF_DEMUXER) += aacadtsdec.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_WEBM_MUXER) += xiph.o mpeg4audio.o \
|
||||
flacdec.o flacdata.o flac.o \
|
||||
mpegaudiodata.o vorbis_data.o
|
||||
OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_OGG_DEMUXER) += flacdec.o
|
||||
OBJS-$(CONFIG_OGG_MUXER) += xiph.o flacdec.o
|
||||
OBJS-$(CONFIG_RTP_MUXER) += mpegvideo.o
|
||||
|
||||
# external codec libraries
|
||||
OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
|
||||
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
||||
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
|
||||
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
|
||||
OBJS-$(CONFIG_LIBGSM_DECODER) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBGSM_ENCODER) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBGSM_MS_DECODER) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBGSM_MS_ENCODER) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpeg.o
|
||||
OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o \
|
||||
libschroedinger.o \
|
||||
libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
||||
libschroedinger.o \
|
||||
libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
||||
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
||||
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
||||
OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbis.o vorbis_data.o
|
||||
OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o
|
||||
OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o
|
||||
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
|
||||
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
|
||||
OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o
|
||||
OBJS-$(CONFIG_LIBAMR_NB) += libamr.o
|
||||
OBJS-$(CONFIG_LIBAMR_WB) += libamr.o
|
||||
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
|
||||
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBFAAC) += libfaac.o
|
||||
OBJS-$(CONFIG_LIBFAAD) += libfaad.o
|
||||
OBJS-$(CONFIG_LIBGSM) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBMP3LAME) += libmp3lame.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRWB) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG) += libopenjpeg.o
|
||||
OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o libschroedinger.o libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o libschroedinger.o libdirac_libschro.o
|
||||
OBJS-$(CONFIG_LIBSPEEX) += libspeexdec.o
|
||||
OBJS-$(CONFIG_LIBTHEORA) += libtheoraenc.o
|
||||
OBJS-$(CONFIG_LIBVORBIS) += libvorbis.o
|
||||
OBJS-$(CONFIG_LIBX264) += libx264.o
|
||||
OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o
|
||||
|
||||
# parsers
|
||||
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
|
||||
aacadtsdec.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
|
||||
aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
|
||||
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o
|
||||
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
|
||||
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o
|
||||
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
||||
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
|
||||
OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o \
|
||||
vorbis_data.o
|
||||
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
||||
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
||||
cabac.o \
|
||||
h264_refs.o h264_sei.o h264_direct.o \
|
||||
h264_loopfilter.o h264_cabac.o \
|
||||
h264_cavlc.o h264_ps.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_AAC_LATM_PARSER) += latm_parser.o
|
||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o
|
||||
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
||||
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
|
||||
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
||||
mpegvideo.o error_resilience.o \
|
||||
mpeg4videodec.o mpeg4video.o \
|
||||
ituh263dec.o h263dec.o
|
||||
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o \
|
||||
mpegaudiodecheader.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o \
|
||||
mpeg12.o mpeg12data.o \
|
||||
mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o mpegaudiodecheader.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o
|
||||
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \
|
||||
msmpeg4.o msmpeg4data.o mpeg4video.o \
|
||||
h263.o mpegvideo.o error_resilience.o
|
||||
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o
|
||||
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
|
||||
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
|
||||
|
||||
# bitstream filters
|
||||
OBJS-$(CONFIG_AAC_ADTSTOASC_BSF) += aac_adtstoasc_bsf.o aacadtsdec.o \
|
||||
mpeg4audio.o
|
||||
OBJS-$(CONFIG_CHOMP_BSF) += chomp_bsf.o
|
||||
OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o
|
||||
OBJS-$(CONFIG_H264_MP4TOANNEXB_BSF) += h264_mp4toannexb_bsf.o
|
||||
OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF) += imx_dump_header_bsf.o
|
||||
OBJS-$(CONFIG_MJPEG2JPEG_BSF) += mjpeg2jpeg_bsf.o mjpeg.o
|
||||
OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpega_dump_header_bsf.o
|
||||
OBJS-$(CONFIG_MOV2TEXTSUB_BSF) += movsub_bsf.o
|
||||
OBJS-$(CONFIG_MP3_HEADER_COMPRESS_BSF) += mp3_header_compress_bsf.o
|
||||
OBJS-$(CONFIG_MP3_HEADER_DECOMPRESS_BSF) += mp3_header_decompress_bsf.o \
|
||||
mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MP3_HEADER_DECOMPRESS_BSF) += mp3_header_decompress_bsf.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_NOISE_BSF) += noise_bsf.o
|
||||
OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o
|
||||
OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
|
||||
|
||||
# thread libraries
|
||||
OBJS-$(HAVE_BEOSTHREADS) += beosthread.o
|
||||
OBJS-$(HAVE_OS2THREADS) += os2thread.o
|
||||
OBJS-$(HAVE_PTHREADS) += pthread.o
|
||||
OBJS-$(HAVE_W32THREADS) += w32thread.o
|
||||
|
||||
# processor-specific code
|
||||
YASM-OBJS-FFT-$(HAVE_AMD3DNOW) += x86/fft_3dn.o
|
||||
YASM-OBJS-FFT-$(HAVE_AMD3DNOWEXT) += x86/fft_3dn2.o
|
||||
YASM-OBJS-FFT-$(HAVE_SSE) += x86/fft_sse.o
|
||||
YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o $(YASM-OBJS-FFT-yes)
|
||||
YASM-OBJS-$(CONFIG_GPL) += x86/h264_deblock_sse2.o \
|
||||
x86/h264_idct_sse2.o \
|
||||
|
||||
MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp_mmx.o
|
||||
MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o
|
||||
MMX-OBJS-$(CONFIG_FLAC_ENCODER) += x86/flacdsp_mmx.o
|
||||
MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o
|
||||
MMX-OBJS-$(CONFIG_SNOW_DECODER) += x86/snowdsp_mmx.o
|
||||
MMX-OBJS-$(CONFIG_THEORA_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o
|
||||
MMX-OBJS-$(CONFIG_VP3_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_VP5_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_VP6_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o \
|
||||
x86/vp6dsp_mmx.o x86/vp6dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_VP6A_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o \
|
||||
x86/vp6dsp_mmx.o x86/vp6dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_VP6F_DECODER) += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o \
|
||||
x86/vp6dsp_mmx.o x86/vp6dsp_sse2.o
|
||||
MMX-OBJS-$(CONFIG_WMV3_DECODER) += x86/vc1dsp_mmx.o
|
||||
MMX-OBJS-$(HAVE_YASM) += x86/dsputil_yasm.o \
|
||||
$(YASM-OBJS-yes)
|
||||
|
||||
OBJS-$(HAVE_MMX) += x86/cpuid.o \
|
||||
x86/dnxhd_mmx.o \
|
||||
x86/dsputil_mmx.o \
|
||||
x86/fdct_mmx.o \
|
||||
x86/idct_mmx_xvid.o \
|
||||
x86/idct_sse2_xvid.o \
|
||||
x86/motion_est_mmx.o \
|
||||
x86/mpegvideo_mmx.o \
|
||||
x86/simple_idct_mmx.o \
|
||||
$(MMX-OBJS-yes)
|
||||
|
||||
OBJS-$(ARCH_ALPHA) += alpha/dsputil_alpha.o \
|
||||
alpha/dsputil_alpha_asm.o \
|
||||
alpha/motion_est_alpha.o \
|
||||
alpha/motion_est_mvi_asm.o \
|
||||
alpha/mpegvideo_alpha.o \
|
||||
alpha/simple_idct_alpha.o \
|
||||
|
||||
OBJS-$(ARCH_ARM) += arm/dsputil_arm.o \
|
||||
arm/dsputil_arm_s.o \
|
||||
arm/jrevdct_arm.o \
|
||||
arm/mpegvideo_arm.o \
|
||||
arm/simple_idct_arm.o \
|
||||
|
||||
OBJS-$(HAVE_ARMV5TE) += arm/mpegvideo_armv5te.o \
|
||||
arm/mpegvideo_armv5te_s.o \
|
||||
arm/simple_idct_armv5te.o \
|
||||
|
||||
OBJS-$(HAVE_ARMV6) += arm/simple_idct_armv6.o \
|
||||
|
||||
OBJS-$(HAVE_ARMVFP) += arm/dsputil_vfp.o \
|
||||
arm/float_arm_vfp.o \
|
||||
|
||||
OBJS-$(HAVE_IWMMXT) += arm/dsputil_iwmmxt.o \
|
||||
arm/mpegvideo_iwmmxt.o \
|
||||
|
||||
OBJS-$(HAVE_NEON) += arm/dsputil_neon.o \
|
||||
arm/dsputil_neon_s.o \
|
||||
arm/h264dsp_neon.o \
|
||||
arm/h264idct_neon.o \
|
||||
arm/simple_idct_neon.o \
|
||||
|
||||
OBJS-$(ARCH_BFIN) += bfin/dsputil_bfin.o \
|
||||
bfin/fdct_bfin.o \
|
||||
bfin/idct_bfin.o \
|
||||
bfin/mpegvideo_bfin.o \
|
||||
bfin/pixels_bfin.o \
|
||||
bfin/vp3_bfin.o \
|
||||
bfin/vp3_idct_bfin.o \
|
||||
|
||||
OBJS-$(ARCH_PPC) += ppc/dsputil_ppc.o \
|
||||
|
||||
ALTIVEC-OBJS-$(CONFIG_H264_DECODER) += ppc/h264_altivec.o
|
||||
ALTIVEC-OBJS-$(CONFIG_OLDSCALER) += ppc/imgresample_altivec.o
|
||||
ALTIVEC-OBJS-$(CONFIG_SNOW_DECODER) += ppc/snow_altivec.o
|
||||
ALTIVEC-OBJS-$(CONFIG_VC1_DECODER) += ppc/vc1dsp_altivec.o
|
||||
ALTIVEC-OBJS-$(CONFIG_WMV3_DECODER) += ppc/vc1dsp_altivec.o
|
||||
|
||||
OBJS-$(HAVE_ALTIVEC) += ppc/check_altivec.o \
|
||||
ppc/dsputil_altivec.o \
|
||||
ppc/fdct_altivec.o \
|
||||
ppc/fft_altivec.o \
|
||||
ppc/float_altivec.o \
|
||||
ppc/gmc_altivec.o \
|
||||
ppc/idct_altivec.o \
|
||||
ppc/int_altivec.o \
|
||||
ppc/mpegvideo_altivec.o \
|
||||
$(ALTIVEC-OBJS-yes)
|
||||
|
||||
OBJS-$(ARCH_SH4) += sh4/dsputil_align.o \
|
||||
sh4/dsputil_sh4.o \
|
||||
sh4/idct_sh4.o \
|
||||
|
||||
OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
|
||||
|
||||
# inverse.o contains the ff_inverse table definition, which is used by
|
||||
# the FASTDIV macro (from libavutil); since referencing the external
|
||||
# table has a negative effect on performance, copy it in libavcodec as
|
||||
# well.
|
||||
OBJS-$(!CONFIG_SMALL) += inverse.o
|
||||
OBJS-$(HAVE_MMI) += ps2/dsputil_mmi.o \
|
||||
ps2/idct_mmi.o \
|
||||
ps2/mpegvideo_mmi.o \
|
||||
|
||||
-include $(SUBDIR)$(ARCH)/Makefile
|
||||
OBJS-$(HAVE_VIS) += sparc/dsputil_vis.o \
|
||||
sparc/simple_idct_vis.o \
|
||||
|
||||
SKIPHEADERS += %_tablegen.h \
|
||||
%_tables.h \
|
||||
aac_tablegen_decl.h \
|
||||
fft-internal.h \
|
||||
tableprint.h \
|
||||
$(ARCH)/vp56_arith.h
|
||||
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
|
||||
SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h
|
||||
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
|
||||
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
||||
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
|
||||
|
||||
TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder snow
|
||||
TESTPROGS-$(HAVE_MMX) += motion
|
||||
TESTOBJS = dctref.o
|
||||
|
||||
HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen \
|
||||
dv_tablegen motionpixels_tablegen mpegaudio_tablegen \
|
||||
pcm_tablegen qdm2_tablegen sinewin_tablegen
|
||||
TESTS = $(addsuffix -test$(EXESUF), cabac dct eval fft h264 rangecoder snow)
|
||||
TESTS-$(CONFIG_OLDSCALER) += imgresample-test$(EXESUF)
|
||||
TESTS-$(ARCH_X86) += x86/cpuid-test$(EXESUF) motion-test$(EXESUF)
|
||||
|
||||
CLEANFILES = apiexample$(EXESUF)
|
||||
DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
|
||||
|
||||
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
||||
|
||||
include $(SUBDIR)../subdir.mak
|
||||
|
||||
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
||||
|
||||
TRIG_TABLES = cos cos_fixed sin
|
||||
TRIG_TABLES := $(TRIG_TABLES:%=$(SUBDIR)%_tables.c)
|
||||
|
||||
$(TRIG_TABLES): $(SUBDIR)%_tables.c: $(SUBDIR)cos_tablegen$(HOSTEXESUF)
|
||||
$(M)./$< $* > $@
|
||||
|
||||
ifdef CONFIG_SMALL
|
||||
$(SUBDIR)%_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DCONFIG_SMALL=1
|
||||
else
|
||||
$(SUBDIR)%_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DCONFIG_SMALL=0
|
||||
endif
|
||||
|
||||
GEN_HEADERS = cbrt_tables.h aacps_tables.h aac_tables.h dv_tables.h \
|
||||
sinewin_tables.h mpegaudio_tables.h motionpixels_tables.h \
|
||||
pcm_tables.h qdm2_tables.h
|
||||
GEN_HEADERS := $(addprefix $(SUBDIR), $(GEN_HEADERS))
|
||||
|
||||
$(GEN_HEADERS): $(SUBDIR)%_tables.h: $(SUBDIR)%_tablegen$(HOSTEXESUF)
|
||||
$(M)./$< > $@
|
||||
|
||||
ifdef CONFIG_HARDCODED_TABLES
|
||||
$(SUBDIR)aacdec.o: $(SUBDIR)cbrt_tables.h
|
||||
$(SUBDIR)aacps.o: $(SUBDIR)aacps_tables.h
|
||||
$(SUBDIR)aactab.o: $(SUBDIR)aac_tables.h
|
||||
$(SUBDIR)dv.o: $(SUBDIR)dv_tables.h
|
||||
$(SUBDIR)sinewin.o: $(SUBDIR)sinewin_tables.h
|
||||
$(SUBDIR)mpegaudiodec.o: $(SUBDIR)mpegaudio_tables.h
|
||||
$(SUBDIR)mpegaudiodec_float.o: $(SUBDIR)mpegaudio_tables.h
|
||||
$(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables.h
|
||||
$(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
|
||||
$(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
|
||||
endif
|
||||
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o $(SUBDIR)aandcttab.o
|
||||
|
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* a64 video encoder - c64 colors in rgb (Pepto)
|
||||
* Copyright (c) 2009 Tobias Bindhammer
|
||||
*
|
||||
* 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
|
||||
* a64 video encoder - c64 colors in rgb
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_A64COLORS_H
|
||||
#define AVCODEC_A64COLORS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* c64 palette in RGB */
|
||||
static const uint8_t a64_palette[16][3] = {
|
||||
{0x00, 0x00, 0x00},
|
||||
{0xff, 0xff, 0xff},
|
||||
{0x68, 0x37, 0x2b},
|
||||
{0x70, 0xa4, 0xb2},
|
||||
{0x6f, 0x3d, 0x86},
|
||||
{0x58, 0x8d, 0x43},
|
||||
{0x35, 0x28, 0x79},
|
||||
{0xb8, 0xc7, 0x6f},
|
||||
{0x6f, 0x4f, 0x25},
|
||||
{0x43, 0x39, 0x00},
|
||||
{0x9a, 0x67, 0x59},
|
||||
{0x44, 0x44, 0x44},
|
||||
{0x6c, 0x6c, 0x6c},
|
||||
{0x9a, 0xd2, 0x84},
|
||||
{0x6c, 0x5e, 0xb5},
|
||||
{0x95, 0x95, 0x95},
|
||||
};
|
||||
|
||||
#endif /* AVCODEC_A64COLORS_H */
|
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* a64 video encoder - basic headers
|
||||
* Copyright (c) 2009 Tobias Bindhammer
|
||||
*
|
||||
* 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
|
||||
* a64 video encoder - basic headers
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_A64ENC_H
|
||||
#define AVCODEC_A64ENC_H
|
||||
|
||||
#include "libavutil/lfg.h"
|
||||
#include "avcodec.h"
|
||||
|
||||
#define C64XRES 320
|
||||
#define C64YRES 200
|
||||
|
||||
typedef struct A64Context {
|
||||
/* general variables */
|
||||
AVFrame picture;
|
||||
|
||||
/* variables for multicolor modes */
|
||||
AVLFG randctx;
|
||||
int mc_lifetime;
|
||||
int mc_use_5col;
|
||||
int mc_frame_counter;
|
||||
int *mc_meta_charset;
|
||||
int *mc_charmap;
|
||||
int *mc_best_cb;
|
||||
int mc_luma_vals[5];
|
||||
uint8_t *mc_charset;
|
||||
uint8_t *mc_colram;
|
||||
uint8_t *mc_palette;
|
||||
int mc_pal_size;
|
||||
} A64Context;
|
||||
|
||||
#endif /* AVCODEC_A64ENC_H */
|
@@ -1,387 +0,0 @@
|
||||
/*
|
||||
* a64 video encoder - multicolor modes
|
||||
* Copyright (c) 2009 Tobias Bindhammer
|
||||
*
|
||||
* 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
|
||||
* a64 video encoder - multicolor modes
|
||||
*/
|
||||
|
||||
#include "a64enc.h"
|
||||
#include "a64colors.h"
|
||||
#include "a64tables.h"
|
||||
#include "elbg.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
|
||||
#define DITHERSTEPS 8
|
||||
#define CHARSET_CHARS 256
|
||||
#define INTERLACED 1
|
||||
#define CROP_SCREENS 1
|
||||
|
||||
/* gray gradient */
|
||||
static const int mc_colors[5]={0x0,0xb,0xc,0xf,0x1};
|
||||
|
||||
/* other possible gradients - to be tested */
|
||||
//static const int mc_colors[5]={0x0,0x8,0xa,0xf,0x7};
|
||||
//static const int mc_colors[5]={0x0,0x9,0x8,0xa,0x3};
|
||||
|
||||
static void to_meta_with_crop(AVCodecContext *avctx, AVFrame *p, int *dest)
|
||||
{
|
||||
int blockx, blocky, x, y;
|
||||
int luma = 0;
|
||||
int height = FFMIN(avctx->height, C64YRES);
|
||||
int width = FFMIN(avctx->width , C64XRES);
|
||||
uint8_t *src = p->data[0];
|
||||
|
||||
for (blocky = 0; blocky < C64YRES; blocky += 8) {
|
||||
for (blockx = 0; blockx < C64XRES; blockx += 8) {
|
||||
for (y = blocky; y < blocky + 8 && y < C64YRES; y++) {
|
||||
for (x = blockx; x < blockx + 8 && x < C64XRES; x += 2) {
|
||||
if(x < width && y < height) {
|
||||
/* build average over 2 pixels */
|
||||
luma = (src[(x + 0 + y * p->linesize[0])] +
|
||||
src[(x + 1 + y * p->linesize[0])]) / 2;
|
||||
/* write blocks as linear data now so they are suitable for elbg */
|
||||
dest[0] = luma;
|
||||
}
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void render_charset(AVCodecContext *avctx, uint8_t *charset,
|
||||
uint8_t *colrammap)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
uint8_t row1, row2;
|
||||
int charpos, x, y;
|
||||
int a, b;
|
||||
uint8_t pix;
|
||||
int lowdiff, highdiff;
|
||||
int *best_cb = c->mc_best_cb;
|
||||
static uint8_t index1[256];
|
||||
static uint8_t index2[256];
|
||||
static uint8_t dither[256];
|
||||
int i;
|
||||
int distance;
|
||||
|
||||
/* generate lookup-tables for dither and index before looping */
|
||||
i = 0;
|
||||
for (a=0; a < 256; a++) {
|
||||
if(i < c->mc_pal_size -1 && a == c->mc_luma_vals[i + 1]) {
|
||||
distance = c->mc_luma_vals[i + 1] - c->mc_luma_vals[i];
|
||||
for(b = 0; b <= distance; b++) {
|
||||
dither[c->mc_luma_vals[i] + b] = b * (DITHERSTEPS - 1) / distance;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if(i >= c->mc_pal_size - 1) dither[a] = 0;
|
||||
index1[a] = i;
|
||||
index2[a] = FFMIN(i + 1, c->mc_pal_size - 1);
|
||||
}
|
||||
|
||||
/* and render charset */
|
||||
for (charpos = 0; charpos < CHARSET_CHARS; charpos++) {
|
||||
lowdiff = 0;
|
||||
highdiff = 0;
|
||||
for (y = 0; y < 8; y++) {
|
||||
row1 = 0; row2 = 0;
|
||||
for (x = 0; x < 4; x++) {
|
||||
pix = best_cb[y * 4 + x];
|
||||
|
||||
/* accumulate error for brightest/darkest color */
|
||||
if (index1[pix] >= 3)
|
||||
highdiff += pix - c->mc_luma_vals[3];
|
||||
if (index1[pix] < 1)
|
||||
lowdiff += c->mc_luma_vals[1] - pix;
|
||||
|
||||
row1 <<= 2;
|
||||
|
||||
if (INTERLACED) {
|
||||
row2 <<= 2;
|
||||
if (interlaced_dither_patterns[dither[pix]][(y & 3) * 2 + 0][x & 3])
|
||||
row1 |= 3-(index2[pix] & 3);
|
||||
else
|
||||
row1 |= 3-(index1[pix] & 3);
|
||||
|
||||
if (interlaced_dither_patterns[dither[pix]][(y & 3) * 2 + 1][x & 3])
|
||||
row2 |= 3-(index2[pix] & 3);
|
||||
else
|
||||
row2 |= 3-(index1[pix] & 3);
|
||||
}
|
||||
else {
|
||||
if (multi_dither_patterns[dither[pix]][(y & 3)][x & 3])
|
||||
row1 |= 3-(index2[pix] & 3);
|
||||
else
|
||||
row1 |= 3-(index1[pix] & 3);
|
||||
}
|
||||
}
|
||||
charset[y+0x000] = row1;
|
||||
if (INTERLACED) charset[y+0x800] = row2;
|
||||
}
|
||||
/* do we need to adjust pixels? */
|
||||
if (highdiff > 0 && lowdiff > 0 && c->mc_use_5col) {
|
||||
if (lowdiff > highdiff) {
|
||||
for (x = 0; x < 32; x++)
|
||||
best_cb[x] = FFMIN(c->mc_luma_vals[3], best_cb[x]);
|
||||
} else {
|
||||
for (x = 0; x < 32; x++)
|
||||
best_cb[x] = FFMAX(c->mc_luma_vals[1], best_cb[x]);
|
||||
}
|
||||
charpos--; /* redo now adjusted char */
|
||||
/* no adjustment needed, all fine */
|
||||
} else {
|
||||
/* advance pointers */
|
||||
best_cb += 32;
|
||||
charset += 8;
|
||||
|
||||
/* remember colorram value */
|
||||
colrammap[charpos] = (highdiff > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static av_cold int a64multi_close_encoder(AVCodecContext *avctx)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
av_free(c->mc_meta_charset);
|
||||
av_free(c->mc_best_cb);
|
||||
av_free(c->mc_charset);
|
||||
av_free(c->mc_charmap);
|
||||
av_free(c->mc_colram);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
int a;
|
||||
av_lfg_init(&c->randctx, 1);
|
||||
|
||||
if (avctx->global_quality < 1) {
|
||||
c->mc_lifetime = 4;
|
||||
} else {
|
||||
c->mc_lifetime = avctx->global_quality /= FF_QP2LAMBDA;
|
||||
}
|
||||
|
||||
av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime);
|
||||
|
||||
c->mc_frame_counter = 0;
|
||||
c->mc_use_5col = avctx->codec->id == CODEC_ID_A64_MULTI5;
|
||||
c->mc_pal_size = 4 + c->mc_use_5col;
|
||||
|
||||
/* precalc luma values for later use */
|
||||
for (a = 0; a < c->mc_pal_size; a++) {
|
||||
c->mc_luma_vals[a]=a64_palette[mc_colors[a]][0] * 0.30 +
|
||||
a64_palette[mc_colors[a]][1] * 0.59 +
|
||||
a64_palette[mc_colors[a]][2] * 0.11;
|
||||
}
|
||||
|
||||
if (!(c->mc_meta_charset = av_malloc(32000 * c->mc_lifetime * sizeof(int))) ||
|
||||
!(c->mc_best_cb = av_malloc(CHARSET_CHARS * 32 * sizeof(int))) ||
|
||||
!(c->mc_charmap = av_mallocz(1000 * c->mc_lifetime * sizeof(int))) ||
|
||||
!(c->mc_colram = av_mallocz(CHARSET_CHARS * sizeof(uint8_t))) ||
|
||||
!(c->mc_charset = av_malloc(0x800 * (INTERLACED+1) * sizeof(uint8_t)))) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Failed to allocate buffer memory.\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
/* set up extradata */
|
||||
if (!(avctx->extradata = av_mallocz(8 * 4 + FF_INPUT_BUFFER_PADDING_SIZE))) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Failed to allocate memory for extradata.\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
avctx->extradata_size = 8 * 4;
|
||||
AV_WB32(avctx->extradata, c->mc_lifetime);
|
||||
AV_WB32(avctx->extradata + 16, INTERLACED);
|
||||
|
||||
avcodec_get_frame_defaults(&c->picture);
|
||||
avctx->coded_frame = &c->picture;
|
||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||
avctx->coded_frame->key_frame = 1;
|
||||
if (!avctx->codec_tag)
|
||||
avctx->codec_tag = AV_RL32("a64m");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void a64_compress_colram(unsigned char *buf, int *charmap, uint8_t *colram)
|
||||
{
|
||||
int a;
|
||||
uint8_t temp;
|
||||
/* only needs to be done in 5col mode */
|
||||
/* XXX could be squeezed to 0x80 bytes */
|
||||
for (a = 0; a < 256; a++) {
|
||||
temp = colram[charmap[a + 0x000]] << 0;
|
||||
temp |= colram[charmap[a + 0x100]] << 1;
|
||||
temp |= colram[charmap[a + 0x200]] << 2;
|
||||
if (a < 0xe8) temp |= colram[charmap[a + 0x300]] << 3;
|
||||
buf[a] = temp << 2;
|
||||
}
|
||||
}
|
||||
|
||||
static int a64multi_encode_frame(AVCodecContext *avctx, unsigned char *buf,
|
||||
int buf_size, void *data)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
AVFrame *pict = data;
|
||||
AVFrame *const p = (AVFrame *) & c->picture;
|
||||
|
||||
int frame;
|
||||
int x, y;
|
||||
int b_height;
|
||||
int b_width;
|
||||
|
||||
int req_size;
|
||||
|
||||
int *charmap = c->mc_charmap;
|
||||
uint8_t *colram = c->mc_colram;
|
||||
uint8_t *charset = c->mc_charset;
|
||||
int *meta = c->mc_meta_charset;
|
||||
int *best_cb = c->mc_best_cb;
|
||||
|
||||
int charset_size = 0x800 * (INTERLACED + 1);
|
||||
int colram_size = 0x100 * c->mc_use_5col;
|
||||
int screen_size;
|
||||
|
||||
if(CROP_SCREENS) {
|
||||
b_height = FFMIN(avctx->height,C64YRES) >> 3;
|
||||
b_width = FFMIN(avctx->width ,C64XRES) >> 3;
|
||||
screen_size = b_width * b_height;
|
||||
} else {
|
||||
b_height = C64YRES >> 3;
|
||||
b_width = C64XRES >> 3;
|
||||
screen_size = 0x400;
|
||||
}
|
||||
|
||||
/* no data, means end encoding asap */
|
||||
if (!data) {
|
||||
/* all done, end encoding */
|
||||
if (!c->mc_lifetime) return 0;
|
||||
/* no more frames in queue, prepare to flush remaining frames */
|
||||
if (!c->mc_frame_counter) {
|
||||
c->mc_lifetime = 0;
|
||||
}
|
||||
/* still frames in queue so limit lifetime to remaining frames */
|
||||
else c->mc_lifetime = c->mc_frame_counter;
|
||||
/* still new data available */
|
||||
} else {
|
||||
/* fill up mc_meta_charset with data until lifetime exceeds */
|
||||
if (c->mc_frame_counter < c->mc_lifetime) {
|
||||
*p = *pict;
|
||||
p->pict_type = AV_PICTURE_TYPE_I;
|
||||
p->key_frame = 1;
|
||||
to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
|
||||
c->mc_frame_counter++;
|
||||
/* lifetime is not reached so wait for next frame first */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* lifetime reached so now convert X frames at once */
|
||||
if (c->mc_frame_counter == c->mc_lifetime) {
|
||||
req_size = 0;
|
||||
/* any frames to encode? */
|
||||
if (c->mc_lifetime) {
|
||||
/* calc optimal new charset + charmaps */
|
||||
ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
||||
ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
||||
|
||||
/* create colorram map and a c64 readable charset */
|
||||
render_charset(avctx, charset, colram);
|
||||
|
||||
/* copy charset to buf */
|
||||
memcpy(buf,charset, charset_size);
|
||||
|
||||
/* advance pointers */
|
||||
buf += charset_size;
|
||||
charset += charset_size;
|
||||
req_size += charset_size;
|
||||
}
|
||||
/* no charset so clean buf */
|
||||
else memset(buf, 0, charset_size);
|
||||
|
||||
/* write x frames to buf */
|
||||
for (frame = 0; frame < c->mc_lifetime; frame++) {
|
||||
/* copy charmap to buf. buf is uchar*, charmap is int*, so no memcpy here, sorry */
|
||||
for (y = 0; y < b_height; y++) {
|
||||
for (x = 0; x < b_width; x++) {
|
||||
buf[y * b_width + x] = charmap[y * b_width + x];
|
||||
}
|
||||
}
|
||||
/* advance pointers */
|
||||
buf += screen_size;
|
||||
req_size += screen_size;
|
||||
|
||||
/* compress and copy colram to buf */
|
||||
if (c->mc_use_5col) {
|
||||
a64_compress_colram(buf, charmap, colram);
|
||||
/* advance pointers */
|
||||
buf += colram_size;
|
||||
req_size += colram_size;
|
||||
}
|
||||
|
||||
/* advance to next charmap */
|
||||
charmap += 1000;
|
||||
}
|
||||
|
||||
AV_WB32(avctx->extradata + 4, c->mc_frame_counter);
|
||||
AV_WB32(avctx->extradata + 8, charset_size);
|
||||
AV_WB32(avctx->extradata + 12, screen_size + colram_size);
|
||||
|
||||
/* reset counter */
|
||||
c->mc_frame_counter = 0;
|
||||
|
||||
if (req_size > buf_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "buf size too small (need %d, got %d)\n", req_size, buf_size);
|
||||
return -1;
|
||||
}
|
||||
return req_size;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec ff_a64multi_encoder = {
|
||||
.name = "a64multi",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_A64_MULTI,
|
||||
.priv_data_size = sizeof(A64Context),
|
||||
.init = a64multi_init_encoder,
|
||||
.encode = a64multi_encode_frame,
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||
.capabilities = CODEC_CAP_DELAY,
|
||||
};
|
||||
|
||||
AVCodec ff_a64multi5_encoder = {
|
||||
.name = "a64multi5",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = CODEC_ID_A64_MULTI5,
|
||||
.priv_data_size = sizeof(A64Context),
|
||||
.init = a64multi_init_encoder,
|
||||
.encode = a64multi_encode_frame,
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||
.capabilities = CODEC_CAP_DELAY,
|
||||
};
|
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
* a64 video encoder - tables used by a64 encoders
|
||||
* Copyright (c) 2009 Tobias Bindhammer
|
||||
*
|
||||
* 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
|
||||
* a64 video encoder - tables used by a64 encoders
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_A64TABLES_H
|
||||
#define AVCODEC_A64TABLES_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* dither patterns used vor rendering the multicolor charset
|
||||
*/
|
||||
|
||||
static const uint8_t multi_dither_patterns[9][4][4] = {
|
||||
{
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
},
|
||||
{
|
||||
{1, 0, 0, 0},
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 1, 0},
|
||||
{0, 0, 0, 0}
|
||||
},
|
||||
{
|
||||
{1, 0, 0, 0},
|
||||
{0, 0, 1, 0},
|
||||
{0, 1, 0, 0},
|
||||
{0, 0, 0, 1}
|
||||
},
|
||||
{
|
||||
{1, 0, 0, 0},
|
||||
{0, 1, 0, 1},
|
||||
{0, 0, 1, 0},
|
||||
{0, 1, 0, 1}
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0},
|
||||
{0, 1, 0, 1},
|
||||
{1, 0, 1, 0},
|
||||
{0, 1, 0, 1}
|
||||
},
|
||||
{
|
||||
{1, 1, 1, 0},
|
||||
{0, 1, 0, 1},
|
||||
{1, 0, 1, 1},
|
||||
{0, 1, 0, 1}
|
||||
},
|
||||
{
|
||||
{0, 1, 1, 1},
|
||||
{1, 1, 0, 1},
|
||||
{1, 0, 1, 1},
|
||||
{1, 1, 1, 0}
|
||||
},
|
||||
{
|
||||
{0, 1, 1, 1},
|
||||
{1, 1, 1, 1},
|
||||
{1, 1, 0, 1},
|
||||
{1, 1, 1, 1}
|
||||
},
|
||||
{
|
||||
{1, 1, 1, 1},
|
||||
{1, 1, 1, 1},
|
||||
{1, 1, 1, 1},
|
||||
{1, 1, 1, 1}
|
||||
},
|
||||
};
|
||||
|
||||
static const uint8_t interlaced_dither_patterns[9][8][4] = {
|
||||
{
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
{1, 0, 1, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 0, 0, 0},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 1, 0, 1},
|
||||
{1, 0, 1, 0}, {0, 0, 0, 0},
|
||||
{0, 0, 0, 0}, {0, 1, 0, 1},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{0, 1, 0, 1}, {0, 0, 0, 0},
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{0, 1, 0, 1}, {0, 0, 0, 0},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{0, 1, 0, 1}, {1, 0, 1, 0},
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{0, 1, 0, 1}, {1, 0, 1, 0},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{1, 1, 1, 1}, {1, 0, 1, 0},
|
||||
{1, 0, 1, 0}, {0, 1, 0, 1},
|
||||
{1, 1, 1, 1}, {1, 0, 1, 0},
|
||||
},
|
||||
{
|
||||
{1, 0, 1, 0}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {0, 1, 0, 1},
|
||||
{1, 0, 1, 0}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {0, 1, 0, 1},
|
||||
},
|
||||
{
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {0, 1, 0, 1},
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {0, 1, 0, 1},
|
||||
},
|
||||
{
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
{1, 1, 1, 1}, {1, 1, 1, 1},
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* AVCODEC_A64TABLES_H */
|
1738
libavcodec/aac.c
Normal file
1738
libavcodec/aac.c
Normal file
File diff suppressed because it is too large
Load Diff
125
libavcodec/aac.h
125
libavcodec/aac.h
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @file libavcodec/aac.h
|
||||
* AAC definitions and structures
|
||||
* @author Oded Shimon ( ods15 ods15 dyndns org )
|
||||
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
|
||||
@@ -30,20 +30,53 @@
|
||||
#ifndef AVCODEC_AAC_H
|
||||
#define AVCODEC_AAC_H
|
||||
|
||||
#include "libavutil/internal.h"
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "fft.h"
|
||||
#include "mpeg4audio.h"
|
||||
#include "sbr.h"
|
||||
#include "fmtconvert.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define AAC_INIT_VLC_STATIC(num, size) \
|
||||
INIT_VLC_STATIC(&vlc_spectral[num], 6, ff_aac_spectral_sizes[num], \
|
||||
ff_aac_spectral_bits[num], sizeof( ff_aac_spectral_bits[num][0]), sizeof( ff_aac_spectral_bits[num][0]), \
|
||||
ff_aac_spectral_codes[num], sizeof(ff_aac_spectral_codes[num][0]), sizeof(ff_aac_spectral_codes[num][0]), \
|
||||
size);
|
||||
|
||||
#define MAX_CHANNELS 64
|
||||
#define MAX_ELEM_ID 16
|
||||
|
||||
#define TNS_MAX_ORDER 20
|
||||
#define MAX_LTP_LONG_SFB 40
|
||||
|
||||
enum AudioObjectType {
|
||||
AOT_NULL,
|
||||
// Support? Name
|
||||
AOT_AAC_MAIN, ///< Y Main
|
||||
AOT_AAC_LC, ///< Y Low Complexity
|
||||
AOT_AAC_SSR, ///< N (code in SoC repo) Scalable Sample Rate
|
||||
AOT_AAC_LTP, ///< N (code in SoC repo) Long Term Prediction
|
||||
AOT_SBR, ///< N (in progress) Spectral Band Replication
|
||||
AOT_AAC_SCALABLE, ///< N Scalable
|
||||
AOT_TWINVQ, ///< N Twin Vector Quantizer
|
||||
AOT_CELP, ///< N Code Excited Linear Prediction
|
||||
AOT_HVXC, ///< N Harmonic Vector eXcitation Coding
|
||||
AOT_TTSI = 12, ///< N Text-To-Speech Interface
|
||||
AOT_MAINSYNTH, ///< N Main Synthesis
|
||||
AOT_WAVESYNTH, ///< N Wavetable Synthesis
|
||||
AOT_MIDI, ///< N General MIDI
|
||||
AOT_SAFX, ///< N Algorithmic Synthesis and Audio Effects
|
||||
AOT_ER_AAC_LC, ///< N Error Resilient Low Complexity
|
||||
AOT_ER_AAC_LTP = 19, ///< N Error Resilient Long Term Prediction
|
||||
AOT_ER_AAC_SCALABLE, ///< N Error Resilient Scalable
|
||||
AOT_ER_TWINVQ, ///< N Error Resilient Twin Vector Quantizer
|
||||
AOT_ER_BSAC, ///< N Error Resilient Bit-Sliced Arithmetic Coding
|
||||
AOT_ER_AAC_LD, ///< N Error Resilient Low Delay
|
||||
AOT_ER_CELP, ///< N Error Resilient Code Excited Linear Prediction
|
||||
AOT_ER_HVXC, ///< N Error Resilient Harmonic Vector eXcitation Coding
|
||||
AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise
|
||||
AOT_ER_PARAM, ///< N Error Resilient Parametric
|
||||
AOT_SSC, ///< N SinuSoidal Coding
|
||||
};
|
||||
|
||||
enum RawDataBlockType {
|
||||
TYPE_SCE,
|
||||
@@ -100,17 +133,6 @@ enum CouplingPoint {
|
||||
AFTER_IMDCT = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* Output configuration status
|
||||
*/
|
||||
enum OCStatus {
|
||||
OC_NONE, //< Output unconfigured
|
||||
OC_TRIAL_PCE, //< Output configuration under trial specified by an inband PCE
|
||||
OC_TRIAL_FRAME, //< Output configuration under trial specified by a frame header
|
||||
OC_GLOBAL_HDR, //< Output configuration set in a global header but not yet locked
|
||||
OC_LOCKED, //< Output configuration locked in place
|
||||
};
|
||||
|
||||
/**
|
||||
* Predictor State
|
||||
*/
|
||||
@@ -125,23 +147,6 @@ typedef struct {
|
||||
|
||||
#define MAX_PREDICTORS 672
|
||||
|
||||
#define SCALE_DIV_512 36 ///< scalefactor difference that corresponds to scale difference in 512 times
|
||||
#define SCALE_ONE_POS 140 ///< scalefactor index that corresponds to scale=1.0
|
||||
#define SCALE_MAX_POS 255 ///< scalefactor index maximum value
|
||||
#define SCALE_MAX_DIFF 60 ///< maximum scalefactor difference allowed by standard
|
||||
#define SCALE_DIFF_ZERO 60 ///< codebook index corresponding to zero scalefactor indices difference
|
||||
#define POW_SF2_ZERO 200 ///< ff_aac_pow2sf_tab index corresponding to pow(2, 0);
|
||||
|
||||
/**
|
||||
* Long Term Prediction
|
||||
*/
|
||||
typedef struct {
|
||||
int8_t present;
|
||||
int16_t lag;
|
||||
float coef;
|
||||
int8_t used[MAX_LTP_LONG_SFB];
|
||||
} LongTermPrediction;
|
||||
|
||||
/**
|
||||
* Individual Channel Stream
|
||||
*/
|
||||
@@ -151,9 +156,7 @@ typedef struct {
|
||||
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sinus window.
|
||||
int num_window_groups;
|
||||
uint8_t group_len[8];
|
||||
LongTermPrediction ltp;
|
||||
const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window
|
||||
const uint8_t *swb_sizes; ///< table of scalefactor band sizes for a particular window
|
||||
int num_swb; ///< number of scalefactor window bands
|
||||
int num_windows;
|
||||
int tns_max_bands;
|
||||
@@ -193,7 +196,6 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
int num_pulse;
|
||||
int start;
|
||||
int pos[4];
|
||||
int amp[4];
|
||||
} Pulse;
|
||||
@@ -218,16 +220,12 @@ typedef struct {
|
||||
typedef struct {
|
||||
IndividualChannelStream ics;
|
||||
TemporalNoiseShaping tns;
|
||||
Pulse pulse;
|
||||
enum BandType band_type[128]; ///< band types
|
||||
int band_type_run_end[120]; ///< band type run end points
|
||||
float sf[120]; ///< scalefactors
|
||||
int sf_idx[128]; ///< scalefactor indices (used by encoder)
|
||||
uint8_t zeroes[128]; ///< band is not coded (used by encoder)
|
||||
DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT
|
||||
DECLARE_ALIGNED(32, float, saved)[1024]; ///< overlap
|
||||
DECLARE_ALIGNED(32, float, ret)[2048]; ///< PCM output
|
||||
DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP
|
||||
enum BandType band_type[120]; ///< band types
|
||||
int band_type_run_end[120]; ///< band type run end points
|
||||
float sf[120]; ///< scalefactors
|
||||
DECLARE_ALIGNED_16(float, coeffs[1024]); ///< coefficients for IMDCT
|
||||
DECLARE_ALIGNED_16(float, saved[512]); ///< overlap
|
||||
DECLARE_ALIGNED_16(float, ret[1024]); ///< PCM output
|
||||
PredictorState predictor_state[MAX_PREDICTORS];
|
||||
} SingleChannelElement;
|
||||
|
||||
@@ -236,21 +234,18 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
// CPE specific
|
||||
int common_window; ///< Set if channels share a common 'IndividualChannelStream' in bitstream.
|
||||
int ms_mode; ///< Signals mid/side stereo flags coding mode (used by encoder)
|
||||
uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band
|
||||
uint8_t ms_mask[120]; ///< Set if mid/side stereo is used for each scalefactor window band
|
||||
// shared
|
||||
SingleChannelElement ch[2];
|
||||
// CCE specific
|
||||
ChannelCoupling coup;
|
||||
SpectralBandReplication sbr;
|
||||
} ChannelElement;
|
||||
|
||||
/**
|
||||
* main AAC context
|
||||
*/
|
||||
typedef struct {
|
||||
AVCodecContext *avctx;
|
||||
AVCodecContext * avccontext;
|
||||
|
||||
MPEG4AudioConfig m4ac;
|
||||
|
||||
@@ -258,47 +253,45 @@ typedef struct {
|
||||
DynamicRangeControl che_drc;
|
||||
|
||||
/**
|
||||
* @name Channel element related data
|
||||
* @defgroup elements Channel element related data.
|
||||
* @{
|
||||
*/
|
||||
enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
|
||||
* first index as the first 4 raw data block types
|
||||
*/
|
||||
ChannelElement *che[4][MAX_ELEM_ID];
|
||||
ChannelElement *tag_che_map[4][MAX_ELEM_ID];
|
||||
ChannelElement * che[4][MAX_ELEM_ID];
|
||||
ChannelElement * tag_che_map[4][MAX_ELEM_ID];
|
||||
int tags_mapped;
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name temporary aligned temporary buffers
|
||||
* (We do not want to have these on the stack.)
|
||||
* @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.)
|
||||
* @{
|
||||
*/
|
||||
DECLARE_ALIGNED(32, float, buf_mdct)[1024];
|
||||
DECLARE_ALIGNED_16(float, buf_mdct[1024]);
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Computed / set up during initialization
|
||||
* @defgroup tables Computed / set up during initialization.
|
||||
* @{
|
||||
*/
|
||||
FFTContext mdct;
|
||||
FFTContext mdct_small;
|
||||
FFTContext mdct_ltp;
|
||||
MDCTContext mdct;
|
||||
MDCTContext mdct_small;
|
||||
DSPContext dsp;
|
||||
FmtConvertContext fmt_conv;
|
||||
int random_state;
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Members used for output interleaving
|
||||
* @defgroup output Members used for output interleaving.
|
||||
* @{
|
||||
*/
|
||||
float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output).
|
||||
float add_bias; ///< offset for dsp.float_to_int16
|
||||
float sf_scale; ///< Pre-scale for correct IMDCT and dsp.float_to_int16.
|
||||
int sf_offset; ///< offset into pow2sf_tab as appropriate for dsp.float_to_int16
|
||||
/** @} */
|
||||
|
||||
DECLARE_ALIGNED(32, float, temp)[128];
|
||||
|
||||
enum OCStatus output_configured;
|
||||
DECLARE_ALIGNED(16, float, temp[128]);
|
||||
} AACContext;
|
||||
|
||||
#endif /* AVCODEC_AAC_H */
|
||||
|
@@ -71,33 +71,23 @@ get_next:
|
||||
*poutbuf_size = buf_size;
|
||||
|
||||
/* update codec info */
|
||||
avctx->sample_rate = s->sample_rate;
|
||||
if(s->codec_id)
|
||||
avctx->codec_id = s->codec_id;
|
||||
|
||||
/* Due to backwards compatible HE-AAC the sample rate, channel count,
|
||||
and total number of samples found in an AAC ADTS header are not
|
||||
reliable. Bit rate is still accurate because the total frame duration in
|
||||
seconds is still correct (as is the number of bits in the frame). */
|
||||
if (avctx->codec_id != CODEC_ID_AAC) {
|
||||
avctx->sample_rate = s->sample_rate;
|
||||
|
||||
/* allow downmixing to stereo (or mono for AC-3) */
|
||||
if(avctx->request_channels > 0 &&
|
||||
avctx->request_channels < s->channels &&
|
||||
(avctx->request_channels <= 2 ||
|
||||
(avctx->request_channels == 1 &&
|
||||
(avctx->codec_id == CODEC_ID_AC3 ||
|
||||
avctx->codec_id == CODEC_ID_EAC3)))) {
|
||||
avctx->channels = avctx->request_channels;
|
||||
} else {
|
||||
avctx->channels = s->channels;
|
||||
avctx->channel_layout = s->channel_layout;
|
||||
}
|
||||
avctx->frame_size = s->samples;
|
||||
avctx->audio_service_type = s->service_type;
|
||||
/* allow downmixing to stereo (or mono for AC-3) */
|
||||
if(avctx->request_channels > 0 &&
|
||||
avctx->request_channels < s->channels &&
|
||||
(avctx->request_channels <= 2 ||
|
||||
(avctx->request_channels == 1 &&
|
||||
(avctx->codec_id == CODEC_ID_AC3 ||
|
||||
avctx->codec_id == CODEC_ID_EAC3)))) {
|
||||
avctx->channels = avctx->request_channels;
|
||||
} else {
|
||||
avctx->channels = s->channels;
|
||||
}
|
||||
|
||||
avctx->bit_rate = s->bit_rate;
|
||||
avctx->frame_size = s->samples;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
@@ -48,8 +48,6 @@ typedef struct AACAC3ParseContext {
|
||||
int sample_rate;
|
||||
int bit_rate;
|
||||
int samples;
|
||||
int64_t channel_layout;
|
||||
int service_type;
|
||||
|
||||
int remaining_size;
|
||||
uint64_t state;
|
||||
|
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* MPEG-2/4 AAC ADTS to MPEG-4 Audio Specific Configuration bitstream filter
|
||||
* Copyright (c) 2009 Alex Converse <alex.converse@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
|
||||
*/
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "aacadtsdec.h"
|
||||
#include "put_bits.h"
|
||||
#include "get_bits.h"
|
||||
#include "mpeg4audio.h"
|
||||
#include "internal.h"
|
||||
|
||||
typedef struct AACBSFContext {
|
||||
int first_frame_done;
|
||||
} AACBSFContext;
|
||||
|
||||
/**
|
||||
* This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4
|
||||
* ADTS header and removes the ADTS header.
|
||||
*/
|
||||
static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
||||
AVCodecContext *avctx, const char *args,
|
||||
uint8_t **poutbuf, int *poutbuf_size,
|
||||
const uint8_t *buf, int buf_size,
|
||||
int keyframe)
|
||||
{
|
||||
GetBitContext gb;
|
||||
PutBitContext pb;
|
||||
AACADTSHeaderInfo hdr;
|
||||
|
||||
AACBSFContext *ctx = bsfc->priv_data;
|
||||
|
||||
init_get_bits(&gb, buf, AAC_ADTS_HEADER_SIZE*8);
|
||||
|
||||
*poutbuf = (uint8_t*) buf;
|
||||
*poutbuf_size = buf_size;
|
||||
|
||||
if (avctx->extradata)
|
||||
if (show_bits(&gb, 12) != 0xfff)
|
||||
return 0;
|
||||
|
||||
if (ff_aac_parse_header(&gb, &hdr) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error parsing ADTS frame header!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
|
||||
av_log_missing_feature(avctx, "Multiple RDBs per frame with CRC is", 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
buf += AAC_ADTS_HEADER_SIZE + 2*!hdr.crc_absent;
|
||||
buf_size -= AAC_ADTS_HEADER_SIZE + 2*!hdr.crc_absent;
|
||||
|
||||
if (!ctx->first_frame_done) {
|
||||
int pce_size = 0;
|
||||
uint8_t pce_data[MAX_PCE_SIZE];
|
||||
if (!hdr.chan_config) {
|
||||
init_get_bits(&gb, buf, buf_size * 8);
|
||||
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);
|
||||
return -1;
|
||||
}
|
||||
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
||||
pce_size = ff_copy_pce_data(&pb, &gb)/8;
|
||||
flush_put_bits(&pb);
|
||||
buf_size -= get_bits_count(&gb)/8;
|
||||
buf += get_bits_count(&gb)/8;
|
||||
}
|
||||
avctx->extradata_size = 2 + pce_size;
|
||||
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
|
||||
put_bits(&pb, 5, hdr.object_type);
|
||||
put_bits(&pb, 4, hdr.sampling_index);
|
||||
put_bits(&pb, 4, hdr.chan_config);
|
||||
put_bits(&pb, 1, 0); //frame length - 1024 samples
|
||||
put_bits(&pb, 1, 0); //does not depend on core coder
|
||||
put_bits(&pb, 1, 0); //is not extension
|
||||
flush_put_bits(&pb);
|
||||
if (pce_size) {
|
||||
memcpy(avctx->extradata + 2, pce_data, pce_size);
|
||||
}
|
||||
|
||||
ctx->first_frame_done = 1;
|
||||
}
|
||||
|
||||
*poutbuf = (uint8_t*) buf;
|
||||
*poutbuf_size = buf_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVBitStreamFilter ff_aac_adtstoasc_bsf = {
|
||||
"aac_adtstoasc",
|
||||
sizeof(AACBSFContext),
|
||||
aac_adtstoasc_filter,
|
||||
};
|
@@ -22,10 +22,58 @@
|
||||
|
||||
#include "parser.h"
|
||||
#include "aac_ac3_parser.h"
|
||||
#include "aacadtsdec.h"
|
||||
#include "get_bits.h"
|
||||
#include "aac_parser.h"
|
||||
#include "bitstream.h"
|
||||
#include "mpeg4audio.h"
|
||||
|
||||
#define AAC_HEADER_SIZE 7
|
||||
|
||||
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||
{
|
||||
int size, rdb, ch, sr;
|
||||
int aot, crc_abs;
|
||||
|
||||
if(get_bits(gbc, 12) != 0xfff)
|
||||
return AAC_AC3_PARSE_ERROR_SYNC;
|
||||
|
||||
skip_bits1(gbc); /* id */
|
||||
skip_bits(gbc, 2); /* layer */
|
||||
crc_abs = get_bits1(gbc); /* protection_absent */
|
||||
aot = get_bits(gbc, 2); /* profile_objecttype */
|
||||
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
||||
if(!ff_mpeg4audio_sample_rates[sr])
|
||||
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
||||
skip_bits1(gbc); /* private_bit */
|
||||
ch = get_bits(gbc, 3); /* channel_configuration */
|
||||
|
||||
if(!ff_mpeg4audio_channels[ch])
|
||||
return AAC_AC3_PARSE_ERROR_CHANNEL_CFG;
|
||||
|
||||
skip_bits1(gbc); /* original/copy */
|
||||
skip_bits1(gbc); /* home */
|
||||
|
||||
/* adts_variable_header */
|
||||
skip_bits1(gbc); /* copyright_identification_bit */
|
||||
skip_bits1(gbc); /* copyright_identification_start */
|
||||
size = get_bits(gbc, 13); /* aac_frame_length */
|
||||
if(size < AAC_HEADER_SIZE)
|
||||
return AAC_AC3_PARSE_ERROR_FRAME_SIZE;
|
||||
|
||||
skip_bits(gbc, 11); /* adts_buffer_fullness */
|
||||
rdb = get_bits(gbc, 2); /* number_of_raw_data_blocks_in_frame */
|
||||
|
||||
hdr->object_type = aot + 1;
|
||||
hdr->chan_config = ch;
|
||||
hdr->crc_absent = crc_abs;
|
||||
hdr->num_aac_frames = rdb + 1;
|
||||
hdr->sampling_index = sr;
|
||||
hdr->sample_rate = ff_mpeg4audio_sample_rates[sr];
|
||||
hdr->samples = (rdb + 1) * 1024;
|
||||
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
int *need_next_header, int *new_frame_start)
|
||||
{
|
||||
@@ -37,8 +85,8 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
uint8_t u8[8];
|
||||
} tmp;
|
||||
|
||||
tmp.u64 = av_be2ne64(state);
|
||||
init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
|
||||
tmp.u64 = be2me_64(state);
|
||||
init_get_bits(&bits, tmp.u8+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8);
|
||||
|
||||
if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
|
||||
return 0;
|
||||
@@ -54,13 +102,13 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
static av_cold int aac_parse_init(AVCodecParserContext *s1)
|
||||
{
|
||||
AACAC3ParseContext *s = s1->priv_data;
|
||||
s->header_size = AAC_ADTS_HEADER_SIZE;
|
||||
s->header_size = AAC_HEADER_SIZE;
|
||||
s->sync = aac_sync;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
AVCodecParser ff_aac_parser = {
|
||||
AVCodecParser aac_parser = {
|
||||
{ CODEC_ID_AAC },
|
||||
sizeof(AACAC3ParseContext),
|
||||
aac_parse_init,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* AAC ADTS header decoding prototypes and structures
|
||||
* AAC parser prototypes
|
||||
* Copyright (c) 2003 Fabrice Bellard
|
||||
* Copyright (c) 2003 Michael Niedermayer
|
||||
*
|
||||
@@ -20,13 +20,12 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_AACADTSDEC_H
|
||||
#define AVCODEC_AACADTSDEC_H
|
||||
#ifndef AVCODEC_AAC_PARSER_H
|
||||
#define AVCODEC_AAC_PARSER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "get_bits.h"
|
||||
|
||||
#define AAC_ADTS_HEADER_SIZE 7
|
||||
#include "aac_ac3_parser.h"
|
||||
#include "bitstream.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t sample_rate;
|
||||
@@ -40,15 +39,15 @@ typedef struct {
|
||||
} AACADTSHeaderInfo;
|
||||
|
||||
/**
|
||||
* Parse AAC frame header.
|
||||
* Parse the ADTS frame header to the end of the variable header, which is
|
||||
* Parses AAC frame header.
|
||||
* Parses the ADTS frame header to the end of the variable header, which is
|
||||
* the first 54 bits.
|
||||
* @param[in] gbc BitContext containing the first 54 bits of the frame.
|
||||
* @param[out] hdr Pointer to struct where header info is written.
|
||||
* @param gbc[in] BitContext containing the first 54 bits of the frame.
|
||||
* @param hdr[out] Pointer to struct where header info is written.
|
||||
* @return Returns 0 on success, -1 if there is a sync word mismatch,
|
||||
* -2 if the version element is invalid, -3 if the sample rate
|
||||
* element is invalid, or -4 if the bit rate element is invalid.
|
||||
*/
|
||||
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
||||
|
||||
#endif /* AVCODEC_AACADTSDEC_H */
|
||||
#endif /* AVCODEC_AAC_PARSER_H */
|
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Generate a header file for hardcoded AAC tables
|
||||
*
|
||||
* Copyright (c) 2010 Alex Converse <alex.converse@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
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#define CONFIG_HARDCODED_TABLES 0
|
||||
#include "aac_tablegen.h"
|
||||
#include "tableprint.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ff_aac_tableinit();
|
||||
|
||||
write_fileheader();
|
||||
|
||||
WRITE_ARRAY("const", float, ff_aac_pow2sf_tab);
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Header file for hardcoded AAC tables
|
||||
*
|
||||
* Copyright (c) 2010 Alex Converse <alex.converse@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
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_AAC_TABLEGEN_H
|
||||
#define AVCODEC_AAC_TABLEGEN_H
|
||||
|
||||
#include "aac_tablegen_decl.h"
|
||||
|
||||
#if CONFIG_HARDCODED_TABLES
|
||||
#include "libavcodec/aac_tables.h"
|
||||
#else
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "aac.h"
|
||||
float ff_aac_pow2sf_tab[428];
|
||||
|
||||
void ff_aac_tableinit(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 428; i++)
|
||||
ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.);
|
||||
}
|
||||
#endif /* CONFIG_HARDCODED_TABLES */
|
||||
|
||||
#endif /* AVCODEC_AAC_TABLEGEN_H */
|
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Header file for hardcoded AAC tables
|
||||
*
|
||||
* Copyright (c) 2010 Alex Converse <alex.converse@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
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_AAC_TABLEGEN_DECL_H
|
||||
#define AVCODEC_AAC_TABLEGEN_DECL_H
|
||||
|
||||
#if CONFIG_HARDCODED_TABLES
|
||||
#define ff_aac_tableinit()
|
||||
extern const float ff_aac_pow2sf_tab[428];
|
||||
#else
|
||||
void ff_aac_tableinit(void);
|
||||
extern float ff_aac_pow2sf_tab[428];
|
||||
#endif /* CONFIG_HARDCODED_TABLES */
|
||||
|
||||
#endif /* AVCODEC_AAC_TABLEGEN_DECL_H */
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user