Stefano Sabatini
42d621d131
lavfi: add priv class to filter definitions and flags to filter internal options
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
12 years ago
Stefano Sabatini
a77436abad
lavfi/lut: duplicate class definitions for each lut variant filter
This is due to the design of components iteration through AVClass
child_class_next() callback, which requires that two components cannot
share the same class.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
e9b992d035
lavfi: add error handling to draw_slice().
13 years ago
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
12 years ago
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.
13 years ago
Stefano Sabatini
c17808cebd
lavfi: define macro AVFILTER_DEFINE_CLASS
The macro can be used to define consistently the internal class of a
filter, save some typing and factorize.
13 years ago
Michael Niedermayer
a46f8915be
vf_lut: fix handling of odd dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
54101214d8
lavfi: use designated initializers for AVClass
While here:
- add missing .version and .category,
- make .class_name consistent across filters,
- align declarations.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
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.
13 years ago
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.
13 years ago
Stefano Sabatini
0f0f3bd1e0
lavfi: use av_default_item_name() as filter private context logger
avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.
13 years ago
Stefano Sabatini
4d6a8a2bdb
lavfi: add avfilter_default_filter_name()
The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.
This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
13 years ago
Stefano Sabatini
f3fea5bab1
lavfi/lut: fix component -> rgba mapping
13 years ago
Michael Niedermayer
2a793ff2bf
vf_lut: fix pointer type (const) warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
bb39c74b59
lavfi/lut: remove unused variable
Fix warning:
libavfilter/vf_lut.c: In function ‘draw_slice’:
libavfilter/vf_lut.c:297:15: warning: unused variable ‘k’ [-Wunused-variable]
13 years ago
Michael Niedermayer
c0af87550a
vf_lut: fix rgba map regression
Fixes Ticket1184
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
38477e1981
vf_lut: avoid rgb component indexing in the inner loop
15k->10k cpu cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
002d9ded4a
vf_lut: optimize rgb codepath
19k -> 15k cpu cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
79a1d98676
vf_lut: optimize planar case
2500 -> 1900 cpu cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
b0f29db5c2
Mark mutable static data const where appropriate.
13 years ago
Reimar Döffinger
5af7daabc4
Mark AVFilterPad[] compound literals as const.
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
d7e95ccd9f
Make PIX_FMT format list arrays const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
d78473334e
Add const to static arrays where it was forgotten.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Stefano Sabatini
171868e25a
lavfi: add negate filter
This filter is a simple wrapper around the LUT filter.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
8fe0c527f3
lavfi: add LUT (LookUp Table) generic filters
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Clément Bœsch
539399d4d1
AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*.
13 years ago
Nicolas George
157ff97e3b
vf_lut: remove mathematical constants now redundant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
91492bd1c4
lavfi: remove usage of deprecated av_opt_set_defaults2() function
Prefer av_opt_set_defaults() instead.
13 years ago
Michael Niedermayer
633aa01f72
libavfilter: fix --enable-small
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
59bd0fef66
vf_lut: set minimum and maximum alpha value for yuva420p
14 years ago
Stefano Sabatini
2b550beb22
vf_lut: add plane validity check in draw_slice()
The value for inpic->data[plane] with plane >=4 is undefined, and it
will contain in general random data. This change adds a check for
exiting the loop when plane reaches the value 4.
Fix crash (occurring for example with: format=rgba,lut).
14 years ago
Stefano Sabatini
7464a53aaa
lavfi: make pix_fmt_is_in() in vf_lut.c an internal function
Also generalize it, making it accept ints rather than pixel formats.
Allow factorization.
14 years ago
Stefano Sabatini
cdeb803e2f
vf_lut: fix draw_slice() in case of non packed image data for packed RGB
The previous code was erroneously assuming that the linesize was
equivalent to width*pixel_step, which is not always true.
14 years ago
Mina Nagy Zaki
fd2c0a5db2
lavfi: add layout negotiation fields and helper functions.
14 years ago
Stefano Sabatini
15f03725ce
lavfi: add negate filter
This filter is a simple wrapper around the LUT filter.
14 years ago
Stefano Sabatini
dd2793c880
lavfi: add LUT (LookUp Table) generic filters
14 years ago