Commit Graph

63 Commits

Author SHA1 Message Date
Anton Khirnov cd43ca0443 lavfi: do not export the filters from shared objects 2013-10-28 15:29:54 +01:00
Anton Khirnov 3062ac4c47 vf_pad: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
2013-05-16 07:36:10 +02:00
Anton Khirnov c43a7ecad9 lavfi: remove now unused args parameter from AVFilter.init 2013-04-09 19:12:38 +02:00
Anton Khirnov 40c885c589 vf_pad: switch to an AVOptions-based system. 2013-04-09 19:06:29 +02:00
Xi Wang 5d639b2b4a vf_pad: fix a & instead of && typo
Avoid buffer overflow in buffer_needs_copy()

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-10 11:16:10 +01:00
Anton Khirnov 7e350379f8 lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
2013-03-08 07:37:18 +01:00
Anton Khirnov 565e4993c6 lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
2012-11-28 08:50:19 +01:00
Anton Khirnov 59ee9f78b0 lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Mans Rullgard 568c70e79e lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers.  The current style is also quite ugly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-10 22:26:12 +01:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Anton Khirnov ba04177eeb vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.

CC:libav-stable@libav.org
2012-10-06 07:27:53 +02: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
Anton Khirnov 8f3a3ce730 lavfi: check all ff_get_video_buffer() 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 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 f493c644cd vf_pad: don't give up its own reference to the output buffer. 2012-07-20 21:08:13 +02:00
Anton Khirnov 1a49a169eb lavfi: make filters less verbose. 2012-06-26 19:08:13 +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
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 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 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 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
Alex Converse b0f29db5c2 Mark mutable static data const where appropriate. 2012-02-21 09:47:07 -08:00
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>
2011-09-28 08:03:30 +02:00
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>
2011-09-19 12:43:25 +02:00
Mans Rullgard 0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
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>
2011-04-26 07:43:34 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
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>
2011-02-21 14:09:46 +00:00
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>
2011-02-21 14:09:08 +00:00
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>
2011-02-15 16:18:21 +01:00
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
2011-01-12 16:40:23 +00:00
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
2011-01-11 23:53:24 +00:00
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
2011-01-05 01:14:14 +00:00
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
2010-11-28 10:22:58 +00:00
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
2010-11-17 22:58:28 +00:00
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
2010-11-17 01:03:06 +00:00
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
2010-11-13 13:55:01 +00:00
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
2010-09-25 23:27:16 +00:00
Stefano Sabatini e16f217ceb Use new imgutils.h API names, fix deprecation warnings.
Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 19:15:29 +00:00
S.N. Hemanth Meenakshisundaram cc80caff52 Separate video specific BufferRef properties into VideoProps.
Define a new struct AVFilterBufferRefVideoProps and add a type field
to AVFilterBufferRef.

Video specific properties in AVFilterBufferRefVideoProps are now
referred to by *video pointer in AVFilterBufferRef.

Patch by S.N. Hemanth Meenakshisundaram smeenaks->ucsd.edu.

Originally committed as revision 24763 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 11:06:04 +00:00
S.N. Hemanth Meenakshisundaram 5d4890d73d Rename fields:
AVFilterLink.srcpic    ->  AVFilterLink.src_buf
AVFilterLink.cur_pic   ->  AVFilterLink.cur_buf
AVFilterLink.outpic    ->  AVFilterLink.out_buf

The new names are more generic and more consistent, since the struct
they contain, which was named AVFilterPicRef, has been renamed to
AVFilterBufferRef.

Patch by S.N. Hemanth Meenakshisundaram %smeenaks%ucsd%edu%.

Originally committed as revision 24732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:34 +00:00
S.N. Hemanth Meenakshisundaram 7fce481a69 Rename functions and fields:
avfilter_(un)ref_pic       -> avfilter_(un)ref_buffer
avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props
AVFilterBufferRef.pic      -> AVFilterBufferRef.buffer

They have been renamed to allow sharing with audio.

Patch by S.N. Hemanth Meenakshisundaram $smeenaks$ucsd$edu$.

Originally committed as revision 24731 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:27 +00:00
S.N. Hemanth Meenakshisundaram ecc8dada37 Rename AVFilterPicRef to AVFilterBufferRef.
The struct is going to be used for storing audio buffer references as
well, and the new name is more generic.

Patch by S.N. Hemanth Meenakshisundaram @smeenaks@ucsd@edu@.

Originally committed as revision 24730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:15:19 +00:00
Stefano Sabatini 6ce9b4310c Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.

Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 09:37:04 +00:00
Stefano Sabatini 126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00