ffmpeg.git
7 years agosws/x86: add av_assert() to ensure 16bit code is used with 16bit data
Michael Niedermayer [Thu, 5 Jul 2012 02:39:11 +0000 (04:39 +0200)]
sws/x86: add av_assert() to ensure 16bit code is used with 16bit data

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosws/x86: add some forgotten 12bit planar yuv cases
Michael Niedermayer [Thu, 5 Jul 2012 02:37:12 +0000 (04:37 +0200)]
sws/x86: add some forgotten 12bit planar yuv cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agonut: add 12/14 bit yuv to nut/raw
Carl Eugen Hoyos [Thu, 5 Jul 2012 02:20:58 +0000 (04:20 +0200)]
nut: add 12/14 bit yuv to nut/raw

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosanm: remove code duplication
Paul B Mahol [Wed, 4 Jul 2012 17:45:13 +0000 (17:45 +0000)]
sanm: remove code duplication

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agosanm: replace conditions in for loops with more common version
Paul B Mahol [Wed, 4 Jul 2012 17:37:31 +0000 (17:37 +0000)]
sanm: replace conditions in for loops with more common version

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agosws: support 12&14 bit planar colorspaces
Michael Niedermayer [Tue, 3 Jul 2012 02:10:11 +0000 (04:10 +0200)]
sws: support 12&14 bit planar colorspaces

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoblowfish.h: include author attribution
Michael Niedermayer [Wed, 4 Jul 2012 19:11:39 +0000 (21:11 +0200)]
blowfish.h: include author attribution

Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoxtea.h: include author attribution
Michael Niedermayer [Wed, 4 Jul 2012 19:12:01 +0000 (21:12 +0200)]
xtea.h: include author attribution

Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 4 Jul 2012 18:39:50 +0000 (20:39 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (29 commits)
  lavfi: reclassify showfiltfmts as a TESTPROG
  graph2dot: fix printf format specifier
  swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
  vp8: loopfilter >=sse2 functions need aligned stack on x86-32.
  amr: remove shift out of the AMR_BIT() macro.
  dsputilenc: group yasm and inline asm function pointer assignment.
  mov: use forward declaration of a function instead of a table.
  Clarify Doxygen comment for FF_API_* #defines.
  configure: simplify get_version()
  Create version.h headers for libraries that lack them
  gitignore: Use full path instead of relative path to specify patterns
  mpegvideo: remove VLAs
  Add XTEA encryption support in libavutil
  Add Blowfish encryption support in libavutil
  eval: Add the isinf() function and tests for it
  flacdec: move lpc filter to flacdsp
  flacdec: split off channel decorrelation as flacdsp
  avplay: Add an option for not limiting the input buffer size
  FATE: add a test for WMA cover art.
  FATE: add a test for apetag cover art
  ...

Conflicts:
.gitignore
configure
ffplay.c
libavcodec/Makefile
libavcodec/error_resilience.c
libavcodec/mpegvideo.c
libavcodec/ratecontrol.c
libavdevice/avdevice.h
libavfilter/Makefile
libavfilter/filtfmts.c
libavfilter/version.h
libavformat/mov.c
libavformat/version.h
libavutil/Makefile
libavutil/avutil.h
libavutil/version.h
libswscale/swscale.h
libswscale/x86/swscale_mmx.c
tests/fate/libavutil.mak
tests/lavfi-regression.sh
tools/graph2dot.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodpx: sanitize aspect ratio.
Nicolas George [Mon, 18 Jun 2012 09:39:26 +0000 (11:39 +0200)]
dpx: sanitize aspect ratio.

Fixes some samples where the ratio is declared as -1/-1.

7 years agolavfi: reclassify showfiltfmts as a TESTPROG
Mans Rullgard [Wed, 4 Jul 2012 15:51:10 +0000 (16:51 +0100)]
lavfi: reclassify showfiltfmts as a TESTPROG

This tool uses lavfi internal symbols not accessible in shared
libraries.  TESTPROGS are linked statically to allow them use of
library internals not normally exported.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agograph2dot: fix printf format specifier
Diego Biurrun [Wed, 4 Jul 2012 14:55:13 +0000 (16:55 +0200)]
graph2dot: fix printf format specifier

tools/graph2dot.c:85: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int’

7 years agoswscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
Martin Storsjö [Wed, 4 Jul 2012 04:11:23 +0000 (21:11 -0700)]
swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agovp8: loopfilter >=sse2 functions need aligned stack on x86-32.
Martin Storsjö [Wed, 4 Jul 2012 04:11:36 +0000 (21:11 -0700)]
vp8: loopfilter >=sse2 functions need aligned stack on x86-32.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoamr: remove shift out of the AMR_BIT() macro.
Ronald S. Bultje [Wed, 4 Jul 2012 03:36:44 +0000 (20:36 -0700)]
amr: remove shift out of the AMR_BIT() macro.

MSVC doesn't like the offsetof(..) >> 1 construct, it interprets it as
a non-literal, thus causing use of this in static tables to fail
compilation.

7 years agodsputilenc: group yasm and inline asm function pointer assignment.
Ronald S. Bultje [Wed, 4 Jul 2012 04:00:05 +0000 (21:00 -0700)]
dsputilenc: group yasm and inline asm function pointer assignment.

7 years agomov: use forward declaration of a function instead of a table.
Ronald S. Bultje [Wed, 4 Jul 2012 03:49:49 +0000 (20:49 -0700)]
mov: use forward declaration of a function instead of a table.

MSVC gives a compile error on the tentative definition of
mov_default_parse_table[].

7 years agoffmpeg: rework checks for the -t option.
Nicolas George [Tue, 3 Jul 2012 18:34:27 +0000 (20:34 +0200)]
ffmpeg: rework checks for the -t option.

This commit is based on libav's implementation and
makes sure to compare output timestamps together.
It also reduces the differences with avconv.

The changes to the test reference files are caused
by an additional packet at the end, the timestamp
of the frame encoded by this packet is always
strictly below the limit stated by the -t option.

7 years agoerror: define AVERROR_EXTERNAL.
Nicolas George [Wed, 4 Jul 2012 10:50:55 +0000 (12:50 +0200)]
error: define AVERROR_EXTERNAL.

This code is intended for errors in external libraries
when no corresponding error code can be found.
AVERROR_UNKNOWN is too vague for that and looks like AVERROR_BUG.

7 years agoerror: define AVERROR_BUFFER_TOO_SMALL.
Nicolas George [Wed, 4 Jul 2012 10:42:48 +0000 (12:42 +0200)]
error: define AVERROR_BUFFER_TOO_SMALL.

Some API require a buffer and return a specific error
if it is too small. This error code helps to map codes.

7 years agoClarify Doxygen comment for FF_API_* #defines.
Diego Biurrun [Tue, 3 Jul 2012 20:42:42 +0000 (22:42 +0200)]
Clarify Doxygen comment for FF_API_* #defines.

7 years agoconfigure: simplify get_version()
Diego Biurrun [Mon, 2 Jul 2012 21:04:09 +0000 (23:04 +0200)]
configure: simplify get_version()

All libs have version headers now, which allows hardcoding the path.

7 years agoCreate version.h headers for libraries that lack them
Diego Biurrun [Sun, 1 Jul 2012 09:51:30 +0000 (11:51 +0200)]
Create version.h headers for libraries that lack them

7 years agogitignore: Use full path instead of relative path to specify patterns
Diego Biurrun [Mon, 2 Jul 2012 20:49:42 +0000 (22:49 +0200)]
gitignore: Use full path instead of relative path to specify patterns

This avoids confusion from patterns meant to only match at the top
level matching files in subdirectories.

7 years agompegvideo: remove VLAs
Ronald S. Bultje [Sun, 24 Jun 2012 18:19:24 +0000 (21:19 +0300)]
mpegvideo: remove VLAs

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoAdd XTEA encryption support in libavutil
Samuel Pitoiset [Tue, 3 Jul 2012 13:53:16 +0000 (15:53 +0200)]
Add XTEA encryption support in libavutil

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoAdd Blowfish encryption support in libavutil
Samuel Pitoiset [Tue, 3 Jul 2012 13:45:27 +0000 (15:45 +0200)]
Add Blowfish encryption support in libavutil

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoeval: Add the isinf() function and tests for it
Martin Storsjö [Sun, 1 Jul 2012 13:11:23 +0000 (16:11 +0300)]
eval: Add the isinf() function and tests for it

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoflacdec: move lpc filter to flacdsp
Mans Rullgard [Mon, 2 Jul 2012 12:51:04 +0000 (13:51 +0100)]
flacdec: move lpc filter to flacdsp

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoflacdec: split off channel decorrelation as flacdsp
Mans Rullgard [Sun, 17 Jun 2012 14:10:40 +0000 (15:10 +0100)]
flacdec: split off channel decorrelation as flacdsp

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoavplay: Add an option for not limiting the input buffer size
Martin Storsjö [Tue, 3 Jul 2012 19:57:19 +0000 (22:57 +0300)]
avplay: Add an option for not limiting the input buffer size

For reading from normal files on disk, the queue limits for
demuxed data work fine, but for reading data from realtime
streams, they mean we're not reading from the input stream
at all once the queue limit has been reached. For TCP streams,
this means that writing to the socket from the peer side blocks
(potentially leading to the peer dropping data), and for UDP
streams it means that our kernel might drop data.

For some protocols/servers, the server initially sends a
large burst with data to fill client side buffers, but once
filled, we should keep reading to avoid dropping data.

For all realtime streams, it IMO makes sense to just buffer
as much as we get (rather in buffers in avplay.c than in
OS level buffers). With this option set, the input thread
should always be blocking waiting for more input data,
never sleeping waiting for the decoder to consume data.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoLet the ffmpeg executable select the abuffersink filter.
Carl Eugen Hoyos [Wed, 4 Jul 2012 06:46:28 +0000 (08:46 +0200)]
Let the ffmpeg executable select the abuffersink filter.

7 years agoFATE: add a test for WMA cover art.
Anton Khirnov [Fri, 22 Jun 2012 17:02:06 +0000 (19:02 +0200)]
FATE: add a test for WMA cover art.

7 years agoFATE: add a test for apetag cover art
Anton Khirnov [Fri, 22 Jun 2012 11:16:18 +0000 (13:16 +0200)]
FATE: add a test for apetag cover art

7 years agoFATE: add a test for itunes cover art.
Anton Khirnov [Fri, 22 Jun 2012 05:24:45 +0000 (07:24 +0200)]
FATE: add a test for itunes cover art.

7 years agoflacdec: factor out code setting avctx->sample_fmt
Mans Rullgard [Mon, 2 Jul 2012 23:28:32 +0000 (00:28 +0100)]
flacdec: factor out code setting avctx->sample_fmt

7 years agoflac: make FLAC_CHMODE_* constants consecutive
Mans Rullgard [Sun, 17 Jun 2012 10:45:10 +0000 (11:45 +0100)]
flac: make FLAC_CHMODE_* constants consecutive

7 years agoflacdec: allocate sample buffers with av_malloc
Mans Rullgard [Mon, 2 Jul 2012 22:16:30 +0000 (23:16 +0100)]
flacdec: allocate sample buffers with av_malloc

The buffers are only allocated once, although it can happen from
any of a few different places, so there is no need to use realloc.
Using av_malloc() ensures they are aligned suitably for SIMD
optimisations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoflacdec: remove curr_bps from FLACContext
Mans Rullgard [Mon, 2 Jul 2012 00:43:12 +0000 (01:43 +0100)]
flacdec: remove curr_bps from FLACContext

This value does not need to be persistent across calls.

7 years agoffmpeg: Add sanity check on frame duplication
Michael Niedermayer [Wed, 4 Jul 2012 01:48:36 +0000 (03:48 +0200)]
ffmpeg: Add sanity check on frame duplication

This prevents long loops and OOM in case of damaged timestamps in some
cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoriff: add "YUV8" FourCC
Piotr Bandurski [Wed, 4 Jul 2012 00:05:22 +0000 (02:05 +0200)]
riff: add "YUV8" FourCC

sample:

http://samples.mplayerhq.hu/V-codecs/yuv8/MAILTEST.AVI

Reviewed-by: compn <tempn@twmi.rr.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: add flac encode/decode tests with various options
Mans Rullgard [Mon, 2 Jul 2012 15:07:42 +0000 (16:07 +0100)]
fate: add flac encode/decode tests with various options

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoflacenc: add option for forcing stereo decorrelation mode
Mans Rullgard [Mon, 2 Jul 2012 13:52:05 +0000 (14:52 +0100)]
flacenc: add option for forcing stereo decorrelation mode

This is mainly useful for testing.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agodoc/muxers/segment: apply minor documentation updates and adjustements
Stefano Sabatini [Sat, 14 Jan 2012 10:25:45 +0000 (11:25 +0100)]
doc/muxers/segment: apply minor documentation updates and adjustements

Update documentation to match code behavior after previous changes, also
reword the examples section.

7 years agosnow: move init code that depends on picture paramaters to after these parameters...
Michael Niedermayer [Tue, 3 Jul 2012 22:55:00 +0000 (00:55 +0200)]
snow: move init code that depends on picture paramaters to after these parameters are known.

This should fix debug 2048 amongth other things

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovideo_get_buffer: return ENOMEM instead of -1 on malloc failure
Michael Niedermayer [Tue, 3 Jul 2012 22:47:18 +0000 (00:47 +0200)]
video_get_buffer: return ENOMEM instead of -1 on malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc/utils: print error message on get_buffer related errors
Michael Niedermayer [Tue, 3 Jul 2012 22:46:36 +0000 (00:46 +0200)]
lavc/utils: print error message on get_buffer related errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomdutils: print error message on error get_buffer related errors
Michael Niedermayer [Tue, 3 Jul 2012 22:45:37 +0000 (00:45 +0200)]
mdutils: print error message on error get_buffer related errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 3 Jul 2012 22:32:31 +0000 (00:32 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  cosmetics: Consistently use C-style comments with multiple inclusion guards
  anm: fix a few Doxygen comments
  misc typo and wording fixes
  attributes: add av_noreturn
  attributes: drop pointless define guards
  configure: do not disable av_always_inline with --enable-small
  flvdec: initial stream switch support
  avplay: fix write on freed memory for rawvideo
  snow: remove a VLA used for edge emulation
  x86: lavfi: fix gradfun/yadif build with mmx/sse disabled
  snow: remove the runs[] VLA.
  snow: Check mallocs at init
  flacdec: remove redundant setting of avctx->sample_fmt

Conflicts:
ffplay.c
libavcodec/h264.c
libavcodec/snow.c
libavcodec/snow.h
libavcodec/snowdec.c
libavcodec/snowenc.c
libavformat/flvdec.c
libavutil/attributes.h
tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf/segment: rename SegmentContext.pb to list_pb
Stefano Sabatini [Tue, 17 Jan 2012 19:04:14 +0000 (20:04 +0100)]
lavf/segment: rename SegmentContext.pb to list_pb

The new name is more auto-explicative, as the pb is used for the segment
list file.

7 years agolavf/segment: add error log in case of invalid filename template
Stefano Sabatini [Tue, 17 Jan 2012 18:50:12 +0000 (19:50 +0100)]
lavf/segment: add error log in case of invalid filename template

Better rather than silently exit.

7 years agolavf/segment: fix logic for segmenting audio-only inputs
Stefano Sabatini [Sat, 14 Jan 2012 01:40:09 +0000 (02:40 +0100)]
lavf/segment: fix logic for segmenting audio-only inputs

Also add a comment for clarifying the logic.

Fix trac ticket #1290.

7 years agolavf/segment: add more information in log message in seg_write_packet()
Stefano Sabatini [Mon, 16 Jan 2012 23:15:48 +0000 (00:15 +0100)]
lavf/segment: add more information in log message in seg_write_packet()

7 years agodoc: add documentation regarding MIPS optimizations
Nedeljko Babic [Tue, 26 Jun 2012 11:13:21 +0000 (13:13 +0200)]
doc: add documentation regarding MIPS optimizations

Add doc/mips.txt document with short explanation regarding targeted
platform for MIPS optimizations and regarding MIPS copyright notice.

Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
7 years agolavf/segment: remove unused offset variable
Stefano Sabatini [Mon, 16 Jan 2012 16:58:50 +0000 (17:58 +0100)]
lavf/segment: remove unused offset variable

7 years agolavf/segment: apply misc fixes to the private options internal documentation
Stefano Sabatini [Sat, 14 Jan 2012 10:00:16 +0000 (11:00 +0100)]
lavf/segment: apply misc fixes to the private options internal documentation

Option help message tell what the option *does*, not what the set field
represents.

7 years agolavf/segment: slightly simplify fail logic in seg_write_packet()
Stefano Sabatini [Fri, 13 Jan 2012 23:19:59 +0000 (00:19 +0100)]
lavf/segment: slightly simplify fail logic in seg_write_packet()

7 years agolavf/segment: move list filename printing logic from segment_end() to segment_start()
Stefano Sabatini [Fri, 13 Jan 2012 23:16:55 +0000 (00:16 +0100)]
lavf/segment: move list filename printing logic from segment_end() to segment_start()

Allow to deal with the list file printing only in a single point, thus
simplifying logic, and allow a bit of factorization (no special case
needed when printing the first file name of the list).

7 years agoismindex: Verify that all bitrate variants match
Martin Storsjö [Tue, 3 Jul 2012 11:58:52 +0000 (14:58 +0300)]
ismindex: Verify that all bitrate variants match

In Smooth Streaming, the fragments are addressed by time, and
the manifest only stores one list of time offests for all streams,
so all streams need to have identical fragment offsets. Warn if
this isn't the case, so that the user can fix the files instead of
getting failures at runtime when the fragments can't be found.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoismindex: Properly report errors reading the MFRA atom
Martin Storsjö [Tue, 3 Jul 2012 11:18:58 +0000 (14:18 +0300)]
ismindex: Properly report errors reading the MFRA atom

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoSuggest aresample filter if it was not compiled but requested.
Carl Eugen Hoyos [Tue, 3 Jul 2012 19:35:20 +0000 (21:35 +0200)]
Suggest aresample filter if it was not compiled but requested.

7 years agoavcodec_align_dimensions2: support 12 & 14 bit planar colorspaces
Michael Niedermayer [Tue, 3 Jul 2012 02:10:52 +0000 (04:10 +0200)]
avcodec_align_dimensions2: support 12 & 14 bit planar colorspaces

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimgconvert: add planar RGB formats to pix_fmt_info
Michael Niedermayer [Tue, 3 Jul 2012 17:00:01 +0000 (19:00 +0200)]
imgconvert: add planar RGB formats to pix_fmt_info

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimgconvert: add yuv 9,10,12,14 bit planar YUV formats to pix_fmt_info
Michael Niedermayer [Tue, 3 Jul 2012 16:57:02 +0000 (18:57 +0200)]
imgconvert: add yuv 9,10,12,14 bit planar YUV formats to pix_fmt_info

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibavutil: add 12 and 14 bit planar colorspaces
Michael Niedermayer [Tue, 3 Jul 2012 02:09:28 +0000 (04:09 +0200)]
libavutil: add 12 and 14 bit planar colorspaces

Reviewed-by: Jean First <jeanfirst@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocosmetics: Consistently use C-style comments with multiple inclusion guards
Diego Biurrun [Mon, 2 Jul 2012 08:17:07 +0000 (10:17 +0200)]
cosmetics: Consistently use C-style comments with multiple inclusion guards

7 years agoanm: fix a few Doxygen comments
Diego Biurrun [Mon, 2 Jul 2012 18:40:26 +0000 (20:40 +0200)]
anm: fix a few Doxygen comments

7 years agomisc typo and wording fixes
Diego Biurrun [Wed, 13 Jun 2012 09:41:12 +0000 (11:41 +0200)]
misc typo and wording fixes

7 years agoattributes: add av_noreturn
Reinhard Tartler [Sun, 1 Jul 2012 17:38:40 +0000 (19:38 +0200)]
attributes: add av_noreturn

Also use it in the declaration of the various exit_program
implementations in avtools.

inspired by a clang-scan report.

7 years agoattributes: drop pointless define guards
Reinhard Tartler [Sun, 1 Jul 2012 18:36:03 +0000 (20:36 +0200)]
attributes: drop pointless define guards

the av_-prefixed attributes must not be defined outside of this file

7 years agoconfigure: do not disable av_always_inline with --enable-small
Mans Rullgard [Sun, 1 Jul 2012 19:21:10 +0000 (20:21 +0100)]
configure: do not disable av_always_inline with --enable-small

Currently, --enable-small turns av_always_inline into plain inline,
which is more or less ignored by the compiler.  While the intent of
this is probably to reduce code size by avoiding some inlining, it
has more far-reaching effects.

We use av_always_inline in two situations:

1. The body of a function is smaller than the call overhead.
   Instances of these are abundant in libavutil, the bswap.h
   functions being good examples.

2. The function is a template relying on constant propagation
   through inlined calls for sane code generation.  These are
   often found in motion compensation code.

Both of these types of functions should be inlined even if targeting
small code size.

Although GCC has heuristics for detecting the first of these types,
it is not always reliable, especially when the function uses inline
assembler, which is often the reason for having those functions in
the first place, so making it explicit is generally a good idea.

The size increase from inlining template-type functions is usually
much smaller than it seems due to different branches being mutually
exclusive between the different invocations.  The dead branches can,
however, only be removed after inlining and constant propagation have
been performed, which means the initial cost estimate for inlining
these is much higher than is actually the case, resulting in GCC
often making bad choices if left to its own devices.

Furthermore, the GCC inliner limits how much it allows a function to
grow due to automatic inlining of calls, and this appears to not take
call overhead into account.  When nested inlining is used, the limit
may be hit before the innermost level is reached.  In some cases, this
has prevented inlining of type 1 functions as defined above, resulting
in significant performance loss.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agoflvdec: initial stream switch support
Luca Barbato [Sun, 1 Jul 2012 21:01:00 +0000 (23:01 +0200)]
flvdec: initial stream switch support

Codec change midstream gets mapped to a separate stream.

7 years agoavplay: fix write on freed memory for rawvideo
Luca Barbato [Thu, 28 Jun 2012 18:55:04 +0000 (20:55 +0200)]
avplay: fix write on freed memory for rawvideo

Do not assume avpacket and the decoded frames are independent.

To be absolutely sure and not sprinkle av_free_packet around the code
the call had been placed before getting the frame and on the error path.

7 years agosnow: remove a VLA used for edge emulation
Ronald S. Bultje [Mon, 2 Jul 2012 07:39:54 +0000 (10:39 +0300)]
snow: remove a VLA used for edge emulation

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agox86: lavfi: fix gradfun/yadif build with mmx/sse disabled
Mans Rullgard [Mon, 2 Jul 2012 22:04:04 +0000 (23:04 +0100)]
x86: lavfi: fix gradfun/yadif build with mmx/sse disabled

These functions are defined conditionally so any uses need to have
preprocessor guards.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agojvdec: check if there is enough data
Paul B Mahol [Tue, 3 Jul 2012 11:56:55 +0000 (11:56 +0000)]
jvdec: check if there is enough data

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agojvdec: remove redundant check
Paul B Mahol [Tue, 3 Jul 2012 11:38:19 +0000 (11:38 +0000)]
jvdec: remove redundant check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agojvdec: remove buf_size
Paul B Mahol [Tue, 3 Jul 2012 11:34:33 +0000 (11:34 +0000)]
jvdec: remove buf_size

It is same as avpkt->size.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agojvdec: stop reading partial palette
Paul B Mahol [Tue, 3 Jul 2012 11:16:56 +0000 (11:16 +0000)]
jvdec: stop reading partial palette

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agotools: add bisect script
Michael Niedermayer [Mon, 2 Jul 2012 14:04:30 +0000 (16:04 +0200)]
tools: add bisect script

This script works like "git bisect" except that you can
specify with "bisect need ffmpeg|ffplay|ffserver|ffprobe" which tool(s)
are needed for testing a checkout

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoyadif/x86: add prototypes for functions, make code valid C again.
Michael Niedermayer [Tue, 3 Jul 2012 10:43:06 +0000 (12:43 +0200)]
yadif/x86: add prototypes for functions, make code valid C again.

Broken by: libav (a87b17f3283aada762820f1b797eeb7a2dff6c61)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojvdec: check that the video_size fits in the packet.
Michael Niedermayer [Tue, 3 Jul 2012 10:32:26 +0000 (12:32 +0200)]
jvdec: check that the video_size fits in the packet.

Prevents use of out of array data and fate failure.

Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agojvdec: fix memleak of jv->frames
Paul B Mahol [Tue, 3 Jul 2012 09:51:44 +0000 (09:51 +0000)]
jvdec: fix memleak of jv->frames

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agosnow: remove the runs[] VLA.
Ronald S. Bultje [Sat, 30 Jun 2012 17:34:39 +0000 (10:34 -0700)]
snow: remove the runs[] VLA.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agosnow: Check mallocs at init
Martin Storsjö [Mon, 2 Jul 2012 07:39:25 +0000 (10:39 +0300)]
snow: Check mallocs at init

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agojvdemux: correct size for truncated packets
Michael Niedermayer [Tue, 3 Jul 2012 03:24:26 +0000 (05:24 +0200)]
jvdemux: correct size for truncated packets

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: add test for Bitmap Brothers JV demuxer
Paul B Mahol [Tue, 3 Jul 2012 00:52:06 +0000 (00:52 +0000)]
fate: add test for Bitmap Brothers JV demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agofate: add test for Bitmap Brothers JV video
Paul B Mahol [Tue, 3 Jul 2012 00:44:55 +0000 (00:44 +0000)]
fate: add test for Bitmap Brothers JV video

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoh264pred: assert that depth is supported
Michael Niedermayer [Tue, 3 Jul 2012 01:21:24 +0000 (03:21 +0200)]
h264pred: assert that depth is supported

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264dsp: assert that depth is supported
Michael Niedermayer [Tue, 3 Jul 2012 01:20:51 +0000 (03:20 +0200)]
h264dsp: assert that depth is supported

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodsputil: assert that depth is supported
Michael Niedermayer [Tue, 3 Jul 2012 01:19:55 +0000 (03:19 +0200)]
dsputil: assert that depth is supported

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavfi: remove vsrc_buffer.h API
Stefano Sabatini [Mon, 25 Jun 2012 22:41:33 +0000 (00:41 +0200)]
lavfi: remove vsrc_buffer.h API

The vsrc_buffer.h is not installed since commit 0b3b95813576, so there is
no point into keeping it around.

The buffersrc.h API, which is more powerful, should be used instead.

7 years agolavc/rawdec: add assertion check in raw_decode()
Stefano Sabatini [Mon, 25 Jun 2012 16:56:46 +0000 (18:56 +0200)]
lavc/rawdec: add assertion check in raw_decode()

Check on an implicit assumption done on the number of coded bits for
paletted rawvideo with coded bits == 2.

7 years agolavc/rawdec: prefer constant AVPALETTE_SIZE over 256*4
Stefano Sabatini [Mon, 25 Jun 2012 15:59:01 +0000 (17:59 +0200)]
lavc/rawdec: prefer constant AVPALETTE_SIZE over 256*4

Improve readability.

7 years agoh264: sps: handle more profiles
Michael Niedermayer [Mon, 2 Jul 2012 22:40:26 +0000 (00:40 +0200)]
h264: sps: handle more profiles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: add support for constraint_set4_flag / constraint_set5_flag
Michael Niedermayer [Mon, 2 Jul 2012 22:36:08 +0000 (00:36 +0200)]
h264: add support for constraint_set4_flag / constraint_set5_flag

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agox86/gradfun: fix compilation failure on open solaris
Michael Niedermayer [Mon, 2 Jul 2012 21:49:54 +0000 (23:49 +0200)]
x86/gradfun: fix compilation failure on open solaris

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "alsdec: remove dead assignments"
Michael Niedermayer [Mon, 2 Jul 2012 21:43:06 +0000 (23:43 +0200)]
Revert "alsdec: remove dead assignments"

This reverts commit 4ca6d206d1b5beea42c4290d2ee801aaf5cd31f0.

The assignment is not dead, this should fix fate failures on BSD

7 years agohas_decode_delay_been_guessed: tighten up the heuristic.
Michael Niedermayer [Mon, 2 Jul 2012 21:23:33 +0000 (23:23 +0200)]
has_decode_delay_been_guessed: tighten up the heuristic.

This adds the minimum delay needed with the current decoder to
recognize the reorder buffer size for the reference bitstreams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agohas_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available
Michael Niedermayer [Mon, 2 Jul 2012 21:18:32 +0000 (23:18 +0200)]
has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>