Martin Storsjö
c7b610aa0b
avopt: Explicitly store float/double option defaults in .dbl
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:51 +03:00
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5
avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Martin Storsjö
235f74db59
Rename missed cases of FF_OPT_TYPE_* to AV_OPT_TYPE_*
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-31 23:27:21 +02:00
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
2012-08-31 01:53:25 +02:00
Diego Biurrun
cdaec0b240
avfilter: x86: Use more precise compile template names
2012-08-30 18:51:51 +02:00
Martin Storsjö
b441a4517b
vf_hqdn3d: Remove a duplicate inline declaration
...
Compilation seems to fail on GCC 3.4 due to this duplicate
declaration.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-27 16:40:59 +03:00
Martin Storsjö
2bd67175c7
vf_hqdn3d: Don't declare the loop variable within the for loop
...
This C99 feature is generally not used in the libav codebase,
since it breaks building with some fringe compilers (GCC 2.95,
MSVC).
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-27 15:29:39 +03:00
Loren Merritt
7a1944b907
vf_hqdn3d: x86 asm
...
13% faster on penryn, 16% on sandybridge, 15% on bulldozer
Not simd; a compiler should have generated this, but gcc didn't.
2012-08-26 10:49:14 +00:00
Loren Merritt
566858a770
vf_hqdn3d: support 16bit colordepth
2012-08-26 10:49:14 +00:00
Anton Khirnov
4d7adec8bd
AVOptions: store defaults for INT64 options in int64 union member.
...
Double does not have enough precision to represent all int64 numbers
exactly.
2012-08-24 11:25:06 +02:00
Martin Storsjö
7ebe3962f3
Add missing includes for code relying on external libraries
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 16:47:02 +03:00
Martin Storsjö
33e112847d
Add more missing includes after removing the implicit common.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 10:49:54 +03:00
Martin Storsjö
70766c2182
Add some more missing includes after removing the implicit common.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 23:48:48 +03:00
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Mans Rullgard
480178a295
x86: yadif: fix asm with suncc
...
Under some circumstances, suncc will use a single register for the
address of all memory operands, inserting lea instructions loading
the correct address prior to each memory operand being used in the
code. In the yadif code, the branch in the asm block bypasses such
an lea instruction, causing an incorrect address to be used in the
following load.
This patch replaces the tmpX arrays with a single array and uses a
register operand to hold its address. Although this prevents using
offsets from the stack pointer to access these locations, the code
still builds as 32-bit PIC even with old compilers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 14:51:52 +01:00
Diego Biurrun
804d7a1aa6
doxygen: Fix function parameter names to match the code
2012-08-09 20:05:55 +02:00
Mans Rullgard
c318626ce2
x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
...
This puts x86-specific things in the x86/ subdirectory where they
belong.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-09 00:58:20 +01:00
Reinhard Tartler
800750417f
lavfi: properly signal out-of-memory error in ff_filter_samples
...
Found with a clang-scan report on http://fate.libav.org/csa/
2012-08-05 10:26:49 +02:00
Derek Buitenhuis
8b8750e061
cosmetics: Fix a few switched periods and linebreaks
...
Based on a patch by Piotr Bandurski.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-08-04 16:39:27 -04:00
Diego Biurrun
239fdf1b4a
x86: build: replace mmx2 by mmxext
...
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
2012-08-03 22:51:05 +02:00
Diego Biurrun
d1505db067
x86: yadif: Mark mmxext optimizations as such
...
The yadif mmx optimizations contain the pmaxsw and pmaxub mmxext
instructions, causing sigills on CPUs that do not support mmxext.
2012-07-31 13:54:06 +02:00
Justin Ruggles
be51e589cd
af_asyncts: avoid overflow in out_size with large delta values
2012-07-29 14:31:54 -04:00
Justin Ruggles
70d71b5801
af_asyncts: add first_pts option
...
This allows for padding/trimming at the start of stream. By default, no
assumption is made about the first frame's expected pts, so no padding or
trimming is done.
2012-07-29 14:31:54 -04:00
Loren Merritt
1ad715dbf3
vf_hqdn3d: support 9 and 10bit colordepth
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:20:06 -07:00
Loren Merritt
0f583e6cc5
vf_hqdn3d: reduce intermediate precision
...
11% faster on penryn, 7% on sandybridge, 5% on bulldozer
Negligible change to output.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:19:01 -07:00
Loren Merritt
85e228c71d
vf_hqdn3d: simplify and optimize
...
14% faster on penryn, 2% on sandybridge, 9% on bulldozer
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:15:14 -07:00
Loren Merritt
fb44e7401f
factor identical ff_inplace_start_frame out of two filters
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:15:14 -07:00
Loren Merritt
60b9785530
vf_hqdn3d: cosmetics
...
Change code style to match the rest of libav.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:12:22 -07:00
Anton Khirnov
b3fa478823
lavfi: bump minor to mark stabilizing the ABI.
2012-07-28 14:33:48 +02:00
Justin Ruggles
743f07062a
lavfi: better channel layout negotiation
...
Allow substitution of channel pairs in the input for nearby channel pairs in
the output in order to get a closer match. Also weigh LFE channel mismatch
differently to favor matching the same layout without LFE over one less
channel with LFE.
2012-07-27 14:15:33 -04:00
Anton Khirnov
b5c8aa745e
vf_yadif: unset cur_buf on the input link.
...
The buffer is stored internally, so this prevents it from being unreffed
automatically.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-26 00:01:04 +02:00
Anton Khirnov
f431315a86
vf_overlay: ensure the overlay frame does not get leaked.
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-26 00:01:04 +02:00
Michael Niedermayer
08fc1ad151
vf_overlay: prevent premature freeing of cur_buf
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-26 00:01:04 +02:00
Diego Biurrun
49c45a2624
avfilter: Fix printf format string conversion specifier
...
libavfilter/avfilter.c:224:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat]
2012-07-25 09:24:25 +02:00
Ronald S. Bultje
3124886554
lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
...
This allows compiling this code using compilers that do not understand
gcc-style inline assembly.
2012-07-22 19:44:06 -07:00
Anton Khirnov
a8a2271fe0
buffersrc: check ff_get_audio_buffer() for errors.
2012-07-22 09:14:05 +02:00
Anton Khirnov
8f3a3ce730
lavfi: check all ff_get_video_buffer() calls for errors.
2012-07-22 09:14:05 +02:00
Anton Khirnov
1dc4205018
lavfi: check all avfilter_ref_buffer() calls for errors.
2012-07-22 09:14:05 +02:00
Anton Khirnov
80e4ed279b
vf_select: avoid an unnecessary avfilter_ref_buffer().
2012-07-22 09:14:05 +02:00
Anton Khirnov
785fa50f0b
buffersrc: avoid creating unnecessary buffer reference
2012-07-22 09:14:05 +02:00
Anton Khirnov
02ac7311c8
lavfi: use avfilter_unref_bufferp() where appropriate.
2012-07-22 09:14:05 +02:00
Anton Khirnov
043800a968
vf_fps: add more error checks.
2012-07-22 09:14:05 +02:00
Anton Khirnov
d515e9c225
vf_fps: fix a memleak on malloc failure.
2012-07-22 09:14:05 +02:00
Anton Khirnov
3825b52688
lavfi: check all ff_start_frame/draw_slice/end_frame calls for errors
2012-07-22 09:14:05 +02:00
Anton Khirnov
d4f89906e3
lavfi: add error handling to end_frame().
2012-07-22 09:14:05 +02:00
Anton Khirnov
e9b992d035
lavfi: add error handling to draw_slice().
2012-07-22 09:14:05 +02:00
Anton Khirnov
ebc8d97481
lavfi: add error handling to start_frame().
2012-07-22 09:14:04 +02:00
Ronald S. Bultje
731fa116b4
yadif: use emms_c() instead of inline assembly for emms invocations.
2012-07-21 17:16:49 -07:00
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
2012-07-21 16:31:15 -07:00
Anton Khirnov
4c9080a7ef
lavfi: unref AVFilterLink.out_buf in ff_end_frame().
...
This reduces code duplication and prevents stale pointers from remaining
on the link.
2012-07-20 21:12:49 +02:00
Anton Khirnov
07bad27810
lavfi: unref AVFilterLink.cur_buf in ff_end_frame().
...
This reduces code duplication and prevents stale pointers from remaining
on the link.
2012-07-20 21:10:42 +02:00
Anton Khirnov
533fd5b5b4
vsrc_testsrc: avoid an unnecessary avfilter_ref_buffer().
2012-07-20 21:09:57 +02:00
Anton Khirnov
5b50ae94e6
vf_slicify: clear AVFilterLink.cur_buf in start_frame().
...
The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.
2012-07-20 21:09:48 +02:00
Anton Khirnov
0393af4f0b
vf_settb: simplify start_frame().
...
Avoid pointless filter ref/unref. Just use the reference passed to
start_frame().
2012-07-20 21:08:50 +02:00
Anton Khirnov
9203fa0b32
vf_fieldorder: don't give up its own reference to the output buffer.
2012-07-20 21:08:26 +02:00
Anton Khirnov
f493c644cd
vf_pad: don't give up its own reference to the output buffer.
2012-07-20 21:08:13 +02:00
Anton Khirnov
ad8b6326aa
vf_overlay: don't access a buffer reference that's been given away.
2012-07-20 21:07:51 +02:00
Anton Khirnov
7155763b78
vf_drawtext: don't give up its own reference to the input buffer.
...
Directly forwarding the input buffer to the next filter means that
drawtext no longer owns any references to it and thus shouldn't refer to
it in any way.
2012-07-20 21:07:32 +02:00
Anton Khirnov
d19499c796
vf_gradfun: don't store two pointers to one AVFilterBufferRef.
2012-07-20 21:07:11 +02:00
Anton Khirnov
0fe010a36f
vf_delogo: don't store two pointers to one AVFilterBufferRef.
2012-07-20 21:06:49 +02:00
Anton Khirnov
51a8049be8
vf_aspect: clear AVFilterLink.cur_buf in start_frame().
...
The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.
2012-07-20 21:06:40 +02:00
Robert Nagy
b70d89a033
lavfi: add avfilter_unref_bufferp()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-07-20 21:06:18 +02:00
Anton Khirnov
cd99146253
lavfi: add error handling to filter_samples().
2012-07-09 08:25:19 +02:00
Anton Khirnov
083d0f6be8
asplit: don't leak the input buffer.
2012-07-09 08:22:11 +02:00
Anton Khirnov
1ffb645662
af_resample: fix request_frame() behavior.
...
Make sure that an output frame has really been produced before returning
0.
2012-07-09 08:21:37 +02:00
Anton Khirnov
6f834293d3
af_asyncts: fix request_frame() behavior.
...
Make sure that an output frame has really been produced before returning
0.
2012-07-09 08:21:15 +02:00
Justin Ruggles
8ca08066fc
lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format
...
Also make this the default value.
2012-07-08 15:22:11 -04: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
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
2047e40e6e
Clarify Doxygen comment for FF_API_* #defines.
2012-07-04 15:10:10 +02:00
Diego Biurrun
1a068bfefd
cosmetics: Consistently use C-style comments with multiple inclusion guards
2012-07-03 17:35:12 +02:00
Diego Biurrun
09f211987c
misc typo and wording fixes
2012-07-03 17:35:11 +02:00
Mans Rullgard
fb93e61e2b
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>
2012-07-03 14:14:13 +01:00
Mans Rullgard
a87b17f328
vf_yadif: move x86 init code to x86/yadif.c
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-02 01:16:37 +01:00
Mans Rullgard
2f0accf103
vf_gradfun: move x86 init code to x86/gradfun.c
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-02 01:16:37 +01:00
Anton Khirnov
61d158c321
avfiltergraph: shut up uninitialized variable warning.
...
The warning silenced was:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:500:13: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
2012-06-26 19:10:17 +02:00
Anton Khirnov
fd2784c3b5
af_join: initialize a variable to shut up gcc warning.
...
The warning silenced was:
libavfilter/af_join.c: In function ‘join_request_frame’:
libavfilter/af_join.c:451:9: warning: ‘nb_samples’ may be used uninitialized in this function [-Wuninitialized]
2012-06-26 19:09:15 +02:00
Anton Khirnov
422008ac63
amix: fix format specifier for AVFilterLink.sample_rate.
...
It is a plain int now.
2012-06-26 19:08:26 +02:00
Anton Khirnov
1a49a169eb
lavfi: make filters less verbose.
2012-06-26 19:08:13 +02:00
Anton Khirnov
83ba22392d
lavfi: reorder AVFilterLink fields.
...
Move private fields to the private section, remove holes.
2012-06-26 13:25:13 +02:00
Anton Khirnov
f892013ac4
lavfi: reorder AVFilterContext fields.
...
Place related fields together, remove holes.
2012-06-26 13:24:36 +02:00
Anton Khirnov
9618080512
lavfi: reorder AVFilter fields.
...
Place related fields together, remove holes, move private fields to the
end and mark them as private.
2012-06-26 13:23:51 +02:00
Anton Khirnov
f14e685609
lavfi: reorder AVFilterBufferRef fields.
...
Place related fields together, remove holes.
2012-06-26 13:23:50 +02:00
Anton Khirnov
cb81e29138
lavfi: reorder AVFilterBuffer fields.
...
Place related fields together, remove holes.
2012-06-26 13:23:50 +02:00
Anton Khirnov
1961e46c15
lavfi: remove disabled FF_API_FILTERS_PUBLIC cruft
2012-06-26 13:20:19 +02:00
Anton Khirnov
5e88b96f37
lavfi: remove disabled FF_API_DEFAULT_CONFIG_OUTPUT_LINK cruft
2012-06-26 13:18:44 +02:00
Anton Khirnov
205e90249a
lavfi: use proper FF_API guards for different deprecated functions
2012-06-26 13:17:31 +02:00
Anton Khirnov
0b3b958135
lavfi: remove disabled FF_API_VSRC_BUFFER_ADD_FRAME cruft
2012-06-26 13:15:26 +02:00
Anton Khirnov
6c1e065bd4
lavfi: remove disabled FF_API_SAMPLERATE64 cruft
2012-06-26 13:15:14 +02:00
Anton Khirnov
8d900aa4d0
lavfi: remove disabled FF_API_GRAPH_AVCLASS cruft
2012-06-26 13:14:59 +02:00
Anton Khirnov
a5e8c41c28
lavfi: remove 'opaque' parameter from AVFilter.init()
...
It is not used in any filters currently and is inherently evil. If
passing binary data to filters is required in the future, it should be
done with some AVOptions-based system.
2012-06-26 13:13:48 +02:00
Alex Converse
41e637e449
lavfi: Add the af_channelmap audio channel mapping filter.
...
Inspired by MPlayer's af_channels filter and SoX's remix effect.
2012-06-22 13:55:58 -07:00
Anton Khirnov
dc07fb6f7b
lavfi: add join audio filter.
...
It joins multiple input streams into one multi-channel output.
2012-06-22 21:26:18 +02:00
Anton Khirnov
f75be9856a
lavfi: allow audio filters to request a given number of samples.
...
This makes synchronization simpler for filters with multiple inputs.
2012-06-22 21:23:42 +02:00
Anton Khirnov
58b049f2fa
lavfi: support automatically inserting the fifo filter when needed.
...
This breaks libavfilter ABI.
2012-06-22 21:06:01 +02:00
Anton Khirnov
fa06623930
lavfi/audio: eliminate ff_default_filter_samples().
...
It currently does the following:
1) get a zeroed audio buffer
2) copy some properties (but not the data) of the input buffer to it
3) pass this buffer to the output filter
This looks useless and is indeed not used by any filters, therefore
delete it.
Make ff_null_filter_samples() (just pass the buffer to the next filter)
the new default.
2012-06-22 20:58:19 +02:00