72 changes: 55 additions & 17 deletions lib/ffmpeg/Changelog
Expand Up @@ -8,7 +8,6 @@ version <next>:
- low overhead Ogg muxing
- MMS-TCP support
- VP8 de/encoding via libvpx
- CODEC_CAP_EXPERIMENTAL added
- Demuxer for On2's IVF format
- Pictor/PC Paint decoder
- HE-AAC v2 decoder
Expand All @@ -20,7 +19,61 @@ version <next>:
- -strict inofficial replaced by -strict unofficial
- ffplay -exitonkeydown and -exitonmousedown options added
- native GSM / GSM MS decoder

- RTP depacketization of QDM2
- ANSI/ASCII art playback system
- Lego Mindstorms RSO de/muxer
- libavcore added
- SubRip subtitle file muxer and demuxer
- Chinese AVS encoding via libxavs
- ffprobe -show_packets option added
- RTP packetization of Theora and Vorbis
- RTP depacketization of MP4A-LATM
- RTP packetization and depacketization of VP8
- hflip filter
- Apple HTTP Live Streaming demuxer
- a64 codec
- MMS-HTTP support
- G.722 ADPCM audio encoder/decoder
- R10k video decoder
- ocv_smooth filter
- frei0r wrapper filter
- change crop filter syntax to width:height:x:y
- make the crop filter accept parametric expressions
- make ffprobe accept AVFormatContext options
- yadif filter
- blackframe filter
- Demuxer for Leitch/Harris' VR native stream format (LXF)
- RTP depacketization of the X-QT QuickTime format
- SAP (Session Announcement Protocol, RFC 2974) muxer and demuxer
- cropdetect filter
- ffmpeg -crop* options removed
- transpose filter added
- ffmpeg -force_key_frames option added
- demuxer for receiving raw rtp:// URLs without an SDP description
- single stream LATM/LOAS decoder
- setpts filter added
- Win64 support for optimized asm functions
- MJPEG/AVI1 to JPEG/JFIF bitstream filter
- ASS subtitle encoder and decoder
- IEC 61937 encapsulation for E-AC3 and TrueHD (for HDMI passthrough)
- overlay filter added
- rename aspect filter to setdar, and pixelaspect to setsar
- IEC 61937 demuxer
- Mobotix .mxg demuxer
- frei0r source added
- hqdn3d filter added
- RTP depacketization of QCELP
- FLAC parser added
- gradfun filter added
- AMR-WB decoder
- replace the ocv_smooth filter with a more generic ocv filter
- Windows Televison (WTV) demuxer
- FFmpeg metadata format muxer and demuxer
- SubRip (srt) subtitle decoder
- floating-point AC-3 encoder added
- Lagarith decoder
- ffmpeg -copytb option added
- IVF muxer added


version 0.6:
Expand Down Expand Up @@ -101,7 +154,6 @@ version 0.6:
- RealAudio 1.0 (14.4K) encoder



version 0.5:

- DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer
Expand Down Expand Up @@ -264,7 +316,6 @@ version 0.5:
- generic metadata API



version 0.4.9-pre1:

- DV encoder, DV muxer
Expand Down Expand Up @@ -349,7 +400,6 @@ version 0.4.9-pre1:
- FunCom ISS audio file demuxer and according ADPCM decoding



version 0.4.8:

- MPEG-2 video encoding (Michael)
Expand All @@ -361,7 +411,6 @@ version 0.4.8:
- 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
Expand Down Expand Up @@ -403,7 +452,6 @@ version 0.4.7:
.. And lots more new enhancements and fixes.



version 0.4.6:

- completely new integer only MPEG audio layer 1/2/3 decoder rewritten
Expand Down Expand Up @@ -441,7 +489,6 @@ version 0.4.6:
- 16-bit and 15-bit RGB/BGR/GBR support (Bisqwit)



version 0.4.5:

- some header fixes (Zdenek Kabelac <kabi at informatics.muni.cz>)
Expand Down Expand Up @@ -473,7 +520,6 @@ version 0.4.5:
- added JPEG image format support (input/output)



version 0.4.4:

- fixed some std header definitions (Bjorn Lindgren
Expand All @@ -499,7 +545,6 @@ version 0.4.4:
segfault)



version 0.4.3:

- BGR24 patch (initial patch by Jeroen Vreeken <pe1rxq at amsat.org>)
Expand All @@ -521,7 +566,6 @@ version 0.4.3:
instead of a protocol)



version 0.4.2:

- added H.263/MPEG-4/MSMPEG4 decoding support. MPEG-4 decoding support
Expand Down Expand Up @@ -552,7 +596,6 @@ version 0.4.1:
- factorized some motion estimation code



version 0.4.0:

- removing grab code from ffserver and moved it to ffmpeg. Added
Expand Down Expand Up @@ -581,13 +624,11 @@ version 0.4.0:
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
Expand All @@ -596,20 +637,17 @@ version 0.3.3:
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
2 changes: 0 additions & 2 deletions lib/ffmpeg/LICENSE
Expand Up @@ -15,8 +15,6 @@ Specifically, the GPL parts of FFmpeg are

- libpostproc
- 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

Expand Down
42 changes: 28 additions & 14 deletions lib/ffmpeg/MAINTAINERS
Expand Up @@ -5,13 +5,6 @@ Below is a list of the people maintaining different parts of the
FFmpeg code.


Project Leader
==============

Michael Niedermayer
final design decisions


Applications
============

Expand All @@ -21,6 +14,9 @@ ffmpeg:
ffplay:
ffplay.c Michael Niedermayer

ffprobe:
ffprobe.c Stefano Sabatini

ffserver:
ffserver.c, ffserver.h Baptiste Coudurier

Expand Down Expand Up @@ -106,11 +102,11 @@ Codecs:
8bps.c Roberto Togni
8svx.c Jaikrishnan Menon
aasc.c Kostya Shishkov
aac*, sbr.h Alex Converse
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
Expand All @@ -133,6 +129,7 @@ Codecs:
flac* 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
Expand All @@ -155,6 +152,7 @@ Codecs:
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
Expand All @@ -172,6 +170,7 @@ 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
Expand All @@ -191,6 +190,7 @@ Codecs:
smc.c Mike Melanson
snow.c Michael Niedermayer, Loren Merritt
sonic.c Alex Beregszaszi
srtdec.c Aurelien Jacobs
sunrast.c Ivo van Poorten
svq3.c Michael Niedermayer
targa.c Kostya Shishkov
Expand All @@ -211,7 +211,7 @@ Codecs:
vp3* Mike Melanson
vp5 Aurelien Jacobs
vp6 Aurelien Jacobs
vp8 David Conrad
vp8 David Conrad, Jason Garrett-Glaser, Ronald Bultje
vqavideo.c Mike Melanson
wavpack.c Kostya Shishkov
wmaprodec.c Sascha Sommer
Expand Down Expand Up @@ -255,8 +255,10 @@ 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
Expand All @@ -269,13 +271,14 @@ Muxers/Demuxers:
gxf.c Reimar Doeffinger
gxfenc.c Baptiste Coudurier
idcin.c Mike Melanson
idroq.c Mike Melanson
idroqdec.c Mike Melanson
iff.c Jaikrishnan Menon
ipmovie.c Mike Melanson
img2.c Michael Niedermayer
iss.c Stefan Gehrer
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
Expand Down Expand Up @@ -305,25 +308,28 @@ Muxers/Demuxers:
rl2.c Sascha Sommer
rmdec.c, rmenc.c Ronald S. Bultje, Kostya Shishkov
rtmp* Kostya Shishkov
rtp.c, rtpenc.c Luca Abeni
rtp_asf.* Ronald S. Bultje
rtp_mpv.*, rtp_aac.* Luca Abeni
rtp.c, rtpenc.c Martin Storsjo
rtpdec_asf.* Ronald S. Bultje
rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo
rtsp.c Luca Barbato
sdp.c Luca Abeni
sdp.c Martin Storsjo
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
voc.c Aurelien Jacobs
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


Expand All @@ -347,17 +353,25 @@ 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
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
191 changes: 97 additions & 94 deletions lib/ffmpeg/Makefile
Expand Up @@ -9,26 +9,28 @@ PROGS-$(CONFIG_FFPLAY) += ffplay
PROGS-$(CONFIG_FFPROBE) += ffprobe
PROGS-$(CONFIG_FFSERVER) += ffserver

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)))
HTMLPAGES = $(addprefix doc/, $(addsuffix -doc.html, $(PROGS-yes)))
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 pktdumper probetest qt-faststart trasher))
HOSTPROGS = $(addprefix tests/, audiogen videogen rotozoom tiny_psnr)
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
HOSTPROGS := $(TESTTOOLS:%=tests/%)

BASENAMES = ffmpeg ffplay ffprobe ffserver
ALLPROGS = $(addsuffix $(EXESUF), $(BASENAMES))
ALLPROGS_G = $(addsuffix _g$(EXESUF), $(BASENAMES))
ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
ALLHTMLPAGES= $(addsuffix -doc.html, $(BASENAMES))
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
ALLMANPAGES = $(BASENAMES:%=%.1)

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-$(CONFIG_AVCORE) += avcore

FFLIBS := avutil

Expand Down Expand Up @@ -56,6 +58,12 @@ $(PROGS): %$(EXESUF): %_g$(EXESUF)
$(CP) $< $@
$(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
Expand Down Expand Up @@ -83,9 +91,9 @@ tools/%$(EXESUF): tools/%.o
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)

tools/%.o: tools/%.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_O) $<
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<

ffplay.o ffplay.d: CFLAGS += $(SDL_CFLAGS)
ffplay.o: CFLAGS += $(SDL_CFLAGS)

VERSION_SH = $(SRC_PATH_BARE)/version.sh
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
Expand All @@ -103,20 +111,22 @@ version.h .version:

alltools: $(TOOLS)

documentation: $(addprefix doc/, developer.html faq.html general.html libavfilter.html \
$(ALLHTMLPAGES) $(ALLMANPAGES))
DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)

documentation: $(DOCS)

$(HTMLPAGES) $(MANPAGES): doc/fftools-common-opts.texi
-include $(wildcard $(DOCS:%=%.d))

doc/ffmpeg.pod doc/ffmpeg-doc.html: doc/filters.texi
doc/ffplay.pod doc/ffplay-doc.html: doc/filters.texi
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)

doc/%.html: TAG = HTML
doc/%.html: doc/%.texi
$(M)cd doc && texi2html -monolithic -number $(<:doc/%=%)
doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
$(Q)$(TEXIDEP)
$(M)cd doc && texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init $(<:doc/%=%)

doc/%.pod: TAG = POD
doc/%.pod: doc/%-doc.texi
doc/%.pod: doc/%.texi
$(Q)$(TEXIDEP)
$(M)doc/texi2pod.pl $< $@

doc/%.1: TAG = MAN
Expand Down Expand Up @@ -152,7 +162,7 @@ testclean:
$(RM) -r tests/vsynth1 tests/vsynth2 tests/data
$(RM) $(addprefix tests/,$(CLEANSUFFIXES))
$(RM) tests/seek_test$(EXESUF) tests/seek_test.o
$(RM) $(addprefix tests/,$(addsuffix $(HOSTEXESUF),audiogen videogen rotozoom tiny_psnr))
$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))

clean:: testclean
$(RM) $(ALLPROGS) $(ALLPROGS_G)
Expand All @@ -171,85 +181,28 @@ config:

check: test checkheaders

fulltest test: codectest lavftest seektest
fulltest test: codectest lavftest lavfitest seektest

FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref

LAVFI_TESTS = \
crop \
crop_scale \
crop_scale_vflip \
crop_vflip \
null \
scale200 \
scale500 \
vflip \
vflip_crop \
vflip_vflip \
lavfi_pixdesc \
# lavfi_pix_fmts \
ACODEC_TESTS := $(addprefix regtest-, $(ACODEC_TESTS) $(ACODEC_TESTS-yes))
VCODEC_TESTS := $(addprefix regtest-, $(VCODEC_TESTS) $(VCODEC_TESTS-yes))
LAVF_TESTS := $(addprefix regtest-, $(LAVF_TESTS) $(LAVF_TESTS-yes))
LAVFI_TESTS := $(addprefix regtest-, $(LAVFI_TESTS) $(LAVFI_TESTS-yes))

CODEC_TESTS = $(VCODEC_TESTS) $(ACODEC_TESTS)

codectest: $(CODEC_TESTS)
lavftest: $(LAVF_TESTS)
lavfitest: $(LAVFI_TESTS)
codectest: fate-codec
lavftest: fate-lavf
lavfitest: fate-lavfi
seektest: fate-seek

AREF = tests/data/acodec.ref.wav
VREF = tests/data/vsynth1.ref.yuv
REFS = $(AREF) $(VREF)

$(ACODEC_TESTS): $(AREF)
$(VCODEC_TESTS): $(VREF)
$(LAVF_TESTS) $(LAVFI_TESTS): $(REFS)

REFFILE = $(SRC_PATH)/tests/ref/$(1)/$(2:regtest-%=%)
RESFILE = tests/data/regression/$(1)/$(2:regtest-%=%)

define VCODECTEST
@echo "TEST VCODEC $(1:regtest-%=%)"
$(SRC_PATH)/tests/codec-regression.sh $(1) vsynth1 tests/vsynth1 "$(TARGET_EXEC)" "$(TARGET_PATH)"
$(SRC_PATH)/tests/codec-regression.sh $(1) vsynth2 tests/vsynth2 "$(TARGET_EXEC)" "$(TARGET_PATH)"
endef

define ACODECTEST
@echo "TEST ACODEC $(1:regtest-%=%)"
$(SRC_PATH)/tests/codec-regression.sh $(1) acodec tests/acodec "$(TARGET_EXEC)" "$(TARGET_PATH)"
endef
$(REFS): TAG = GEN

$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
@$(call VCODECTEST,vref)
$(M)$(SRC_PATH)/tests/codec-regression.sh vref vsynth1 tests/vsynth1 "$(TARGET_EXEC)" "$(TARGET_PATH)"
$(Q)$(SRC_PATH)/tests/codec-regression.sh vref vsynth2 tests/vsynth2 "$(TARGET_EXEC)" "$(TARGET_PATH)"

$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
@$(call ACODECTEST,aref)

$(VCODEC_TESTS): tests/tiny_psnr$(HOSTEXESUF)
@$(call VCODECTEST,$@)
@diff -u -w $(call REFFILE,vsynth1,$@) $(call RESFILE,vsynth1,$@)
@diff -u -w $(call REFFILE,vsynth2,$@) $(call RESFILE,vsynth2,$@)

$(ACODEC_TESTS): tests/tiny_psnr$(HOSTEXESUF)
@$(call ACODECTEST,$@)
@diff -u -w $(call REFFILE,acodec,$@) $(call RESFILE,acodec,$@)

$(LAVF_TESTS):
@echo "TEST LAVF $(@:regtest-%=%)"
@$(SRC_PATH)/tests/lavf-regression.sh $@ lavf tests/vsynth1 "$(TARGET_EXEC)" "$(TARGET_PATH)"
@diff -u -w $(call REFFILE,lavf,$@) $(call RESFILE,lavf,$@)

$(LAVFI_TESTS): tools/lavfi-showfiltfmts$(EXESUF)
@echo "TEST LAVFI $(@:regtest-%=%)"
@$(SRC_PATH)/tests/lavfi-regression.sh $@ lavfi tests/vsynth1 "$(TARGET_EXEC)" "$(TARGET_PATH)"
@diff -u -w $(call REFFILE,lavfi,$@) $(call RESFILE,lavfi,$@)

seektest: codectest lavftest tests/seek_test$(EXESUF)
$(SRC_PATH)/tests/seek-regression.sh $(SRC_PATH) "$(TARGET_EXEC)" "$(TARGET_PATH)"
$(M)$(SRC_PATH)/tests/codec-regression.sh aref acodec tests/acodec "$(TARGET_EXEC)" "$(TARGET_PATH)"

ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
@echo
Expand All @@ -275,20 +228,70 @@ tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)

tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)

include $(SRC_PATH_BARE)/tests/fate.mak
include $(SRC_PATH_BARE)/tests/fate2.mak

FATE_TESTS += $(FATE2_TESTS)
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_LAVFI) \
$(FATE_SEEK) \

$(FATE_ACODEC): $(AREF)
$(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)
fate2: $(FATE2_TESTS)
$(FATE_TESTS): ffmpeg$(EXESUF) tests/tiny_psnr$(HOSTEXESUF)
@echo "TEST FATE $(@:fate-%=%)"
@$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)'
FATE += $(FATE_TESTS)
else
fate fate2 $(FATE_TESTS):
$(FATE_TESTS):
@echo "SAMPLES not specified, cannot run FATE"
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)'

fate-list:
@printf '%s\n' $(sort $(FATE))

.PHONY: documentation *test regtest-* alltools check config
30 changes: 0 additions & 30 deletions lib/ffmpeg/build_xbmc.sh

This file was deleted.

3 changes: 2 additions & 1 deletion lib/ffmpeg/build_xbmc_win32.sh
Expand Up @@ -47,9 +47,10 @@ mkdir .libs &&
cp lib*/*.dll .libs/ &&
mv .libs/swscale-0.dll .libs/swscale-0.6.1.dll &&
cp .libs/avcodec-52.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avcore-0.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avformat-52.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avutil-50.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/postproc-51.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swscale-0.6.1.dll /xbmc/system/players/dvdplayer/

cd $START_PATH
cd $START_PATH
311 changes: 253 additions & 58 deletions lib/ffmpeg/cmdutils.c

Large diffs are not rendered by default.

85 changes: 82 additions & 3 deletions lib/ffmpeg/cmdutils.h
Expand Up @@ -37,13 +37,28 @@ 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 AVFormatContext *avformat_opts;
extern struct SwsContext *sws_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 show_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
* parsed through AVOptions.
Expand Down Expand Up @@ -132,7 +147,7 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
void parse_options(int argc, char **argv, const OptionDef *options,
void (* parse_arg_function)(const char*));

void set_context_opts(void *ctx, void *opts_ctx, int flags);
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);

/**
* Print an error message to stderr, indicating filename and a human
Expand Down Expand Up @@ -220,4 +235,68 @@ int read_yesno(void);
*/
int read_file(const char *filename, char **bufptr, size_t *size);

typedef struct {
int64_t num_faulty_pts; /// Number of incorrect PTS values so far
int64_t num_faulty_dts; /// Number of incorrect DTS values so far
int64_t last_pts; /// PTS of the last frame
int64_t last_dts; /// DTS of the last frame
} PtsCorrectionContext;

/**
* Reset the state of the PtsCorrectionContext.
*/
void init_pts_correction(PtsCorrectionContext *ctx);

/**
* Attempt to guess proper monotonic timestamps for decoded video frames
* which might have incorrect times. Input timestamps may wrap around, in
* which case the output will as well.
*
* @param pts the pts field of the decoded AVPacket, as passed through
* AVCodecContext.reordered_opaque
* @param dts the dts field of the decoded AVPacket
* @return one of the input values, may be AV_NOPTS_VALUE
*/
int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts);

/**
* 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, 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);

#if CONFIG_AVFILTER
#include "libavfilter/avfilter.h"

typedef struct {
enum PixelFormat pix_fmt;
} FFSinkContext;

extern AVFilter ffsink;

/**
* Extract a frame from sink.
*
* @return a negative error in case of failure, 1 if one frame has
* been extracted successfully.
*/
int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame,
AVFilterBufferRef **picref, AVRational *pts_tb);

#endif /* CONFIG_AVFILTER */

#endif /* FFMPEG_CMDUTILS_H */
8 changes: 3 additions & 5 deletions lib/ffmpeg/common.mak
Expand Up @@ -31,11 +31,12 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
endif

ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
ALLFFLIBS = avcodec avcore avdevice avfilter avformat avutil postproc swscale

IFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
CFLAGS += $(ECFLAGS)
YASMFLAGS += $(IFLAGS) -Pconfig.asm

HOSTCFLAGS += $(IFLAGS)

Expand Down Expand Up @@ -106,11 +107,8 @@ $(HOSTOBJS): %.o: %.c
$(HOSTPROGS): %$(HOSTEXESUF): %.o
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)

DEPS := $(OBJS:.o=.d)
depend dep: $(DEPS)

CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp

-include $(wildcard $(DEPS))
-include $(wildcard $(OBJS:.o=.d))
463 changes: 316 additions & 147 deletions lib/ffmpeg/configure

Large diffs are not rendered by default.

317 changes: 317 additions & 0 deletions lib/ffmpeg/doc/APIchanges
Expand Up @@ -2,6 +2,7 @@ Never assume the API of libav* to be stable unless at least 1 week has passed si
the last major version increase.
The last version increases were:
libavcodec: ?
libavcore: 2010-07-21
libavdevice: ?
libavfilter: 2009-10-18
libavformat: ?
Expand All @@ -12,6 +13,322 @@ libavutil: 2009-03-08

API changes, most recent first:

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.
Expand Down
77 changes: 77 additions & 0 deletions lib/ffmpeg/doc/bitstream_filters.texi
@@ -0,0 +1,77 @@
@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
34 changes: 34 additions & 0 deletions lib/ffmpeg/doc/build_system.txt
@@ -0,0 +1,34 @@
FFmpeg currently uses a custom build system, this text attempts to document
some of its obscure features and options.

Options to make:
make V=1 <target>
Build target with verbosity 1, instead of 1, 2 can be used too


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.


Targets to make:
fate-list
Will list all fate/regression test targets

fate
Run the fate test suite, note you must have installed it


Setting up local fate:
use the following command to get the fate test samples
rsync -aL rsync://rsync.mplayerhq.hu:/samples/fate-suite/ fate/fate-suite
pass --samples=<path to the samples> to configure
67 changes: 67 additions & 0 deletions lib/ffmpeg/doc/demuxers.texi
@@ -0,0 +1,67 @@
@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

@c man end INPUT DEVICES
15 changes: 8 additions & 7 deletions lib/ffmpeg/doc/developer.texi
Expand Up @@ -2,11 +2,12 @@

@settitle Developer Documentation
@titlepage
@sp 7
@center @titlefont{Developer Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter Developers Guide

Expand Down Expand Up @@ -149,9 +150,9 @@ should also be avoided if they don't make the code easier to understand.
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 program (renaming options etc) without
first discussing it on the ffmpeg-devel mailing list. Do not remove
functionality from the code. Just improve!
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
Expand Down Expand Up @@ -289,8 +290,8 @@ send a reminder by email. Your patch should eventually be dealt with.
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 in @file{avcodec.h} or
@file{avformat.h}?
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
Expand Down
140 changes: 140 additions & 0 deletions lib/ffmpeg/doc/eval.texi
@@ -0,0 +1,140 @@
@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.
@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

When A evaluates to either 1 or 0, that is the same as
@example
A*B + eq(A,0)*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
50 changes: 17 additions & 33 deletions lib/ffmpeg/doc/faq.texi
Expand Up @@ -2,11 +2,12 @@

@settitle FFmpeg FAQ
@titlepage
@sp 7
@center @titlefont{FFmpeg FAQ}
@sp 3
@end titlepage

@top

@contents

@chapter General Questions

Expand All @@ -20,10 +21,11 @@ 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. 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".
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 Subversion snapshot. If you
still experience the problem, then you can report it according to the
guidelines in @url{http://ffmpeg.org/bugreports.html}.

@section Why doesn't FFmpeg support feature [xyz]?

Expand All @@ -44,7 +46,7 @@ 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 bugreports.html.
@item You didn't follow @url{http://ffmpeg.org/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.
Expand Down Expand Up @@ -195,19 +197,6 @@ quite logical that there is a small reduction of quality. This is not a bug.

Use @file{-} as file name.

@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'.
Expand All @@ -233,11 +222,11 @@ default.
@item needed stuff
-acodec libfaac -vcodec mpeg4 width<=320 height<=240
@item working stuff
4mv, title
mv4, title
@item non-working stuff
B-frames
@item example command line
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 -metadata title=X output.mp4
ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +mv4 -trellis 2 -aic 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
@end table

@section How do I encode videos which play on the PSP?
Expand All @@ -246,11 +235,11 @@ ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags
@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
4mv, title
mv4, title
@item non-working stuff
B-frames
@item example command line
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 -metadata title=X -f psp output.mp4
ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -ar 24000 -mbd 2 -flags +mv4 -trellis 2 -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
@item needed stuff for H.264
-acodec libfaac -vcodec libx264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
@item working stuff for H.264
Expand All @@ -267,7 +256,7 @@ ffmpeg -i input -acodec libfaac -ab 128kb -ac 2 -ar 48000 -vcodec libx264 -level

@section Which are good parameters for encoding high quality MPEG-4?

'-mbd rd -flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
'-mbd rd -flags +mv4+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?
Expand Down Expand Up @@ -460,8 +449,8 @@ See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}

@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 libavformat/file.c in FFmpeg
and libmpdemux/demux_lavf.c in MPlayer sources.
You have to implement a URLProtocol, see @file{libavformat/file.c} in
FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer sources.

@section I get "No compatible shell script interpreter found." in MSys.

Expand All @@ -471,18 +460,13 @@ 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://svn.ffmpeg.org/michael/trunk/docs/}
see @url{http://www.ffmpeg.org/~michael/}

@section How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?

Expand Down
273 changes: 147 additions & 126 deletions lib/ffmpeg/doc/ffmpeg-doc.texi → lib/ffmpeg/doc/ffmpeg.texi

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions lib/ffmpeg/doc/ffplay-doc.texi → lib/ffmpeg/doc/ffplay.texi
Expand Up @@ -2,11 +2,13 @@

@settitle FFplay Documentation
@titlepage
@sp 7
@center @titlefont{FFplay Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter Synopsis

@example
Expand Down Expand Up @@ -153,6 +155,12 @@ Seek to percentage in file corresponding to fraction of width.

@c man end

@include eval.texi
@include demuxers.texi
@include muxers.texi
@include indevs.texi
@include outdevs.texi
@include protocols.texi
@include filters.texi

@ignore
Expand Down
Expand Up @@ -2,11 +2,13 @@

@settitle FFprobe Documentation
@titlepage
@sp 7
@center @titlefont{FFprobe Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter Synopsis

The generic syntax is:
Expand Down Expand Up @@ -50,8 +52,8 @@ keyN=valN
@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:''.
and printed in the corresponding "FORMAT" or "STREAM" section, and
are prefixed by the string "TAG:".

@c man end

Expand All @@ -64,18 +66,15 @@ are prefixed by the string ``TAG:''.

@table @option

@item -convert_tags
Convert the tag names in the format container to the generic FFmpeg tag names.

@item -f @var{format}
Force format to use.

@item -unit
Show the unit of the displayed values.

@item -prefix
Show a SI prefixes of the displayed values.
Unless ``-byte_binary_prefix'' option is used all the 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
Expand All @@ -86,25 +85,37 @@ 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''.
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''.
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''.
with name "STREAM".

@end table
@c man end

@include demuxers.texi
@include muxers.texi
@include protocols.texi
@include indevs.texi

@ignore
@setfilename ffprobe
Expand Down
Expand Up @@ -2,11 +2,13 @@

@settitle FFserver Documentation
@titlepage
@sp 7
@center @titlefont{FFserver Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter Synopsys

The generic syntax is:
Expand Down
6 changes: 5 additions & 1 deletion lib/ffmpeg/doc/fftools-common-opts.texi
Expand Up @@ -84,6 +84,10 @@ Set the logging level used by the library.

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{NO_COLOR}.
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
957 changes: 924 additions & 33 deletions lib/ffmpeg/doc/filters.texi

Large diffs are not rendered by default.

63 changes: 46 additions & 17 deletions lib/ffmpeg/doc/general.texi
Expand Up @@ -2,11 +2,12 @@

@settitle General Documentation
@titlepage
@sp 7
@center @titlefont{General Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter external libraries

Expand Down Expand Up @@ -49,6 +50,7 @@ library:
@item American Laser Games MM @tab @tab X
@tab Multimedia format used in games like Mad Dog McCree.
@item 3GPP AMR @tab X @tab X
@item Apple HTTP Live Streaming @tab @tab X
@item ASF @tab X @tab X
@item AVI @tab X @tab X
@item AVISynth @tab @tab X
Expand Down Expand Up @@ -109,15 +111,20 @@ library:
@tab Format used in various Interplay computer games.
@item IV8 @tab @tab X
@tab A format generated by IndigoVision 8000 video server.
@item IVF (On2) @tab @tab X
@item IVF (On2) @tab X @tab X
@tab A format used by libvpx
@item LMLM4 @tab @tab X
@tab Used by Linux Media Labs MPEG-4 PCI boards
@item LXF @tab @tab X
@tab VR native stream format, used by Leitch/Harris' video servers.
@item Matroska @tab X @tab X
@item Matroska audio @tab X @tab
@item FFmpeg metadata @tab X @tab X
@tab Metadata in text format.
@item MAXIS XA @tab @tab X
@tab Used in Sim City 3000; file extension .xa.
@item MD Studio @tab @tab X
@item Mobotix .mxg @tab @tab X
@item Monkey's Audio @tab @tab X
@item Motion Pixels MVI @tab @tab X
@item MOV/QuickTime/MP4 @tab X @tab X
Expand Down Expand Up @@ -156,7 +163,7 @@ library:
@item QCP @tab @tab X
@item raw ADTS (AAC) @tab X @tab X
@item raw AC-3 @tab X @tab X
@item raw Chinese AVS video @tab @tab X
@item raw Chinese AVS video @tab X @tab X
@item raw CRI ADX @tab X @tab X
@item raw Dirac @tab X @tab X
@item raw DNxHD @tab X @tab X
Expand Down Expand Up @@ -209,10 +216,12 @@ library:
@item RL2 @tab @tab X
@tab Audio and video format used in some games by Entertainment Software Partners.
@item RPL/ARMovie @tab @tab X
@item Lego Mindstorms RSO @tab X @tab X
@item RTMP @tab X @tab X
@tab Output is performed by publishing stream to RTMP server
@item RTP @tab @tab X
@item RTP @tab X @tab X
@item RTSP @tab X @tab X
@item SAP @tab X @tab X
@item SDP @tab @tab X
@item Sega FILM/CPK @tab @tab X
@tab Used in many Sega Saturn console games.
Expand All @@ -228,6 +237,7 @@ library:
@item Sony Wave64 (W64) @tab @tab X
@item SoX native format @tab X @tab X
@item SUN AU format @tab X @tab X
@item Text files @tab @tab X
@item THP @tab @tab X
@tab Used on the Nintendo GameCube.
@item Tiertex Limited SEQ @tab @tab X
Expand All @@ -237,6 +247,7 @@ library:
@item WAV @tab X @tab X
@item WavPack @tab @tab X
@item WebM @tab X @tab X
@item Windows Televison (WTV) @tab @tab X
@item Wing Commander III movie @tab @tab X
@tab Multimedia format used in Origin's Wing Commander III computer game.
@item Westwood Studios audio @tab @tab X
Expand Down Expand Up @@ -312,10 +323,13 @@ following image formats are supported:
@item 8088flex TMV @tab @tab X
@item 8SVX exponential @tab @tab X
@item 8SVX fibonacci @tab @tab X
@item A64 multicolor @tab X @tab
@tab Creates video suitable to be played on a commodore 64 (multicolor mode).
@item American Laser Games MM @tab @tab X
@tab Used in games like Mad Dog McCree.
@item AMV Video @tab @tab X
@tab Used in Chinese MP3 players.
@item ANSI/ASCII art @tab @tab X
@item Apple MJPEG-B @tab @tab X
@item Apple QuickDraw @tab @tab X
@tab fourcc: qdrw
Expand Down Expand Up @@ -347,8 +361,8 @@ following image formats are supported:
@tab fourcc: CSCD
@item CD+G @tab @tab X
@tab Video codec for CD+G karaoke disks
@item Chinese AVS video @tab @tab X
@tab AVS1-P2, JiZhun profile
@item Chinese AVS video @tab E @tab X
@tab AVS1-P2, JiZhun profile, encoding through external library libxavs
@item Delphine Software International CIN video @tab @tab X
@tab Codec used in Delphine Software International games.
@item Cinepak @tab @tab X
Expand Down Expand Up @@ -411,6 +425,7 @@ following image formats are supported:
@tab Codec used in Worms games.
@item Kega Game Video (KGV1) @tab @tab X
@tab Kega emulator screen capture codec.
@item Lagarith @tab @tab X
@item LCL (LossLess Codec Library) MSZH @tab @tab X
@item LCL (LossLess Codec Library) ZLIB @tab E @tab E
@item LOCO @tab @tab X
Expand All @@ -429,7 +444,7 @@ following image formats are supported:
@item MPEG-2 video @tab X @tab X
@item MPEG-4 part 2 @tab X @tab X
@ libxvidcore can be used alternatively for encoding.
@item MPEG-4 part 2 Microsoft variant version 1 @tab X @tab X
@item MPEG-4 part 2 Microsoft variant version 1 @tab @tab X
@item MPEG-4 part 2 Microsoft variant version 2 @tab X @tab X
@item MPEG-4 part 2 Microsoft variant version 3 @tab X @tab X
@item Nintendo Gamecube THP video @tab @tab X
Expand All @@ -454,6 +469,7 @@ following image formats are supported:
@tab fourcc: 'smc '
@item QuickTime video (RPZA) @tab @tab X
@tab fourcc: rpza
@item R10K AJA Kona 10-bit RGB Codec @tab @tab X
@item R210 Quicktime Uncompressed RGB 10-bit @tab @tab X
@item Raw Video @tab X @tab X
@item RealVideo 1.0 @tab X @tab X
Expand Down Expand Up @@ -529,6 +545,7 @@ following image formats are supported:
@item ADPCM Electronic Arts R2 @tab @tab X
@item ADPCM Electronic Arts R3 @tab @tab X
@item ADPCM Electronic Arts XAS @tab @tab X
@item ADPCM G.722 @tab X @tab X
@item ADPCM G.726 @tab X @tab X
@item ADPCM IMA AMV @tab @tab X
@tab Used in AMV files
Expand Down Expand Up @@ -562,8 +579,7 @@ following image formats are supported:
@item ADPCM Yamaha @tab X @tab X
@item AMR-NB @tab E @tab X
@tab encoding supported through external library libopencore-amrnb
@item AMR-WB @tab @tab E
@tab decoding supported through external library libopencore-amrwb
@item AMR-WB @tab @tab X
@item Apple lossless audio @tab X @tab X
@tab QuickTime fourcc 'alac'
@item Atrac 1 @tab @tab X
Expand All @@ -588,7 +604,6 @@ following image formats are supported:
@item DV audio @tab @tab X
@item Enhanced AC-3 @tab @tab X
@item FLAC (Free Lossless Audio Codec) @tab X @tab IX
@item G.729 @tab @tab X
@item GSM @tab E @tab X
@tab encoding supported through external library libgsm
@item GSM Microsoft variant @tab E @tab X
Expand Down Expand Up @@ -677,10 +692,11 @@ performance on systems without hardware floating point support).

@multitable @columnfractions .4 .1 .1 .1 .1
@item Name @tab Muxing @tab Demuxing @tab Encoding @tab Decoding
@item SSA/ASS @tab X @tab X
@item SSA/ASS @tab X @tab X @tab X @tab X
@item DVB @tab X @tab X @tab X @tab X
@item DVD @tab X @tab X @tab X @tab X
@item PGS @tab @tab @tab @tab X
@item SubRip (SRT) @tab X @tab X @tab @tab X
@item XSUB @tab @tab @tab X @tab X
@end multitable

Expand Down Expand Up @@ -786,7 +802,8 @@ bash ./configure

MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
assembler functions.
assembler functions. Just download the Perl script and put it somewhere
in your PATH, FFmpeg's configure will pick it up automatically.

@section Windows

Expand Down Expand Up @@ -966,15 +983,27 @@ To use those files with MSVC++, do the same as you would do with
the static libraries, as described above. But in Step 4,
you should only need to add the directory where the LIB files are installed
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
installed in the @file{bin} directory. And instead of adding @file{libxx.a}
files, you should add @file{avcodec.lib}, @file{avformat.lib}, and
@file{avutil.lib}. There should be no need for @file{libmingwex.a},
installed in the @file{bin} directory. And instead of adding the static
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
(@file{avcodec.lib}, @file{avformat.lib}, @file{avcore.lib}, and
@file{avutil.lib}). Note that you should not use the GCC import
libraries (@file{libxxx.dll.a} files), as these will give you undefined
reference errors. There should be no need for @file{libmingwex.a},
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
statically linked into the DLLs. The @file{bin} directory contains a bunch
of DLL files, but the ones that are actually used to run your application
are the ones with a major version number in their filenames
(i.e. @file{avcodec-51.dll}).

FFmpeg headers do not declare global data for Windows DLLs through the usual
dllexport/dllimport interface. Such data will be exported properly while
building, but to use them in your MSVC++ code you will have to edit the
appropriate headers and mark the data as dllimport. For example, in
libavutil/pixdesc.h you should have:
@example
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
@end example

@subsection Cross compilation for Windows with Linux

You must use the MinGW cross compilation tools available at
Expand Down Expand Up @@ -1031,7 +1060,7 @@ These library packages are only available from Cygwin Ports
(@url{http://sourceware.org/cygwinports/}) :

@example
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libfaad-devel, libgsm-devel,
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
libxvidcore-devel
@end example
Expand Down
259 changes: 259 additions & 0 deletions lib/ffmpeg/doc/git-howto.txt
@@ -0,0 +1,259 @@

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.ffmpeg.org/ffmpeg.git <target>

This will put the FFmpeg sources into the directory <target>.

git clone git@git.ffmpeg.org:ffmpeg.git <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.ffmpeg.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 -wb <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 <git at ffmpeg dot org> if you have technical
problems with the GIT server.
212 changes: 212 additions & 0 deletions lib/ffmpeg/doc/indevs.texi
@@ -0,0 +1,212 @@
@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 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 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 changes: 3 additions & 2 deletions lib/ffmpeg/doc/libavfilter.texi
Expand Up @@ -2,11 +2,12 @@

@settitle Libavfilter Documentation
@titlepage
@sp 7
@center @titlefont{Libavfilter Documentation}
@sp 3
@end titlepage

@top

@contents

@chapter Introduction

Expand Down
68 changes: 68 additions & 0 deletions lib/ffmpeg/doc/metadata.texi
@@ -0,0 +1,68 @@
@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
112 changes: 112 additions & 0 deletions lib/ffmpeg/doc/muxers.texi
@@ -0,0 +1,112 @@
@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.

@section image2

Image file muxer.

This muxer writes video frames to multiple 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 numbering in
the filenames. If the form "%d0@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

@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

@c man end MUXERS
59 changes: 56 additions & 3 deletions lib/ffmpeg/doc/optimization.txt
Expand Up @@ -157,15 +157,68 @@ Use asm loops like:
__asm__(
"1: ....
...
"jump_instruciton ....
"jump_instruction ....
Do not use C loops:
do{
__asm__(
...
}while()

Use __asm__() instead of intrinsics. The latter requires a good optimizing compiler
which gcc is not.
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.


Links:
Expand Down
29 changes: 29 additions & 0 deletions lib/ffmpeg/doc/outdevs.texi
@@ -0,0 +1,29 @@
@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.

@c man end OUTPUT DEVICES