Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
8f3a3ce730
lavfi: check all ff_get_video_buffer() calls for errors.
13 years ago
Anton Khirnov
d4f89906e3
lavfi: add error handling to end_frame().
13 years ago
Anton Khirnov
e9b992d035
lavfi: add error handling to draw_slice().
13 years ago
Anton Khirnov
ebc8d97481
lavfi: add error handling to start_frame().
13 years ago
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
12 years ago
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.
13 years ago
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.
13 years ago
Anton Khirnov
f493c644cd
vf_pad: don't give up its own reference to the output buffer.
13 years ago
Anton Khirnov
1a49a169eb
lavfi: make filters less verbose.
13 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
Michael Niedermayer
46c50b1726
vf_pad: check that we have write permission before writing in the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
9d0bfc5052
lavfi: make AVFilterPad opaque after two major bumps.
It will allow adding new fields to it without ABI breaks.
13 years ago
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.
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
Reimar Döffinger
24eac3cff5
Mark GRAY8 format as pseudo-paletted.
This fixes that the GIF encoder crashes with it because
it has no palette.
And the arguments for the pseudopalette apply to gray8 as
much as to RGB8 etc.
In addition the changes required in lavfi should be needed anyway
when adding support for RGB8 etc.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Nicolas George
53b7a3fe08
vf_pad: port to new drawutils API.
13 years ago
Nicolas George
b50767c31d
vf_pad: keep a reference to the output buffer.
Once fixed, the end_frame function does exactly what
avfilter_default_end_frame does; therefore, end_frame
can be removed to let avfilter_default_end_frame work.
Fixes ticket #1038 .
13 years ago
Alex Converse
b0f29db5c2
Mark mutable static data const where appropriate.
13 years ago
Michael Niedermayer
b1b0fd2790
pad: fix format string length
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
d78473334e
Add const to static arrays where it was forgotten.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
d7dcd96a23
vf_pad: Fix alignment of get_video_buffer()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
e2abe90ed7
vf_pad: 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
80de930a78
vf_pad: fix "vsub" variable value computation
It was shifting 2 rather than 1, +10l.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
753890d0db
vsrc_color: add @file doxy
Also remove outdated reference to color in vf_pad.c.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
61d55fda2b
lavfi: tweak display aspect ratio variables in pad and scale filters
Previously, "dar" and "a" were documented like "input display aspect
ratio", but their actual value was "in_w/in_h".
In order to avoid to break scripts which rely on the "a" variable, the
patch keeps the same semantics but fixes the corresponding docs, and
fixes the semantics of the recently added "dar" variable, which
now correctly expresses the input Display Aspect Ratio value as
"(inw_w/in_h)*sar".
13 years ago
Stefano Sabatini
80f1cfd09d
vf_pad: fix "vsub" variable value computation
It was shifting 2 rather than 1, +10l.
14 years ago
Stefano Sabatini
0bf02fb1ea
vf_pad: add support for a "sar" variable
Also add a "dar" alias for "a", for avoiding confusion with sar/dar.
14 years ago
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mina Nagy Zaki
fd2c0a5db2
lavfi: add layout negotiation fields and helper functions.
14 years ago
Stefano Sabatini
bb3a2b723a
vsrc_color: add @file doxy
Also remove outdated reference to color in vf_pad.c.
14 years ago
Stefano Sabatini
73a4f7c21b
pad: make the filter parametric
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
484a330890
pad: make the filter parametric
Address trac issue #61 .
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
c8c0189d62
lavfi: put color source in a dedicated file
Move the color source code from vf_pad.c to vsrc_color.c.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
5ad06110e0
lavfi: add drawutils
Add drawutils.h and drawutils.c, and use them in the pad filter.
The new functions are going to be shared by other filters.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
fd0b42cce0
lavfi: put color source in a dedicated file
Move the color source code from vf_pad.c to vsrc_color.c.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
bcfd9e821b
lavfi: add drawutils
Add drawutils.h and drawutils.c, and use them in the pad filter.
The new functions are going to be shared by other filters.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
14 years ago
Stefano Sabatini
8bca34933e
In the pad filter, log information about the input size.
Originally committed as revision 26320 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Michael Niedermayer
e3331706fc
Fix design of the pad filter.
Previously the pad filter just drawed borders in the surrounding of the input
without checking if this area was allocated or writeable. Now we check and
allocate a new buffer if the input is unsuitable.
Originally committed as revision 26315 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Baptiste Coudurier
69057b70f7
In pad filter, update new ref w/h in start_frame, fix chaining
Originally committed as revision 26217 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
3fa77bde1b
In libavfilter, use consistently "Copyright (c)" in the license
headers.
Originally committed as revision 25838 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Aurelien Jacobs
0985e1a3ca
move the av_parse_color() function from libavfilter to libavcore
Originally committed as revision 25761 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Baptiste Coudurier
c71e9640db
100L fix get_video_buffer in pad filter, get_video_buffer will store wrong values for w and h
Originally committed as revision 25759 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Aurelien Jacobs
2722dd6ebf
improve av_parse_color() to allow for non-null terminated color string
Originally committed as revision 25744 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
b9f9e59afc
Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the
corresponding AVMEDIA_TYPE_* symbols.
Originally committed as revision 25201 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago