Commit Graph

581 Commits

Author SHA1 Message Date
Stefano Sabatini f607cc18eb Cosmetics: put "{" on the same line of the "struct" keyword in struct
definitions.

More consistent with the rest of FFmpeg.

Originally committed as revision 24789 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 18:20:58 +00:00
Stefano Sabatini 81c1ecabab Deprecate ff_get_plane_bytewidth() in favor of
av_get_image_linesize().

Originally committed as revision 24787 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 15:06:04 +00:00
Baptiste Coudurier e4cc9f208d 100L, fix vf_scale, since copy_ref_props now copy w and h, we must update them
Originally committed as revision 24781 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 00:33:18 +00:00
Stefano Sabatini a4fb0ada0b Apply misc cosmetics: add empty newlines for separating function
declarations and fix weird indent.

Originally committed as revision 24776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 16:22:16 +00:00
S.N. Hemanth Meenakshisundaram 382ac60e44 Set type on buffer in get_video_buffer().
Patch by S.N. Hemanth Meenakshisundaram reverse("skaneems") + "@ucsd.edu".

Originally committed as revision 24775 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 15:38:50 +00:00
S.N. Hemanth Meenakshisundaram c1db7bff66 Resize data and linesize in AVFilterBufferRef to 8.
This is required to make AVFilterBufferRef able to contain also audio
data, required by audio filtering integration.

Patch by S.N. Hemanth Meenakshisundaram smeen?ks@ucsd.ed?.

Originally committed as revision 24773 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 15:25:42 +00:00
Stefano Sabatini 84c0386960 Change avfilter_open() signature, from:
AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name);
to:
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);

This way it is possible to propagate an error code telling the reason
of the failure.

Originally committed as revision 24765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 11:44:51 +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
S.N. Hemanth Meenakshisundaram d54e0948e0 Move format from AVFilterBuffer to AVFilterPicRef.
Patch by S.N. Hemanth Meenakshisundaram |smeenaks|ucsd|edu|.

Originally committed as revision 24728 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 00:02:26 +00:00
S.N. Hemanth Meenakshisundaram 59ff3fd536 Fix the size of the data to be copied from an AVFilterBuffer to an
AVFilterBuffereRef in avfilter_default_get_video_buffer().

The error was being caused by the previous patch which resized
AVFilterBuffer's data and linesize arrays to 8.

Patch by S.N. Hemanth Meenakshisundaram" &smeenaks&ucsd&edu&.

Originally committed as revision 24727 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 00:02:21 +00:00
Måns Rullgård 5a6fbf4c39 avfilter: indent
Originally committed as revision 24720 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 22:25:39 +00:00
Måns Rullgård 0bb7408e55 avfilter: do not crash on null link src/dst in avfilter_destroy()
Originally committed as revision 24719 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 22:25:36 +00:00
Måns Rullgård f3b90d25ee avfilter: free link in/out_formats in avfilter_destroy()
Originally committed as revision 24718 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 22:25:33 +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 be665c7da6 Make avfilter_copy_picref_props() copy w and h from src to dst.
Originally committed as revision 24678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 09:02:16 +00:00
Stefano Sabatini d6bb31a46b Make config_input() return AVERROR(EINVAL) in place of -1.
Originally committed as revision 24595 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 11:56:01 +00:00
Stefano Sabatini b59d12b1b9 Compute the max pixel step for each plane, and use it in place of
hardcoding that value in a switch.

More compact and correct.

Originally committed as revision 24594 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 11:33:31 +00:00
S.N. Hemanth Meenakshisundaram 56b5e9d5a9 Resize AVFilterBuffer to hold 8 planes/linesizes worth of data.
This is required for making AVFilterBuffer useful for storing audio
data.

Patch by S.N. Hemanth Meenakshisundaram revert <ude.dscu@skaneems>.

Originally committed as revision 24592 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 08:42:25 +00:00
Stefano Sabatini 7be5b7309c Make avfilter_default_get_video_buffer() use functions in
libavcore/imgutils.c rather than ff_fill_linesize() and
ff_fill_pointer().

Also remove a dependency on libavcodec.

Originally committed as revision 24586 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 00:29:50 +00:00
Stefano Sabatini 15379c2beb Require libswscale only if the scale filter is used.
Although with several limitations, lavfi can be compiled and used
without the scale filter.

Originally committed as revision 24570 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 08:56:52 +00:00
Stefano Sabatini 46eed2c886 Remove reference to the unexisting movie filter and the corresponding
useless --enable-avfilter-lavf option.

Originally committed as revision 24569 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 08:56:49 +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
Stefano Sabatini 8d5fa2baa6 Remove dependency on avcodec_get_chroma_sub_sample() and libavcodec,
use the pixdesc API instead.

Originally committed as revision 24440 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 22:06:46 +00:00
S.N. Hemanth Meenakshisundaram bdab614be8 Generalize pixel format enum fields to int formats.
This is needed to make the libavfilter framework work with audio
filters.

In particular add a type field to AVFilterLink, change the field types:
enum PixelFormat format   -> int format   in AVFilterBuffer
enum PixelFormat *formats -> int *formats in AVFilterFormats
enum PixelFormat *format  -> int format   in AVFilterLink

and change the function signatures:
AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); ->
AVFilterFormats *avfilter_make_format_list(const int *fmts);

int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); ->
int avfilter_add_format(AVFilterFormats **avff, int fmt);

AVFilterFormats *avfilter_all_colorspaces(void); ->
AVFilterFormats *avfilter_all_formats(enum AVMediaType type);

This change breaks libavfilter API/ABI.

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

Originally committed as revision 24424 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 11:12:47 +00:00
Stefano Sabatini 98137a1a5b Document create_filter().
Originally committed as revision 24423 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:56:09 +00:00
Stefano Sabatini d2874a9d59 Add simple doxy to link_filter().
Originally committed as revision 24422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:56:06 +00:00
Stefano Sabatini 94b2120dfb Fix documentation for parse_link_name().
Originally committed as revision 24421 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:56:03 +00:00
Stefano Sabatini bb90d855d7 Consistently use Uppercase for the first character of the log
messages.

Originally committed as revision 24420 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:56:00 +00:00
Stefano Sabatini 99ac59ca69 Make link_filter() propagate the generated error code.
Originally committed as revision 24419 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:55:57 +00:00
Stefano Sabatini f219eee592 Fix style: "if(" -> "if (".
Originally committed as revision 24418 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 09:49:15 +00:00
Stefano Sabatini 59775b3c1a Extend buffer source syntax.
Make the buffer source accept a string for specifying the input pixel
format.

Originally committed as revision 24387 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 17:14:19 +00:00
Stefano Sabatini e2f48c05e9 Add an informational trace in init().
Originally committed as revision 24386 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 17:14:15 +00:00
Stefano Sabatini b8dddebf3e Clarify logic and feedback of the init() function.
Originally committed as revision 24385 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 17:14:13 +00:00
Stefano Sabatini ce1f853625 Add description to the buffer source.
Originally committed as revision 24384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 17:14:08 +00:00
Stefano Sabatini 4055438b48 Apply misc cosmetical style fixes.
Originally committed as revision 24365 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 16:23:25 +00:00
Stefano Sabatini b5634e458f Add @file doxy.
Originally committed as revision 24364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 16:23:18 +00:00
Stefano Sabatini 9f0e31d29a Make avfilter.c dprintf* functions internal and declare them in an
internal.h header, so they can be easily used from other files.

Originally committed as revision 24319 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-18 22:37:39 +00:00
S.N. Hemanth Meenakshisundaram ff5f1be0fe Move the AV_PERM_* flags definition outside the AVFilterPicRef
definition.

This way it is easier to reference them in other structures, for
example in the pending AVFilterSamplesRef struct.

Patch by S.N. Hemanth Meenakshisundaram smeenaks AT ucsd DOT edu.

Originally committed as revision 24294 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-17 18:55:56 +00:00
Stefano Sabatini 32d7bcd4b1 Clarify AVFilterBuffer documentation, make it clear that it is not
necessarily video-related.

Originally committed as revision 24293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-17 18:27:11 +00:00
S.N. Hemanth Meenakshisundaram b5c582fa9d Remove AVFilterBuffer w and h fields.
These fields are never used, and they do not seem to belong to
AVFilterBuffer anymore, now that it is now a media-independent
structure and these fields are video-related.

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

Originally committed as revision 24291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-17 18:13:17 +00:00
S.N. Hemanth Meenakshisundaram f0d77b2085 Rename AVFilterPic to AVFilterBuffer.
The struct is going to be used for audio data as well, so the new name
is less misleading.

Patch by S.N. Hemanth Meenakshisundaram smeenaks AT ucsd DOT edu.

Originally committed as revision 24284 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-17 10:44:14 +00:00
Stefano Sabatini 23ccf3c7a7 Add color source.
Originally committed as revision 24282 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-17 10:14:52 +00:00
Víctor Paesa 922189feb0 Use avfilter_copy_picref_props() along lavfi.
Originally committed as revision 24196 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-11 14:44:43 +00:00
Stefano Sabatini ee4355808c Reindent after r24101.
Originally committed as revision 24126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-08 22:05:33 +00:00
Stefano Sabatini ce1cd1cba2 Rename read/write_line() to av_read/write_image_line().
The old names were not av_ prefixed, and they were causing linking
failure on many platforms.  The new names are also more descriptive.

Patch by Stefano Sabatini.

Originally committed as revision 24101 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 23:41:42 +00:00
Stefano Sabatini ce2e4ae35a Add pixdesctest filter and corresponding test.
Originally committed as revision 24092 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 18:24:55 +00:00
Stefano Sabatini 4d508e4de5 Implement avfilter_copy_picref_props().
Originally committed as revision 24091 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 18:23:54 +00:00