Michael Niedermayer
617e866e25
Move av_find_best_pix_fmt_of_2() from avcodec to avutil
...
This avoids a dependancy of libavfilter on libavcodec
See Ticket 3592
Fixes Ticket2784
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Yu Xiaolei
fbe9ae482d
avfilter: make avfilter_graph_get_filter use const string name
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nicolas George
d300f5f6f5
lavfi/avfiltergraph: do not reduce incompatible lists.
...
A list of "all channel layouts" but not "all channel counts"
can not be reduced to a single unknown channel count.
11 years ago
Nicolas George
f775eb3fb4
lavfi/avfiltergraph: suggest a solution when format selection fails.
...
Format selection can fail if unknown channel layouts are used
with filters that do not support it.
11 years ago
Derek Buitenhuis
52aed19307
avfiltergraph: Properly handle memory allocation failure
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Michael Niedermayer
d5ec8ba7f2
Do not leave positive values undefined when negative are defined as error
...
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
0767bfd199
lavfi: allow user-provided execute() callbacks
11 years ago
Anton Khirnov
77cc958f60
lavfi: add const to the AVFilter parameter of avfilter_graph_create_filter()
...
This function should never modify the filter.
11 years ago
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
11 years ago
Michael Niedermayer
de0a1f63df
avfilter/can_merge_formats: fix memleak
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6bde1e9d14
avfilter/avfiltergraph: fix check using the wrong variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6a0b72f94f
avfilter/avfiltergraph: minor cosmetic
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
fe328f0807
avfilter: Dont partially merge lists
...
This prevents the unneeded insertion of multiple aresample filters in some cases
The format merging is moved to avoid having to call the channel layout
merge twice. The channel layout merge code uses different structures and
is not compatible with the added dry run wrappers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5169111145
avfilter/REDUCE_FORMATS: fix bug that ended reducing too early
...
Prior to this it was possible that format reduction was ended
before it fully propagated leading to failure later in picking
formats.
No testcase with unmodified source exists, the case was reproduced
with less aggressive list merging though.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
129bb23843
lavfi: add a slice threading infrastructure
...
Mostly based on libavcodec's
12 years ago
Anton Khirnov
b01f6041f4
lavfi: rename AVFilterFormats.format_count to nb_formats
...
This is more consistent with naming in the rest of Libav.
12 years ago
Anton Khirnov
096696ef0d
avfiltergraph: simplify inserting conversion filters.
...
There is now no need to explicitly pass 0:0 as width/height to scale,
those are the defaults.
12 years ago
Stefano Sabatini
5c4c929878
lavfi/avfiltergraph: fix style
12 years ago
Nicolas George
4582e4c086
lavfi: add comments to explain the negotiation loop.
12 years ago
Nicolas George
78d16b6a51
lavfi: fix filter format negotiation loop.
...
query_formats() returning EAGAIN is not considered a progress
in the format negotiation.
If the filter returns EAGAIN but did set some of its formats
lists, it could be considered a partial success and counted
as progress in the negotiation. Not counting it is not a
problem because it currently only happens in the first round,
where there will always be some progress on the other filters.
12 years ago
Michael Niedermayer
0acf7e268b
avfilter: remove opaque passing hacks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
48a5adab62
lavfi: add avfilter_init_str() to replace avfilter_init_filter().
...
Drop the unused opaque parameter from its signature.
12 years ago
Anton Khirnov
1565cbc65c
lavfi: make avfilter_free() remove the filter from its graph.
12 years ago
Anton Khirnov
111367263a
lavfi: add AVFilterContext.graph.
...
It will be useful in the following commits.
12 years ago
Anton Khirnov
c2c9801bc9
lavfi: deprecate avfilter_graph_add_filter().
...
Since this function adds a standalone filter to a filter graph and we do
not support creating such filters, there is no reason for this function
to exist.
12 years ago
Anton Khirnov
bc1a985ba0
lavfi: replace avfilter_open() with avfilter_graph_alloc_filter().
...
Since we do not support "standalone" filters not attached to an
AVFilterGraph, we should not have a public function to create such
filters. In addition that function is horribly named, the action it does
cannot be possibly described as "opening" a filter.
12 years ago
Anton Khirnov
38f0c0781a
lavfi: merge avfiltergraph.h into avfilter.h
...
We do not support using filters without AVFilterGraph in practice
anyway, so there is no point in pretending we do.
12 years ago
Anton Khirnov
6d0546bbaf
avfiltergraph: set deprecated filter_count.
12 years ago
Anton Khirnov
6e3c13a559
avfiltergraph: check for sws opts being non-NULL before using them.
...
Avoid snprintfing a NULL pointer.
CC: libav-stable@libav.org
12 years ago
Nicolas George
125acd2152
lavfi: support multiple rounds of format negotiation.
...
Remove the temporary hack for amerge and replace it with a
generic solution.
12 years ago
Anton Khirnov
dd74e3ef33
avfiltergraph: use sizeof(var) instead of sizeof(type)
12 years ago
Anton Khirnov
42c7c61ab2
avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
...
This is more consistent with the naming in the rest of Libav.
12 years ago
Reimar Döffinger
efa7f42020
Use the avstring.h locale-independent character type functions
...
Make sure the behavior does not change with the locale.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
88d55b827d
Remove incorrect use of ctype.h functions.
...
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Nicolas George
2d98dd3d14
lavfi: fix merging of formats and clarify exception.
...
The following commit:
b97d61f
avfilter/ff_merge_formats: only merge if doing so does not loose chroma or alpha
introduced an exception to avoid lossy conversions.
Add a comment to explain the logic.
Fix the call to avoid applying it on audio formats.
12 years ago
Justin Ruggles
9f1223562e
lavfi: connect libavresample options to af_resample via AVFilterGraph
12 years ago
Nicolas George
b5884db437
lavfi: fix missing space in error message.
12 years ago
Nicolas George
3dea8b375e
lavfi: remove disabled code.
12 years ago
Nicolas George
b6afb2dde1
lavfi: support unknown channel layouts.
12 years ago
Clément Bœsch
491ca0e89f
Replace references to "que" with the appropriate word.
...
"que" sounds like a slang word to me. This commit renames a few
variables, fix the comments and the logging messages (sometimes along
with small other typo fixes).
12 years ago
Nicolas George
b99bef17b4
lavfi/avfiltergraph: check pick_format return code.
12 years ago
Nicolas George
11ab2c25b6
lavfi/avfiltergraph: print query_formats errors.
12 years ago
Michael Niedermayer
bd16f0a331
avfiltergraph: put variables used in #if 0 code themselfs under #if 0
...
Fixes unused variable warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
238edd2fe3
lavfi: add a channels field to AVFilterLink.
...
Also: fix af_pan and af_aresample, that forgot to update
audio->channels.
12 years ago
Michael Niedermayer
69d45d2ecb
avfiltergraph: add aresample_swr_opts
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8f507feecb
avfiltergraph: add AVOption table
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
f67ebf5b77
lavfi/avfiltergraph: improve error message in graph_check_validity()
...
Fix trac ticket #1944 .
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Stefano Sabatini
8f37a1e8dc
lavfi/avfiltergraph: avoid to print "(null)" in the scale args
...
Fix parsing.
12 years ago
Hendrik Leppkes
79393a8363
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago