Commit Graph

34064 Commits

Author SHA1 Message Date
Ronald S. Bultje
07b287020c x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME). 2012-07-07 13:35:07 -07:00
Anton Khirnov
25b51b2c44 id3v2: add a mimetype for bmp pictures. 2012-07-07 20:34:41 +02:00
Anton Khirnov
b7d3a9a015 flacdec: be less strict when parsing attached pictures.
Only return an error if memory allocation fails or error recognition is
set to explode. Otherwise just print an error message and continue
reading the file.
2012-07-07 20:34:20 +02:00
Anton Khirnov
dba5b06ead flacdec: don't create an attached picture stream until we have all information.
This way we don't end with an invalid stream if parsing the picture
fails.
2012-07-07 20:33:44 +02:00
Ronald S. Bultje
fdaad6354f mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).
Also replace x>>av_log2(sizeof(..)) + 1 by x/sizeof(..). The +1 is
probably meant to emulate av_log2_ceil(sizeof(..)) in cases where ".."
is not a power of two.
2012-07-07 10:09:59 -07:00
Martin Storsjö
f27386cdc7 x86: h264_intrapred: Don't add the 'd' suffix to the SPLATB_REG macro
The SPLATB_REG macro already adds the 'd' suffix internally.

This fixes building on Win64, which has been broken since 878e66902.

This worked for unix, where r2 happened to be rdx in this case, which
with the first suffix rdxd was mapped to eax, and eaxd is defined back
to eax. On win64 however, r2 happened to be R8 in this case, and
R8d mapps to R8D just fine, but there's no mapping for R8Dd to anything.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-06 21:07:23 +03:00
Mans Rullgard
5adc829eb0 configure: add functions for testing code fragments
This simplifies testing arbitrary code fragments within a function
body.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-06 19:22:08 +02:00
Anton Khirnov
b7558ac293 af_amix: avoid spurious EAGAIN.
Input on/off state can change in request_samples(), which can result in
a state where only the first input is active. get_available_samples()
will then return 0, and request_frame() will fail with EAGAIN even
though there is data on the single active input.

Take this into account and check the number of active inputs again after
calling request_samples().
2012-07-06 13:51:58 +02:00
Anton Khirnov
54bf88e65f af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.
0 should only be returned when there was at least one output frame.
2012-07-06 13:51:58 +02:00
Anton Khirnov
428b369804 af_amix: only consider negative return codes as errors. 2012-07-06 13:51:58 +02:00
Anton Khirnov
53ddd43f0c avconv: use only meaningful timestamps in start time check. 2012-07-06 12:59:11 +02:00
Anton Khirnov
b98c8f4f2b avconv: fix the check for -ss as an output option.
start time is already substracted from the frame timestamp, so it needs
to be checked against 0, not start time.
2012-07-06 12:54:52 +02:00
Kostya Shishkov
1f061da529 mss3: add forgotten 'static' qualifier for private table 2012-07-06 11:37:35 +02:00
Mans Rullgard
0a19000da8 lavc: options: add planar names for request_sample_fmt
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-05 21:57:51 +01:00
Mans Rullgard
784514a4a8 flacdec: add planar output support
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-05 21:57:51 +01:00
Martin Storsjö
e43f56b205 flvdec: Treat all nellymoser versions as the same codec
This avoids creating new AVStreams for them when switching between
different variants of them, since we can handle changes between
different sample rates of nellymoser within the same stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 22:07:45 +03:00
Diego Biurrun
bb58c43c69 qdm2: remove broken and disabled dump_context() debug function 2012-07-05 17:37:12 +02:00
Diego Biurrun
878e669029 x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros 2012-07-05 17:37:11 +02:00
Loren Merritt
4d4752366f x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-07-05 17:37:11 +02:00
Loren Merritt
2cd1f5cadc x86inc: modify ALIGN to not generate long nops on i586
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-07-05 17:37:11 +02:00
Diego Biurrun
d20f133ef9 x86: h264_intrapred: port to cpuflag macros 2012-07-05 17:37:10 +02:00
Anton Khirnov
2696789c52 avplay: update input filter pointer when the filtergraph is reset.
Fixes an invalid read on size change.
2012-07-05 13:15:36 +02:00
Reimar Döffinger
4c679750cb avconv: fix parsing of -force_key_frames option.
Currently it always exits with an error when more than
one position is specified.

CC: libav-stable@libav.org
2012-07-05 13:15:36 +02:00
Mans Rullgard
28fff0d974 h264: use templates to avoid excessive inlining
Instead of inlining everything into ff_h264_hl_decode_mb(), use
explicit templating to create versions of the called functions
with constant parameters filled in.  This greatly speeds up
compilation of h264.c and reduces the code size without any
measurable impact on performance.

Compilation time for h264.c on an i7 goes from 30s to 5.5s.
Code size is reduced by 430kB.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-05 11:50:18 +01:00
Samuel Pitoiset
983db9b2b4 xtea: Make the count parameter match the documentation
Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 12:45:18 +03:00
Samuel Pitoiset
e4a7fb3da3 blowfish: Make the count parameter match the documentation
Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 12:41:57 +03:00
Michael Niedermayer
18f2d5cb9c mpegvideo: Don't use ff_mspel_motion() for vc1
Using ff_mspel_motion assumes that s (a MpegEncContext
poiinter) really is a Wmv2Context.

This fixes crashes in error resilience on vc1/wmv3 videos.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 12:41:19 +03:00
Luca Barbato
f6687bf5f8 xtea: invert branch and loop precedence
Should slightly improve performance depending on the compiler used.
2012-07-05 10:42:00 +02:00
Luca Barbato
669bbedfa8 blowfish: invert branch and loop precedence
Should slightly improve performance depending on the compiler used.
2012-07-05 10:40:13 +02:00
Luca Barbato
5b54a90c8b flvdec: optionally trust the metadata
In certain conditions video or audio frames might appear way later in the
stream.
2012-07-05 10:37:34 +02:00
Martin Storsjö
715129cdc4 avconv: Set audio filter time base to the sample rate
If the output frame size is smaller than the input sample rate,
and the input stream time base corresponds exactly to the input
frame size (getting input packet timestamps like 0, 1, 2, 3, 4 etc),
the output timestamps from the filter will be like
0, 1, 2, 3, 4, 4, 5 ..., leadning to non-monotone timestamps later.

A concrete example is input mp3 data having frame sizes of 1152
samples, transcoded to aac with 1024 sample frames.

By setting the audio filter time base to the sample rate, we will
get sensible timestamps for all output packets, regardless of
the ratio between the input and output frame sizes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 09:57:04 +03:00
Martin Storsjö
07eeeb1d4f vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too
This was missed in the the previous commit in 70a1c800.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 09:39:01 +03:00
Mans Rullgard
7c29377b70 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>
2012-07-04 17:48:25 +01:00
Diego Biurrun
fa2d747352 graph2dot: fix printf format specifier
tools/graph2dot.c:85: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int’
2012-07-04 18:12:48 +02:00
Martin Storsjö
557519189f swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-04 08:25:57 -07:00
Martin Storsjö
70a1c8000f vp8: loopfilter >=sse2 functions need aligned stack on x86-32.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-04 08:25:50 -07:00
Ronald S. Bultje
c51838478c 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.
2012-07-04 07:46:53 -07:00
Ronald S. Bultje
723b266d72 dsputilenc: group yasm and inline asm function pointer assignment. 2012-07-04 07:46:27 -07:00
Ronald S. Bultje
1ce1e6360d 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[].
2012-07-04 07:45:30 -07:00
Diego Biurrun
2047e40e6e Clarify Doxygen comment for FF_API_* #defines. 2012-07-04 15:10:10 +02:00
Diego Biurrun
112971af26 configure: simplify get_version()
All libs have version headers now, which allows hardcoding the path.
2012-07-04 15:10:08 +02:00
Diego Biurrun
86ab7b0f2f Create version.h headers for libraries that lack them 2012-07-04 15:10:06 +02:00
Diego Biurrun
40e61b7b07 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.
2012-07-04 15:10:01 +02:00
Ronald S. Bultje
89b81a1c88 mpegvideo: remove VLAs
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-04 15:10:57 +03:00
Samuel Pitoiset
8c14f7a593 Add XTEA encryption support in libavutil
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-04 15:10:57 +03:00
Samuel Pitoiset
bc3dbcc8e5 Add Blowfish encryption support in libavutil
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-04 15:10:57 +03:00
Martin Storsjö
143f1e9203 eval: Add the isinf() function and tests for it
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-04 15:10:56 +03:00
Mans Rullgard
25accf93ad flacdec: move lpc filter to flacdsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-04 12:24:30 +01:00
Mans Rullgard
4a8528349f flacdec: split off channel decorrelation as flacdsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-04 12:24:30 +01:00
Martin Storsjö
296d0da8bd 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>
2012-07-04 11:11:08 +03:00