diff options
Diffstat (limited to 'contrib/ffmpeg/doc')
-rw-r--r-- | contrib/ffmpeg/doc/TODO | 15 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/avutil.txt | 37 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/faq.texi | 111 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/ffmpeg-doc.texi | 159 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/ffplay-doc.texi | 31 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/hooks.texi | 161 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/optimization.txt | 9 | ||||
-rw-r--r-- | contrib/ffmpeg/doc/snow.txt | 259 |
8 files changed, 687 insertions, 95 deletions
diff --git a/contrib/ffmpeg/doc/TODO b/contrib/ffmpeg/doc/TODO index 8271659d2..996ce3177 100644 --- a/contrib/ffmpeg/doc/TODO +++ b/contrib/ffmpeg/doc/TODO @@ -5,7 +5,6 @@ Fabrice's TODO list: (unordered) ------------------- Short term: -- seeking API and example in ffplay - use AVFMTCTX_DISCARD_PKT in ffplay so that DV has a chance to work - add RTSP regression test (both client and server) - make ffserver allocate AVFormatContext @@ -35,7 +34,6 @@ 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 -- have a REAL BeOS errno fix (return MKERROR(EXXX);), not a hack - publish my BeOS libposix on BeBits so I can officially support ffserver :) - check the whole code for thread-safety (global and init stuff) @@ -49,6 +47,13 @@ Philip'a TODO list: (alphabetically ordered) (please help) - Make ffm files more resilient to changes in the codec structures so that you can play old ffm files. +Baptiste's TODO list: +----------------- +- mov edit list support (AVEditList) +- YUV 10 bit per component support "2vuy" +- mxf muxer +- mpeg2 non linear quantizer + unassigned TODO: (unordered) --------------- - use AVFrame for audio codecs too @@ -68,7 +73,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) -- finish NUT implementation +- NUT muxer - seeking regression test - regression tests for codecs which dont have an encoder (I+P frame bitstream in svn) - add support for using mplayers video filters to ffmpeg @@ -80,3 +85,7 @@ unassigned TODO: (unordered) - write a script which iteratively changes all functions between always_inline and noinline and benchmarks the result to find the best set of inlined functions - set up roundup bugtracker somewhere with (newBug, reproduced, analyzed, fixed, worksForMe, duplicate, wontFix, invalid, needMoreInfo, newPatch, ok, applied, rejected, needChanges, newRequest, implemented, wontImplement, invalidReq) states and a checked integer - convert all the non SIMD asm into small asm vs. C testcases and submit them to the gcc devels so they can improve gcc +- generic audio mixing API +- extract PES packetizer from PS muxer and use it for new TS muxer +- implement automatic AVBistreamFilter activation +- port libavformat/sgi.c (now removed) to new image format API diff --git a/contrib/ffmpeg/doc/avutil.txt b/contrib/ffmpeg/doc/avutil.txt new file mode 100644 index 000000000..a81e74118 --- /dev/null +++ b/contrib/ffmpeg/doc/avutil.txt @@ -0,0 +1,37 @@ +AVUtil +====== +libavutil is a small lightweight library of generally useful functions. +It is not a library for code needed by both libavcodec and libavformat. + + +Overview: +========= +adler32.c adler32 checksum +aes.c AES encryption and decryption +fifo.c resizeable first in first out buffer +intfloat_readwrite.c portable reading and writing of floating point values +log.c "printf" with context and level +md5.c MD5 Message-Digest Algorithm +rational.c code to perform exact calculations with rational numbers +tree.c generic AVL tree +crc.c generic CRC checksumming code +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 +x86_cpu.h a few useful macros for unifying x86-64 and x86-32 code +avutil.h +common.h +intreadwrite.h reading and writing of unaligned big/little/native-endian integers + + +Goals: +====== +* Modular (few interdependencies and the possibility of disabling individual parts during ./configure) +* Small (source and object) +* Efficient (low CPU and memory usage) +* Useful (avoid useless features almost noone needs) diff --git a/contrib/ffmpeg/doc/faq.texi b/contrib/ffmpeg/doc/faq.texi index 9f1e8ec2d..9c41679ae 100644 --- a/contrib/ffmpeg/doc/faq.texi +++ b/contrib/ffmpeg/doc/faq.texi @@ -80,7 +80,7 @@ Use @file{-} as filename. The audio is AC3 (a.k.a. A/52). AC3 decoding is an optional component in ffmpeg as the component that handles AC3 decoding (liba52) is currently released under the GPL. If you have liba52 installed on your system, enable AC3 decoding -with @code{./configure --enable-a52}. Take care: by +with @code{./configure --enable-liba52 --enable-gpl}. Take care: by enabling AC3, you automatically change the license of libavcodec from LGPL to GPL. @@ -121,14 +121,14 @@ if some MP3 codec like LAME is installed @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://mplayerhq.hu/~michael/bttv-420-2.4.26.patch}). This may also +(@url{http://svn.mplayerhq.hu/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://mplayerhq.hu/~michael/bttv-comb-2.4.26.patch}) -or (@url{http://mplayerhq.hu/~michael/bttv-comb-2.6.6.patch}) +will cause somewhat too strong filtering. A fix is to apply (@url{http://svn.mplayerhq.hu/michael/trunk/patches/bttv-comb-2.4.26.patch?view=co}) +or (@url{http://svn.mplayerhq.hu/michael/trunk/patches/bttv-comb-2.6.6.patch?view=co}) and pass 'combfilter=2'. @section I have a problem with an old version of ffmpeg; where should I report it? @@ -148,7 +148,7 @@ Choose a different codec with the -vcodec command line option. @section ffmpeg does not work; What is wrong? -Try a 'make distclean' in the ffmpeg source directory. If this does not help see +Try a 'make distclean' in the ffmpeg source directory before the build. If this does not help see (@url{http://ffmpeg.org/bugreports.php}). @section How do I encode XviD or DivX video with ffmpeg? @@ -171,7 +171,7 @@ default. @item non-working stuff B-frames @item example command line -ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X output.mp4 +ffmpeg -i input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -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? @@ -184,7 +184,7 @@ ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+t @item non-working stuff B-frames @item example command line -ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200kb -ar 24000 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp output.mp4 +ffmpeg -i input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -ar 24000 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp output.mp4 @item needed stuff for H.264 -acodec aac -vcodec h264 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 @@ -192,9 +192,25 @@ title, loop filter @item non-working stuff for H.264 CAVLC @item example command line -ffmpeg -i input -acodec aac -ab 128 -vcodec h264 -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 +ffmpeg -i input -acodec aac -ab 128kb -vcodec h264 -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 @end table +@section Which are good parameters for encoding high quality MPEG-4? + +'-mbd rd -flags +4mv+trell+aic -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? + +'-mbd rd -flags +trell -cmp 2 -subcmp 2 -g 100 -pass 1/2' +but beware the '-g 100' might cause problems with some decoders. +Things to try: '-bf 2', '-flags qprd', '-flags mv0', '-flags skiprd. + +@section Interlaced video looks very bad when encoded with ffmpeg, whats wrong? + +You should use '-flags +ilme+ildct' and maybe '-flags +alt' for interlaced +material, and try '-top 0/1' if the result looks really messed-up. + @section How can I read DirectShow files? If you have built FFmpeg with @code{./configure --enable-avisynth} @@ -214,6 +230,24 @@ Just create an "input.avs" text file with this single line ... For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}. +@section My bugreport/mail to ffmpeg-devel/user has not received any replies. + +Likely reasons +@itemize +@item We are busy and haven't had time yet to read your report or +investigate the issue. +@item You didn't follow 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 +libav* from another application. +@item You speak about a video having problems on playback but +not what you use to play it. +@item We have no faint clue what you are talking about besides +that it is related to FFmpeg. +@end itemize + @chapter Development @section When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between? @@ -241,9 +275,24 @@ already incorporate ffmpeg at (@url{projects.php}). @section Can you support my C compiler XXX ? -No. Only GCC is supported. GCC is ported to most systems available and there -is no need to pollute the source code with @code{#ifdef}s -related to the compiler. +It depends. If your compiler is C99-compliant, then patches to support +it are likely to be welcome if they do not pollute the source code +with @code{#ifdef}s related to the compiler. + +@section Visual C++ produces many errors. + +Visual C++ is not compliant to the C standard and does not support +the inline assembly used in FFmpeg. +If you wish - for whatever weird reason - to use Visual C++ for your +project then you can link the Visual C++ code with libav* as long as +you compile the latter with a working C compiler. For more information, see +the @emph{Visual C++ compatibility} section in the FFmpeg documentation. + +There have been efforts to make FFmpeg compatible with Visual C++ in the +past. However, they have all been rejected as too intrusive, especially +since MinGW does the job perfectly adequately. None of the core developers +work with Visual C++ and thus this item is low priority. Should you find +the silver bullet that solves this problem, feel free to shoot it at us. @section Can I use FFmpeg or libavcodec under Windows ? @@ -252,18 +301,20 @@ can link the resulting DLLs with any other Windows program. Read the @emph{Native Windows Compilation} and @emph{Visual C++ compatibility} sections in the FFmpeg documentation to find more information. +To get help and instructions for using FFmpeg under Windows, check out +the FFmpeg Windows Help Forum at +@url{http://arrozcru.no-ip.org/ffmpeg/}. + @section Can you add automake, libtool or autoconf support ? -No. These tools are too bloated and they complicate the build. Moreover, -since only @samp{gcc} is supported they would add little advantages in -terms of portability. +No. These tools are too bloated and they complicate the build. @section Why not rewrite ffmpeg in object-oriented C++ ? ffmpeg is already organized in a highly modular manner and does not need to be rewritten in a formal object language. Further, many of the developers favor straight C; it works for them. For more arguments on this matter, -read "Programming Religion" at (@url{http://lkml.org/faq/lkmlfaq-15.html}). +read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}). @section Why are the ffmpeg programs devoid of debugging symbols ? @@ -285,21 +336,6 @@ the whole libav*. If you wish, disable some parts with configure switches. You can also try to hack it and remove more, but if you had problems fixing the compilation failure then you are probably not qualified for this. -@section Visual C++ produces many errors. - -Visual C++ is not compliant to the C standard and does not support -the inline assembly used in FFmpeg. -If you wish - for whatever weird reason - to use Visual C++ for your -project then you can link the Visual C++ code with libav* as long as -you compile the latter with a working C compiler. For more information, see -the @emph{Visual C++ compatibility} section in the FFmpeg documentation. - -There have been efforts to make FFmpeg compatible with Visual C++ in the -past. However, they have all been rejected as too intrusive, especially -since MinGW does the job perfectly adequately. None of the core developers -work with Visual C++ and thus this item is low priority. Should you find -the silver bullet that solves this problem, feel free to shoot it at us. - @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 @@ -309,4 +345,19 @@ and libmpdemux/demux_lavf.c in MPlayer sources. The standard MSys bash (2.04) is broken. You need to install 2.05 or later. +@section I tried to pass RTP packets into a decoder, but it doesn't work. + +Of course not, you MUST strip ALL RTP headers and assemble valid packets +first, an MP3 decoder decodes MP3 packets not bastardized MP3 packets +encapsulated in RTP. The same applies to all decoders, this is not specific +to ffmpeg or libavcodec. + +@section where can i find libav* headers for pascal/delphi + +see @url{http://www.iversenit.dk/dev/ffmpeg-headers/} + +@section where are the docs about ffv1, msmpeg4, asv1, 4xm? + +see @url{http://svn.mplayerhq.hu/michael/trunk/docs/} + @bye diff --git a/contrib/ffmpeg/doc/ffmpeg-doc.texi b/contrib/ffmpeg/doc/ffmpeg-doc.texi index 2d814c0fb..e4e6430fd 100644 --- a/contrib/ffmpeg/doc/ffmpeg-doc.texi +++ b/contrib/ffmpeg/doc/ffmpeg-doc.texi @@ -26,11 +26,11 @@ video on the fly with a high quality polyphase filter. @c man begin EXAMPLES @section Video and Audio grabbing -FFmpeg can use a video4linux compatible video source and any Open Sound -System audio source: +FFmpeg can grab video and audio from devices given that you specify the input +format and device. @example -ffmpeg /tmp/out.mpg +ffmpeg -f audio_device -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg @end example Note that you must activate the right video source and channel before @@ -39,6 +39,24 @@ launching FFmpeg with any TV viewer such as xawtv have to set the audio recording levels correctly with a standard mixer. +@section X11 grabbing + +FFmpeg can grab the X11 display. + +@example +ffmpeg -f x11grab -i :0.0 /tmp/out.mpg +@end example + +0.0 is display.screen number of your X11 server, same as +the DISPLAY environment variable. + +@example +ffmpeg -f x11grab -i :0.0+10,20 /tmp/out.mpg +@end example + +0.0 is display.screen number of your X11 server, same as the DISPLAY environment +variable. 10 is the x-offset and 20 the y-offset for the grabbing. + @section Video and Audio file format conversion * FFmpeg can use any supported file format and protocol as input: @@ -99,7 +117,7 @@ Converts a.wav to MPEG audio at 22050Hz sample rate. mapping from input stream to output streams: @example -ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0 +ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0 @end example Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map @@ -109,7 +127,7 @@ stream, in the order of the definition of output streams. * You can transcode decrypted VOBs @example -ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi +ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec mp3 -ab 128k snatch.avi @end example This is a typical DVD ripping example; the input is a VOB file, the @@ -136,8 +154,6 @@ ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{ @c man end @end example @c man begin DESCRIPTION -If no input file is given, audio/video grabbing is done. - As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is @@ -281,7 +297,7 @@ Set the number of video frames to record. @item -r fps Set frame rate (Hz value, fraction or abbreviation), (default = 25). @item -s size -Set frame size. The format is @samp{wxh} (default = 160x128). +Set frame size. The format is @samp{wxh} (ffserver default = 160x128, ffmpeg default = same as source). The following abbreviations are recognized: @table @samp @item sqcif @@ -544,7 +560,7 @@ Set the number of audio frames to record. @item -ar freq Set the audio sampling frequency (default = 44100 Hz). @item -ab bitrate -Set the audio bitrate in kbit/s (default = 64). +Set the audio bitrate in bit/s (default = 64k). @item -ac channels Set the number of audio channels (default = 1). @item -an @@ -562,7 +578,7 @@ can override the mapping using @code{-map} as usual. Example: @example -ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384 test.mpg -acodec mp2 -ab 192 -newaudio +ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio @end example @item -alang code Set the ISO 639 language code (3 letters) of the current audio stream. @@ -591,20 +607,12 @@ Set the ISO 639 language code (3 letters) of the current subtitle stream. @section Audio/Video grab options @table @option -@item -vd device -sEt video grab device (e.g. @file{/dev/video0}). @item -vc channel Set video grab channel (DV1394 only). @item -tvstd standard Set television standard (NTSC, PAL (SECAM)). -@item -dv1394 -Set DV1394 grab. -@item -ad device -Set audio device (e.g. @file{/dev/dsp}). -@item -grab format -Request grabbing using. -@item -gd device -Set grab device. +@item -isync +Synchronize read on input. @end table @section Advanced options @@ -890,6 +898,11 @@ library: @tab Material eXchange Format SMPTE 377M, used by D-Cinema, broadcast industry. @item SEQ @tab @tab X @tab Tiertex .seq files used in the DOS CDROM version of the game Flashback. +@item DXA @tab @tab X +@tab This format is used in non-Windows version of Feeble Files game and +different game cutscenes repacked for use with ScummVM. +@item THP @tab @tab X +@tab Used on the Nintendo GameCube (video only) @end multitable @code{X} means that encoding (resp. decoding) is supported. @@ -950,11 +963,11 @@ following image formats are supported: @item Sorenson Video 3 @tab @tab X @tab fourcc: SVQ3 @item On2 VP3 @tab @tab X @tab still experimental @item On2 VP5 @tab @tab X @tab fourcc: VP50 -@item On2 VP6 @tab @tab X @tab fourcc: VP62 -@item Theora @tab @tab X @tab still experimental +@item On2 VP6 @tab @tab X @tab fourcc: VP60,VP61,VP62 +@item Theora @tab X @tab X @tab still experimental @item Intel Indeo 3 @tab @tab X @item FLV @tab X @tab X @tab Sorenson H.263 used in Flash -@item Flash Screen Video @tab @tab X @tab fourcc: FSV1 +@item Flash Screen Video @tab X @tab X @tab fourcc: FSV1 @item ATI VCR1 @tab @tab X @tab fourcc: VCR1 @item ATI VCR2 @tab @tab X @tab fourcc: VCR2 @item Cirrus Logic AccuPak @tab @tab X @tab fourcc: CLJR @@ -989,7 +1002,7 @@ following image formats are supported: @item Fraps FPS1 @tab @tab X @tab @item CamStudio @tab @tab X @tab fourcc: CSCD @item American Laser Games Video @tab @tab X @tab Used in games like Mad Dog McCree -@item ZMBV @tab @tab X @tab +@item ZMBV @tab X @tab X @tab Encoder works only on PAL8 @item AVS Video @tab @tab X @tab Video encoding used by the Creature Shock game. @item Smacker Video @tab @tab X @tab Video encoding used in Smacker. @item RTjpeg @tab @tab X @tab Video encoding used in NuppelVideo files. @@ -997,6 +1010,8 @@ following image formats are supported: @item VMware Video @tab @tab X @tab Codec used in videos captured by VMware. @item Cin Video @tab @tab X @tab Codec used in Delphine Software games. @item Tiertex Seq Video @tab @tab X @tab Codec used in DOS CDROM FlashBack game. +@item DXA Video @tab @tab X @tab Codec originally used in Feeble Files game. +@item AVID DNxHD @tab @tab X @tab aka SMPTE VC3 @end multitable @code{X} means that encoding (resp. decoding) is supported. @@ -1011,7 +1026,7 @@ following image formats are supported: @item AC3 @tab IX @tab IX @tab liba52 is used internally for decoding. @item Vorbis @tab X @tab X -@item WMA V1/V2 @tab @tab X +@item WMA V1/V2 @tab X @tab X @item AAC @tab X @tab X @tab Supported through the external library libfaac/libfaad. @item Microsoft ADPCM @tab X @tab X @@ -1072,6 +1087,9 @@ following image formats are supported: @item Cin Audio @tab @tab X @tab Codec used in Delphine Software games. @item Intel Music Coder @tab @tab X +@item Musepack @tab @tab X +@tab Only SV7 is supported +@item DT$ Coherent Audio @tab @tab X @end multitable @code{X} means that encoding (resp. decoding) is supported. @@ -1081,12 +1099,6 @@ performance on systems without hardware floating point support). @chapter Platform Specific information -@section Linux - -FFmpeg should be compiled with at least GCC 2.95.3. GCC 3.2 is the -preferred compiler now for FFmpeg. All future optimizations will depend on -features only found in GCC 3.2. - @section BSD BSD make will not build FFmpeg, you need to install and use GNU Make @@ -1094,6 +1106,10 @@ BSD make will not build FFmpeg, you need to install and use GNU Make @section Windows +To get help and instructions for using FFmpeg under Windows, check out +the FFmpeg Windows Help Forum at +@url{http://arrozcru.no-ip.org/ffmpeg/}. + @subsection Native Windows compilation @itemize @@ -1101,6 +1117,9 @@ BSD make will not build FFmpeg, you need to install and use GNU Make @url{http://www.mingw.org/}. You can find detailed installation instructions in the download section and the FAQ. +NOTE: Use at least bash 3.1. Older versions are known to be failing on the +configure script. + @item If you want to test the FFplay, also download the MinGW development library of SDL 1.2.x (@file{SDL-devel-1.2.x-mingw32.tar.gz}) from @@ -1120,7 +1139,7 @@ suffices. If you have problems using SDL, verify that @file{sdl-config} can be launched from the MSYS command line. @item You can install FFmpeg in @file{Program Files/FFmpeg} by typing -@file{make install}. Don't forget to copy @file{SDL.dll} to the place +@file{make install}. Do not forget to copy @file{SDL.dll} to the place you launch @file{ffplay} from. @end itemize @@ -1166,7 +1185,7 @@ so they can be used with Visual C++: @enumerate -@item Install Visual C++ (if you haven't done so already). +@item Install Visual C++ (if you have not done so already). @item Install MinGW and MSYS as described above. @@ -1190,7 +1209,7 @@ create Visual-C++-compatible import libraries. @item Type the command @code{./configure --enable-shared --disable-static --enable-memalign-hack} -to configure and, if that didn't produce any errors, +to configure and, if that did not produce any errors, type @code{make} to build FFmpeg. @item The subdirectories @file{libavformat}, @file{libavcodec}, and @@ -1212,8 +1231,8 @@ Application Wizard, uncheck the "Precompiled headers" option. @item Write the source code for your application, or, for testing, just copy the code from an existing sample application into the source file that Visual C++ has already created for you. (Note that your source -filehas to have a @code{.cpp} extension; otherwise, Visual C++ won't -compile the FFmpeg headers correctly because in C mode, it doesn't +filehas to have a @code{.cpp} extension; otherwise, Visual C++ will not +compile the FFmpeg headers correctly because in C mode, it does not recognize the @code{inline} keyword.) For example, you can copy @file{output_example.c} from the FFmpeg distribution (but you will have to make minor modifications so the code will compile under @@ -1246,7 +1265,7 @@ set to "Multi-threaded DLL". the application. Hopefully, it should compile and run cleanly. If you used @file{output_example.c} as your sample application, you will get a few compiler errors, but they are easy to fix. The first type of error -occurs because Visual C++ doesn't allow an @code{int} to be converted to +occurs because Visual C++ does not allow an @code{int} to be converted to an @code{enum} without a cast. To solve the problem, insert the required casts (this error occurs once for a @code{CodecID} and once for a @code{CodecType}). The second type of error occurs because C++ requires @@ -1269,7 +1288,7 @@ You must use the MinGW cross compilation tools available at Then configure FFmpeg with the following options: @example -./configure --enable-mingw32 --cross-prefix=i386-mingw32msvc- +./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc- @end example (you can change the cross-prefix according to the prefix chosen for the MinGW tools). @@ -1311,7 +1330,7 @@ and/or SDL, xvid, faac, faad2 packages from Cygwin Ports, @subsection Crosscompilation for Windows under Cygwin -With Cygwin you can create Windows binaries that don't need the cygwin1.dll. +With Cygwin you can create Windows binaries that do not need the cygwin1.dll. Just install your Cygwin as explained before, plus these additional "Devel" packages: @@ -1323,12 +1342,12 @@ and add some special flags to your configure invocation. For a static build run @example -./configure --enable-mingw32 --enable-memalign-hack --enable-static --disable-shared --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin +./configure --target-os=mingw32 --enable-memalign-hack --enable-static --disable-shared --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin @end example and for a build with shared libraries @example -./configure --enable-mingw32 --enable-memalign-hack --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin +./configure --target-os=mingw32 --enable-memalign-hack --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin @end example @section BeOS @@ -1342,7 +1361,7 @@ Old stuff: François Revol - revol at free dot fr - April 2002 The configure script should guess the configuration itself, -however I still didn't test building on the net_server version of BeOS. +however I still did not test building on the net_server version of BeOS. FFserver is broken (needs poll() implementation). @@ -1392,14 +1411,14 @@ designated struct initializers (@samp{struct s x = @{ .i = 17 @};}) compound literals (@samp{x = (struct s) @{ 17, 23 @};}) @end itemize -These features are supported by all compilers we care about, so we won't -accept patches to remove their use unless they absolutely don't impair +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 GCC 2.95 and GCC 3.3. Currently, FFmpeg also compiles with several other compilers, such as the Compaq ccc compiler or Sun Studio 9, and we would like to keep it that way unless it would -be exceedingly involved. To ensure compatibility, please don't use any +be exceedingly involved. To ensure compatibility, please do not use any additional C99 features or GCC extensions. Especially watch out for: @itemize @bullet @item @@ -1424,7 +1443,7 @@ bugs). 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's just one sentence. +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 /** @@ -1470,13 +1489,19 @@ please use av_log() instead. (#ifdef etc) by default so it does not interfere with other developers' work. @item - You don't have to over-test things. If it works for you, and you think it + 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. + 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/disscuss 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 @@ -1497,12 +1522,12 @@ please use av_log() instead. 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 don't.). If you really need to make + 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 (don't + 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 @@ -1518,7 +1543,7 @@ please use av_log() instead. Do NOT commit to code actively maintained by others without permission. Send a patch to ffmpeg-devel instead. If noone 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's OK. + 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 @@ -1530,6 +1555,9 @@ please use av_log() instead. 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. @@ -1549,6 +1577,9 @@ please use av_log() instead. component of the @file{libavcodec} version number appropriately. If it has a fourcc, add it to @file{libavformat/avienc.c}, even if it is only a decoder. +@item + Do not change code to hide warnings without ensuring that the underlying + logic is correct and thus the warning was inappropriate. @end enumerate We think our rules are not too hard. If you have comments, contact us. @@ -1557,7 +1588,7 @@ Note, these rules are mostly borrowed from the MPlayer project. @section Submitting patches -First, (@pxref{Coding Rules}) above if you didn't yet. +First, (@pxref{Coding Rules}) above if you did not yet. When you submit your patch, try to send a unified diff (diff '-up' option). I cannot read other diffs :-) @@ -1570,7 +1601,7 @@ 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 won't be trashed during +encoding which ensures that the patch will not be trashed during transmission) to the ffmpeg-devel mailing list, see @url{http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel} @@ -1578,8 +1609,26 @@ 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()') -We reply to all submitted patches and either apply or reject with some -explanation why, but sometimes we are quite busy so it can take a week or two. +@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 SVN. +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 disscussion. 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 diff --git a/contrib/ffmpeg/doc/ffplay-doc.texi b/contrib/ffmpeg/doc/ffplay-doc.texi index db08eb38f..1ac315662 100644 --- a/contrib/ffmpeg/doc/ffplay-doc.texi +++ b/contrib/ffmpeg/doc/ffplay-doc.texi @@ -35,10 +35,17 @@ show help force displayed width @item -y height force displayed height +@item -s size +Set frame size (WxH or abbreviation), needed for videos which don't +contain a header with the framesize like raw YUV. @item -an disable audio @item -vn disable video +@item -ss pos +seek to a given position in seconds +@item -bytes +seek by bytes @item -nodisp disable graphical display @item -f fmt @@ -47,9 +54,21 @@ force format @section Advanced options @table @option +@item -pix_fmt format +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 +generate pts @item -rtp_tcp Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful if you are streaming with the RTSP protocol. @@ -60,6 +79,8 @@ master clock is used to control audio-video synchronization. Most media players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. +@item -threads count +thread count @end table @section While playing @@ -82,6 +103,16 @@ cycle video channel @item w show audio waves + +@item left/right +seek backward/forward 10 seconds + +@item down/up +seek backward/forward 1 minute + +@item mouse click +seek to percentage in file corresponding to fraction of width + @end table @c man end diff --git a/contrib/ffmpeg/doc/hooks.texi b/contrib/ffmpeg/doc/hooks.texi index 15013547c..49504509f 100644 --- a/contrib/ffmpeg/doc/hooks.texi +++ b/contrib/ffmpeg/doc/hooks.texi @@ -17,13 +17,18 @@ 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. -Three modules are provided and are described below. They are all intended to -be used as a base for your own modules. +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 @@ -43,14 +48,24 @@ colors than would an RGB cuboid. 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 +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. -Text fonts are being looked for in a FONTPATH environment variable. +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. Options: @multitable @columnfractions .2 .8 @@ -58,8 +73,8 @@ Options: @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 <expresion>} @tab X coordinate of text or image -@item @option{-y <expresion>} @tab Y coordinate of text or image +@item @option{-x <expresion>} @tab x coordinate of text or image +@item @option{-y <expresion>} @tab y coordinate of text or image @item @option{-i <filename>} @tab The filename to read a image from @end multitable @@ -96,13 +111,53 @@ Usage examples: 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 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). +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: @@ -110,4 +165,96 @@ Usage 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 diff --git a/contrib/ffmpeg/doc/optimization.txt b/contrib/ffmpeg/doc/optimization.txt index 26c5ae64c..f66c69bcf 100644 --- a/contrib/ffmpeg/doc/optimization.txt +++ b/contrib/ffmpeg/doc/optimization.txt @@ -150,6 +150,15 @@ http://www.agner.org/assem/ AMD Athlon Processor x86 Code Optimization Guide: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/22007.pdf + +ARM-specific: +ARM Architecture Reference Manual: +http://www.arm.com/community/academy/resources.html + +Instructions timings and optimization guide for ARM9E: +http://www.arm.com/pdfs/DDI0222B_9EJS_r1p2.pdf + + GCC asm links: official doc but quite ugly http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html diff --git a/contrib/ffmpeg/doc/snow.txt b/contrib/ffmpeg/doc/snow.txt new file mode 100644 index 000000000..4b8fab75a --- /dev/null +++ b/contrib/ffmpeg/doc/snow.txt @@ -0,0 +1,259 @@ +============================================= +SNOW Video Codec Specification Draft 20070103 +============================================= + + +Definitions: +============ + +MUST the specific part must be done to conform to this standard +SHOULD it is recommended to be done that way, but not strictly required + +ilog2(x) is the rounded down logarithm of x with basis 2 +ilog2(0) = 0 + +Type definitions: +================= + +b 1-bit range coded +u unsigned scalar value range coded +s signed scalar value range coded + + +Bitstream syntax: +================= + +frame: + header + prediction + residual + +header: + keyframe b MID_STATE + if(keyframe || always_reset) + reset_contexts + if(keyframe){ + version u header_state + always_reset b header_state + temporal_decomposition_type u header_state + temporal_decomposition_count u header_state + spatial_decomposition_count u header_state + colorspace_type u header_state + chroma_h_shift u header_state + chroma_v_shift u header_state + spatial_scalability b header_state + max_ref_frames-1 u header_state + qlogs + } + + spatial_decomposition_type s header_state + qlog s header_state + mv_scale s header_state + qbias s header_state + block_max_depth s header_state + +qlogs: + for(plane=0; plane<2; plane++){ + quant_table[plane][0][0] s header_state + for(level=0; level < spatial_decomposition_count; level++){ + quant_table[plane][level][1]s header_state + quant_table[plane][level][3]s header_state + } + } + +reset_contexts + *_state[*]= MID_STATE + +prediction: + for(y=0; y<block_count_vertical; y++) + for(x=0; x<block_count_horizontal; x++) + block(0) + +block(level): + if(keyframe){ + intra=1 + y_diff=cb_diff=cr_diff=0 + }else{ + if(level!=max_block_depth){ + s_context= 2*left->level + 2*top->level + topleft->level + topright->level + leaf b block_state[4 + s_context] + } + if(level==max_block_depth || leaf){ + intra b block_state[1 + left->intra + top->intra] + if(intra){ + y_diff s block_state[32] + cb_diff s block_state[64] + cr_diff s block_state[96] + }else{ + ref_context= ilog2(2*left->ref) + ilog2(2*top->ref) + if(ref_frames > 1) + ref u block_state[128 + 1024 + 32*ref_context] + mx_context= ilog2(2*abs(left->mx - top->mx)) + my_context= ilog2(2*abs(left->my - top->my)) + mvx_diff s block_state[128 + 32*(mx_context + 16*!!ref)] + mvy_diff s block_state[128 + 32*(my_context + 16*!!ref)] + } + }else{ + block(level+1) + block(level+1) + block(level+1) + block(level+1) + } + } + + +residual: + FIXME + + + +Tag description: +---------------- + +version + 0 + this MUST NOT change within a bitstream + +always_reset + if 1 then the range coder contexts will be reset after each frame + +temporal_decomposition_type + 0 + +temporal_decomposition_count + 0 + +spatial_decomposition_count + FIXME + +colorspace_type + 0 + this MUST NOT change within a bitstream + +chroma_h_shift + log2(luma.width / chroma.width) + this MUST NOT change within a bitstream + +chroma_v_shift + log2(luma.height / chroma.height) + this MUST NOT change within a bitstream + +spatial_scalability + 0 + +max_ref_frames + maximum number of reference frames + this MUST NOT change within a bitstream + +ref_frames + minimum of the number of available reference frames and max_ref_frames + for example the first frame after a key frame always has ref_frames=1 + +spatial_decomposition_type + wavelet type + 0 is a 9/7 symmetric compact integer wavelet + 1 is a 5/3 symmetric compact integer wavelet + others are reserved + stored as delta from last, last is reset to 0 if always_reset || keyframe + +qlog + quality (logarthmic quantizer scale) + stored as delta from last, last is reset to 0 if always_reset || keyframe + +mv_scale + stored as delta from last, last is reset to 0 if always_reset || keyframe + FIXME check that everything works fine if this changes between frames + +qbias + dequantization bias + stored as delta from last, last is reset to 0 if always_reset || keyframe + +block_max_depth + maximum depth of the block tree + stored as delta from last, last is reset to 0 if always_reset || keyframe + +quant_table + quantiztation table + +Range Coder: +============ +FIXME + +Neighboring Blocks: +=================== +left and top are set to the respective blocks unless they are outside of +the image in which case they are set to the Null block + +top-left is set to the top left block unless its outside of the image in +which case it is set to the left block + +if this block has no larger parent block or its at the left side of its +parent block and the top right block is not outside of the image then the +top right block is used for top-right else the top-left block is used + +Null block +y,cb,cr are 128 +level, ref, mx and my are 0 + + +Motion Vector Prediction: +========================= +1. the motion vectors of all the neighboring blocks are scaled to +compensate for the difference of reference frames + +scaled_mv= (mv * (256 * (current_reference+1) / (mv.reference+1)) + 128)>>8 + +2. the median of the scaled left, top and top-right vectors is used as +motion vector prediction + +3. the used motion vector is the sum of the predictor and + (mvx_diff, mvy_diff)*mv_scale + + +Intra DC Predicton: +====================== +the luma and chroma values of the left block are used as predictors + +the used luma and chroma is the sum of the predictor and y_diff, cb_diff, cr_diff + + +Motion Compensation: +==================== +FIXME + +LL band prediction: +=================== +FIXME + +Dequantizaton: +============== +FIXME + +Wavelet Transform: +================== +FIXME + +TODO: +===== +Important: +finetune initial contexts +spatial_decomposition_count per frame? +flip wavelet? +try to use the wavelet transformed predicted image (motion compensated image) as context for coding the residual coefficients +try the MV length as context for coding the residual coefficients +use extradata for stuff which is in the keyframes now? +the MV median predictor is patented IIRC + +Not Important: +spatial_scalability b vs u (!= 0 breaks syntax anyway so we can add a u later) + + +Credits: +======== +Michael Niedermayer +Loren Merritt + + +Copyright: +========== +GPL + GFDL + whatever is needed to make this a RFC |