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
Anton Khirnov
e026c9b390
lavfi/audio: don't set cur_buf in ff_filter_samples().
...
It's redundant, since the input buffer is passed as a parameter to the
filter_samples() callback, and can lead to stale pointers remaining on
the link.
2012-06-21 09:27:05 +02:00
Anton Khirnov
4a97ff2fa7
lavfi/fifo: add audio version of the fifo filter.
2012-06-21 07:38:35 +02:00
Anton Khirnov
27570e211a
fifo: fix parenthesis placement.
2012-06-21 07:38:28 +02:00
Anton Khirnov
394a2a0452
lavfi: rename vf_fifo.c -> fifo.c
...
It will be used for audio too.
2012-06-21 07:38:14 +02:00
Justin Ruggles
ae46fbee1d
af_amix: allow float planar sample format as input
2012-06-18 18:01:14 -04:00
Justin Ruggles
f0ece49e74
af_amix: use AVFloatDSPContext.vector_fmac_scalar()
2012-06-18 18:01:14 -04:00
Janne Grunau
fbc5740566
af_resample: fix format modifier in debug string for FF_API_SAMPLERATE64
2012-06-15 19:10:58 +02:00
Anton Khirnov
9cdf74f904
lavfi/audio: use av_samples_copy() instead of custom code.
...
Fixes a possible invalid write, found by Nicolas George.
2012-06-13 13:58:58 +02:00
Anton Khirnov
24b2f4ed21
avfiltergraph: remove a redundant call to avfilter_get_by_name().
2012-06-13 13:58:03 +02:00
Anton Khirnov
2f296e39a1
lavfi: allow building without swscale.
2012-06-13 13:57:47 +02:00
Anton Khirnov
9baeff9506
lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
...
This is more consistent with naming in the rest of Libav.
2012-06-13 11:13:22 +02:00
Anton Khirnov
9d0bfc5052
lavfi: make AVFilterPad opaque after two major bumps.
...
It will allow adding new fields to it without ABI breaks.
2012-06-13 11:11:33 +02:00
Anton Khirnov
84b9fbe055
lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
...
This will allow making AVFilterPad opaque for the calling apps, since
those are the only two fields that can be useful to the users.
2012-06-13 11:10:17 +02:00
Anton Khirnov
6d58358a3a
lavfi: make avfilter_get_video_buffer() private on next bump.
...
They are only useful inside filters and we don't allow user filters for
now.
2012-06-13 11:09:15 +02:00
Anton Khirnov
d625136877
lavfi: add channelsplit audio filter.
2012-06-12 21:38:59 +02:00
Alex Converse
65a80ee1ec
avfilter: Log an error if avfilter fails to configure a link.
2012-06-12 10:05:31 -07:00
Anton Khirnov
d7d071a673
vf_libopencv: add missing headers.
...
Fix build after b74a1da4
.
2012-06-10 08:02:02 +02:00
Anton Khirnov
803391f719
lavfi: remove request/poll and drawing functions from public API on next bump
...
They are only useful inside filters and we don't allow user filters for
now.
2012-06-05 09:38:16 +02:00
Anton Khirnov
fa417fcd27
lavfi: make avfilter_insert_pad and pals private on next bump.
...
They are only useful inside filters and we don't allow user filters for
now.
2012-06-05 09:38:08 +02:00
Anton Khirnov
b74a1da49d
lavfi: make formats API private on next bump.
...
It is only useful inside filters and we don't allow user filters for
now.
2012-06-05 09:37:30 +02:00
Anton Khirnov
8eb9bf0933
avfiltergraph: make some functions static.
...
They are not used outside of avfiltergraph.c
2012-06-04 14:17:39 +02:00