Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rbultje/ffmpeg
head fork: rbultje/ffmpeg
Checking mergeability… Don't worry, you can still create the pull request.
Commits on May 14, 2011
@justinruggles justinruggles Add an aac sample which uses LTP to fate-aac. 08e434b
@DonDiego DonDiego Fix FSF address copy paste error in some license headers. 888fa31
Commits on May 15, 2011
Reinhard Tartler configure: use same CPPFLAGS in kFreeBSD as Linux
046f081 reorganized the CPPFLAGS to no
longer add -D_POSIX_C_SOURCE unconditionally, but only on systems (e.g.,
glibc based ones) that require it.  As kFreeBSD uses glibc, it needs to
be treated similar.

Additionally, _BSD_SOURCE is turned on to enable some additional types
such as caddr_t, which are normally enabled on BSD but not with glibc.
@DonDiego DonDiego configure: Include AVX availability in summary output. c73b779
@DonDiego DonDiego dfa: Remove unused variable.
This fixes the warning:
libavcodec/dfa.c:189: warning: unused variable ‘frame_end’
@DonDiego DonDiego acelp: Remove unused gray_decode table. 7f995ab
@justinruggles justinruggles aacdec: Use float instead of int16_t for ltp_state to avoid needless …
Commits on May 16, 2011
@DonDiego DonDiego Remove unused header mpegaudio3.h.
The header is a part of an MP3 encoder that never saw the light of day.
@kanongil kanongil h264dsp_mmx: Add #ifdefs around some mmxext functions on x86_64.
This fixes linking errors due to undefined symbols on x86_64 OS X.

Signed-off-by: Diego Biurrun <>
@mansr mansr dct: bypass table allocation for DCT_II of size 32
The size-32 DCT_II has a special implementation which doesn't use
the normal tables.  Skipping allocation of these in this case saves
some memory.

Signed-off-by: Mans Rullgard <>
@mansr mansr dct: fix indentation
Signed-off-by: Mans Rullgard <>
@mansr mansr Add missing #includes to mp3_header_(de)compress bsf
Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: remove OUT_MIN/MAX macros
These macros are no longer needed after the s32 output was removed.
Change the relevant code to use av_clip_int16() instead of using
explicit limits.

Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: move OUT_FMT macro to mpegaudiodec.c
Signed-off-by: Mans Rullgard <>
@DonDiego DonDiego tools: Check the return value of write().
This fixes several warnings of the type:
warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
@DonDiego DonDiego cws2fws: Improve error message wording. c540061
@mansr mansr mathops: remove ancient confusing comment
Signed-off-by: Mans Rullgard <>
Stefano Sabatini lavfi: print key-frame and picture type information in ff_dlog_ref()
Signed-off-by: Stefano Sabatini <>
(cherry picked from commit f7bdffb)
Stefano Sabatini ffplay: remove audio_write_get_buf_size() forward declaration
Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
(cherry picked from commit 8776f3d)
@michaelni michaelni Restructure video filter implementation in ffmpeg.c.
This fixes several bugs like multiple outputs and -aspect mixed with -vf

(cherry picked from commit 1762d9c)
(cherry picked from commit 5c20c81)
(cherry picked from commit a7844c5)
@bcoudurier bcoudurier ffmpeg: fix -aspect cli option
Redesign the way -aspect option is handled. This is done by making
ffmpeg read the sample aspect ratio set in the corresponding input
stream by default, and overriding it using the value specified by

If the output display aspect ratio is specified with -aspect, it is
set at the end of the filterchain, thus overriding the value set by
filters in the filterchain.

This implementation is more robust, since does not modify the
filterchain description (which was creating potential syntax errors).

(Cherry-pick abf8342)

Another aspect ratio fix try. This leaves the setdar addition at the end
(preferred by people).

(Cherry-pick e7c7b0d)
Commits on May 17, 2011
@mansr mansr qdm2: include correct header for rdft
Signed-off-by: Mans Rullgard <>
@mansr mansr dct: build dct32 as separate object files
This builds the float and fixed-point versions of dct32 separately
instead of #including the file in dct.c and mpegaudiodec.c.

Signed-off-by: Mans Rullgard <>
@ddkang ddkang Modify x86util.asm to ease transitioning to 10-bit H.264 assembly.
Arguments for variable size instructions are added to many macros, along
with other various changes. The x86util.asm code was ported from x264.

Signed-off-by: Diego Biurrun <>
@mansr mansr mpegaudio: add _fixed suffix to some names
This adds a _fixed suffix to the fixed-point versions of things
with both float and fixed-point variants.  This makes it more
consistent with other dual-implementation things, e.g. fft.

Signed-off-by: Mans Rullgard <>
Vladimir Pantelic asfdec: fallback to binary search internally
lavf will do that anyway in case seek by index fails
Vladimir Pantelic asfdec: reindent after previous commit c7bd5ed b58bc17
Vladimir Pantelic asfdec: do not fall back to binary/generic search
asf_read_seek() inside the asf demuxer already does the
right thing, it tries the index and if that fails it uses
binary search. If binary search is called from outside of asfdec.c
it will fail because the asf code cannot clean up after itself.
Therefore introduce AVFMT_NOBINSEARCH that prevents the seek
code to fallback to binary search and AVFMT_NOGENSEARCH that
prevents the seek code to fallback to generic search.
Uoti Urpala asfdec: fix possible overread on broken files. 29fa570
@aconverse aconverse flvdec: clenup debug code 13220b1
@elenril elenril lavf: use designated initializers for AVClasses. f0029cb
@elenril elenril lavf: remove duplicate assignment in avformat_alloc_context.
AVClass is already initialized in  avformat_get_context_defaults.
@jmakovicka jmakovicka libx264: handle closed GOP codec flag
Also update libx264 presets to keep closed gop as default.

Signed-off-by: Jindrich Makovicka <>
Signed-off-by: Anton Khirnov <>
@justinruggles justinruggles Fix compilation of iirfilter-test. a26d2b4
Commits on May 18, 2011
@rbultje mdec.c: fix overread. 32ac63e
@mrvacbob mrvacbob mdec: enable frame-level multithreading.
Signed-off-by: Ronald S. Bultje <>
@rbultje h264: copy pixel_shift between slice threading contexts.
@rbultje mpeg12: add slice-threading checks to slice-threading initializers.
Fixes "make THREADS=2 THREAD_TYPE=1 fate-mpeg2-field-enc".
@mansr mansr mpegaudio: sanitise compute_antialias_* names
This makes the compute_antialias functions use the same naming
convention as everything else.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: run aref and vref as regular tests
These tests create reference files used for psnr calculation in
the other codec tests.  Treating them as (mostly) regular tests
simplifies the makefile and makes them visible in the fate reports.
The latter makes errors in these runs easier to identify.

Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudiodec: remove decode_end() function
This function is not needed since 721d6f2 removed the DCT table
allocations for the configuration used here.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: do not collect -benchmark output
The old regtest scripts pass -benchmark and collect the utime values.
As these values are never used, this machinery can be removed.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: remove do_ffmpeg_nocheck function
This function is essentially an alias for run_ffmpeg and is only
used in one place.  This patch removes the function and replaces
the call with the equivalent (simpler) run_ffmpeg call.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: remove redundant aref and vref references
The ref targets are included in the FATE_[AV]CODEC lists created
by configure so they do not need to be listed separately in the
makefile.  Filter them out when setting dependencies to avoid make
warnings about circular deps.

Signed-off-by: Mans Rullgard <>
@mansr mansr Remove unused make variable SEEK_REFFILE
Signed-off-by: Mans Rullgard <>
@justinruggles justinruggles Add float_interleave() to FmtConvertContext with x86-optimized versions.
Partially based on patches by clsid2 in ffdshow-tryout.
ff_float_interleave6() x86 improvements by Loren Merrit.
@justinruggles justinruggles Add request_sample_fmt field to AVCodecContext.
This will allow audio decoders to support output of different sample formats
as a runtime option.
@justinruggles justinruggles Add APIchanges entry for request_sample_fmt. 00e5da8
@justinruggles justinruggles Add support for request_sample_format in ffmpeg and ffplay. bc778a0
@justinruggles justinruggles Add floating-point sample format support to the ac3, eac3, dca, aac, …
…and vorbis


Based on patches by clsid2 in ffdshow-tryout.
@justinruggles justinruggles APIchanges: fill in date and commit for request_sample_fmt 41e21e4
Commits on May 19, 2011
@justinruggles justinruggles 10l: wrap float_interleave functions in HAVE_YASM.
fixes compilation with --disable-yasm
@DonDiego DonDiego g729: Merge g729.h into g729dec.c.
The header contains just a single define that is only used in g729dec.c.
@DonDiego DonDiego Clean up #includes in cmdutils.h.
inttypes.h is not necessary, just stdint.h is enough.
Unconditionally #include avfilter.h in cmdutils.h.  It is an installed
header with no non-standard external dependencies, so it is safe.
@mansr mansr Move some mpegaudio functions to new mpegaudiodsp subsystem
This separation allows these functions to be used in a cleaner
fashion from other codecs (e.g. qdm2) and simplifies creating
optimised versions of them.

Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: move some struct definitions from mpegaudio.h
These structs are only used in mpegaudiodec.c, so move them there
and remove no longer needed #include lines from mpegaudio.h.

Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: merge two #if CONFIG_FLOAT blocks
Signed-off-by: Mans Rullgard <>
@mansr mansr asfdec: add missing #include for av_bswap32()
Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: remove useless #undef at end of file
Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: remove unused version of SAME_HEADER_MASK
Signed-off-by: Mans Rullgard <>
@DonDiego DonDiego configure: Adjust AVX assembler check.
Older nasm versions have trouble assembling certain AVX instructions, but the
current AVX check did not detect this. Update the check to use an instruction
that triggers the nasm problem.
@mansr mansr mpegaudiodsp: fix x86 and ppc makefiles
Signed-off-by: Mans Rullgard <>
@DonDiego DonDiego Remove silly insults from avformat_version() Doxygen documentation. 7ed0a77
@DonDiego DonDiego Simplify CLEANFILES make variable by using wildcards.
Also ensures that generated file cos_fixed_tables.c is deleted on 'make clean'.
@DonDiego DonDiego Ignore generated tables and generated table generator programs. 8a0572b
@DonDiego DonDiego Remove potentially unstable filenames from comments in generated files. c98657a
@mansr mansr Simplify trig table rules
This collapses the make rules for the trig tables into a pattern
rule.  Based on a patch by Diego, modified to avoid using fragile
make constructs and allow future addition of fixed-point sin tables.

Signed-off-by: Mans Rullgard <>
@DonDiego DonDiego Collapse tableprint.c into tableprint.h.
tableprint.c serves little purpose on its own and removing it allows building
the table generator programs with the normal HOSTPROGS Makefile rules.
@DonDiego DonDiego Rename costablegen.c ---> cos_tablegen.c.
This is consistent with how all other table generation programs are named.
Moreover this ensures that the cos table generation program is correctly
deleted when cleaning the tree.
Commits on May 20, 2011
@mansr mansr Fix ff_mpa_synth_filter_fixed() prototype
The prototype should use the same typedefs as the definition, or it
will fail where int32_t is not int (DOS apparently).

Signed-off-by: Mans Rullgard <>
@rbultje h264: fix loopfilter with threading at slice boundaries. 0ffc841
@rbultje h264: correct border check.
When backing up the top-left border, check that the top-left
(rather than left) MB indeed does belong to our slice. If it
doesn't, backing up has no positive effect but may accidentally
interfere with other threads writing in the same space.

Fixes occasional one-off effects when enabling slice-MT.
Vitor Sessak qdm2: Use floating point synthesis filter.
This avoid needlessly convertion from floating point to fixed point and back.

Signed-off-by: Ronald S. Bultje <>
@mansr mansr mpegaudio: move all header parsing to mpegaudiodecheader.[ch]
Signed-off-by: Mans Rullgard <>
@mansr mansr mpegaudio: clean up #includes
Signed-off-by: Mans Rullgard <>
@mstorsjo mstorsjo mpegtsenc: Add an AVClass pointer to the private data
Since a private class is set for this muxer, the callers will
assume that the private data starts with an AVClass pointer.
If no such member exists, the first few bytes of the struct
will be overwritten, and the class pointer may be broken at
any later time.

Signed-off-by: Martin Storsjö <>
@mansr mansr fate: allow overriding default build and install dirs
This is useful e.g. for building in a different filesystem than
where the source is kept.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: add comment field
This adds a comment field to the report header, suitable for
extra information not covered by the automatic fields.

Signed-off-by: Mans Rullgard <>
@mansr mansr fate: disable threading for encoding
This explicitly disables threading for encoding as slices are otherwise
automatically activated.  This should be dropped once option resetting
between files is fully implemented.

Signed-off-by: Mans Rullgard <>
@dryeo dryeo Add support for a.out object format to assembler macros.
This format is still used by e.g. OS/2.

Signed-off-by: Diego Biurrun <>
@dryeo dryeo configure: Set OS/2 objformat to a.out.
Signed-off-by: Diego Biurrun <>
@DonDiego DonDiego configure: Do not unconditionally add -Wall to host CFLAGS.
Some compilers choke on -Wall, so only add the flag after checking it works.
@rbultje LATM/AAC: Free previously initialized context on reinit.
Fixes memory leaks which are the result of overwriting already-initialized
MDCT contexts during context reinitialization, e.g. in valgrind

Signed-off-by: Diego Biurrun <>
@mansr mansr configure: make executable again
Signed-off-by: Mans Rullgard <>
@rbultje mp3lame: add #include required for AV_RB32 macro.
Fixes compilation with mp3lame enabled.
Commits on May 21, 2011
Reinhard Tartler add changelog entries for 0.7_beta2 21bbca5
@rbultje svq3: Do initialization after parsing the extradata
If done before, some parameters aren't known yet.

With svq3/rtp, initializing before some parameters are known
can lead to calling av_malloc(0), which on OS X currently returns
broken pointers.
@ubitux ubitux swscale: point out an alternative to sws_getContext
Signed-off-by: Anton Khirnov <>
@wucan wucan avio: check AVIOContext malloc failure
Signed-off-by: Anton Khirnov <>
@wucan wucan avio: document buffer must created with av_malloc() and friends
Else a later buffer resize in ffio_set_buf_size() will ABORT.

Signed-off-by: Anton Khirnov <>
@DonDiego DonDiego multiple inclusion guard cleanup
Add missing multiple inclusion guards; clean up #endif comments;
add missing library prefixes; keep guard names consistent.
Vitor Sessak dct32: port SSE 32-point DCT to YASM 3758eb0
Vitor Sessak dct32: Change pass 6 permutation to allow for AVX implementation 4e653b9
Vitor Sessak dct32: Add AVX implementation of 32-point DCT 6204feb
@elenril elenril ffmpeg: get rid of the -vglobal option.
It's badly documented and does the same thing as -flags global_header,
so it's redundant.
Commits on May 22, 2011
Vitor Sessak Fix dct32() compilation with --disable-yasm
Signed-off-by: Ronald S. Bultje <>
Loren Merritt dct32_sse: eliminate some spills
125->104 cycles on penryn (x86_64 only)
@mstorsjo mstorsjo avoptions: Check the return value from av_get_number
This avoids doing a division by zero if the option wasn't found,
or wasn't an option of an appropriate type.

Signed-off-by: Martin Storsjö <>
@mstorsjo mstorsjo ffmpeg: Don't trigger url_interrupt_cb on the first signal
Currently, the url_interrupt_cb callback will abort all IO
after the first received signal. This makes the output files
from e.g. the mov muxer to be unreadable if the transcode is
aborted with ctrl+c.

After this patch, the first signal cleanly breaks out of
the transcoding loop, but won't forcibly abort all IO.
After the second signal is received, the url_interrupt_cb
callback will abort all IO.

Signed-off-by: Martin Storsjö <>
Commits on May 23, 2011
@kierank kierank Fix 9/10 bit in swscale.
Signed-off-by: Ronald S. Bultje <>
@dryeo dryeo x86 asm: Add SECTION_TEXT to dct32_sse.asm.
This fixes the following error on OS/2:
error: segment name `.text align=16' not recognized

Signed-off-by: Diego Biurrun <>
@felipec felipec h264: Properly set coded_{width, height} when parsing H.264.
Signed-off-by: Felipe Contreras <>
Signed-off-by: Diego Biurrun <>
@rbultje fate: update 9/10bit refs. 8458074
@rbultje fate: fix fate-h264-conformance-frext-pph10i4-panasonic-a crcs.
The sample on rsync was corrupt, this one is now bitexact w.r.t. JM.
@justinruggles justinruggles aacdec: fix typo in scalefactor clipping check cef7d70
@DonDiego DonDiego configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS.
In -std=c99 mode GCC defines __STRICT_ANSI__ to hide non-ANSI interfaces.
This causes declarations for some POSIX functions to be omitted from system
headers, which causes compilation failures.
Commits on May 24, 2011
@justinruggles justinruggles ac3enc: add channel coupling support
Channel coupling is an optional AC-3 feature that increases quality by
combining high frequency information from multiple channels into a
single channel. The per-channel high frequency information is sent with
less accuracy in both the frequency and time domains. This allows more
bits to be used for lower frequencies while preserving enough
information to reconstruct the high frequencies.
@elenril elenril lavc: remove msmpeg4v1 encoder.
The encoder has never produced files that could be decoded
with any software and there should be no reason to create
such files anyway.
@elenril elenril msmpeg4: reindent. b2893ee
Stefano Sabatini vsrc_buffer: tweak error message in init()
Expected 7 arguments, but only %d found in '%s'\n
Expected 7 arguments, but %d found in '%s'\n

as the user may provide more than 7 arguments, in that case the error
is not misleading.

Signed-off-by: Anton Khirnov <>
Stefano Sabatini vsrc_buffer.h: add file doxy
Signed-off-by: Stefano Sabatini <>
Signed-off-by: Anton Khirnov <>
@rbultje swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. e66149e
@rbultje swscale: remove duplicated x86/ functions. 11ffefe
@rbultje swscale: remove duplicate code in ppc/ subdirectory. fe43d5d
@rbultje swscale: remove AMD3DNOW "optimizations".
The functions are identical to their MMX counterparts. Thus,
pretending that swscale is highly optimized for AMD3DNOW
extensions is a poorly executed practical joke at best.
@rbultje swscale: remove dead macro WRITEBGR24OLD. b9eb213
@cehoyos cehoyos ape: Allow demuxing of files with metadata tags.
Signed-off-by: Anton Khirnov <>
Alexandre Colucci dvdsubdec: fix incorrect colors.
On DVD and HD-DVD colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see DVD Specifications for Read-Only Disc / Part 3, 4.3 Program Chain Information (7) PGC_SP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (11) PGC_SDSP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (12) PGC_HDSP_PLT
see DVD Specifications for High Definition Disc, 5.5 Presentation Data (4) SET_COLOR2

When decoding a DVD or HD-DVD subtitle, the colors were incorrectly set.

Signed-off-by: Anton Khirnov <>
Alexandre Colucci pgssubdec: fix incorrect colors.
On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see System Description Blu-ray Disc Read-Only Format, Palette Definition Segment

When decoding a Blu-ray subtitle, the colors were incorrectly set.

Signed-off-by: Anton Khirnov <>
Ilya rtsp: use strtoul to parse rtptime and seq values.
strtol could return negative values, leading to various error messages,
mainly "non-monotonically increasing dts".

Signed-off-by: Anton Khirnov <>
Stefano Sabatini tiff: set palette in the context when specified in TIFF_PAL tag
Since image initialization was moved after tag parsing, the
palette needs to be specified in the context and then copied
to the allocated image in init_image().

Fixes a regression with TIFF images that have palette data,
trac issue #230, file Test_Flate_8bpp.tif.

Signed-off-by: Diego Biurrun <>
@rbultje Move emms_c() from libavcodec to libavutil. e973557
@rbultje swscale: use emms_c(). c4fd283
@rbultje swscale: remove swScale_{c,MMX,MMX2} duplication. aaca69c
@rbultje swscale: remove if(canMMX2BeUsed) conditional.
Instead, set function pointers conditionally during init. This
patch also reveals a whole branch of dead assembly code that is
therefore also removed.
@rbultje swscale: remove if(bitexact) branch from functions.
Instead, only set the function pointers if bitexact flag is
not set during initialization. Since a change in flags triggers
a re-init anyway, this doesn't situations where flag values
change during runtime.
@rbultje swscale: unbreak the build on non-x86 systems. a724ee6