Commit Graph

43 Commits

Author SHA1 Message Date
Stefano Sabatini
120119225a Add missing NULL checks, fix crash.
Originally committed as revision 25181 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 20:01:38 +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
Stefano Sabatini
371cbff84d Cosmetics: apply misc style fixes.
Originally committed as revision 24812 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 18:08:09 +00:00
S.N. Hemanth Meenakshisundaram
ad2c950154 Implement libavfilter audio framework.
Patch by S.N. Hemanth Meenakshisundaram * smeenaks * ucsd * edu *.

Originally committed as revision 24811 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 18:08:03 +00:00
Stefano Sabatini
65d4cab562 Add missing checks in avfilter_default_get_video_buffer().
Originally committed as revision 24809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 15:12:28 +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
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
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
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
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
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
Vitor Sessak
8ad802e610 Alloc 16 extra bytes in libavfilter frames. Needed for MMX-optimized swscale.
Fix issue 1924.

Originally committed as revision 23077 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-10 00:28:18 +00:00
Michael Niedermayer
efdc74ef19 Try to keep track of interlaced and top field first.
Originally committed as revision 23044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-07 10:02:59 +00:00
Bobby Bingham
91d1c741bf Create a set of null callback functions.
These are useful for filters which don't modify the image data.

Originally committed as revision 22594 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-18 23:12:48 +00:00
Stefano Sabatini
5bb5c1dc86 Add AVFilterPicRef.pos field and make libavfilter propagate stream
byte position information, as stored in the pkt.pos, through the
filterchain.

Note that the pos field is added *non* at the end of the
AVFilterPicRef struct, thus breaking ABI compatibility, which is
allowed as the API is still considered non-stable.

Originally committed as revision 22506 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 11:27:05 +00:00
Måns Rullgård
1250fcc862 avfilter: make avfilter_default_free_video_buffer() static
This function is not referenced outside this file and has no
prototype.  Feel free to flame if this is wrong.

Originally committed as revision 22314 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 03:41:19 +00:00
Stefano Sabatini
3b2142af99 Make avfilter_default_start_frame() correctly pass the aspect ratio
information to the next filter.

Originally committed as revision 22300 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 23:53:47 +00:00
Stefano Sabatini
b5eab66e9f Make avfilter_default_start_frame() request a buffer with the same
size of the output link of the destination filter, rather than of the
size of the input link.
In particular this fixes a crash in the rotate filter.

Originally committed as revision 21238 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 10:10:14 +00:00
Stefano Sabatini
a13a543797 Add a slice_dir parameter to avfilter_draw_slice().
Avoid the need to implement slice direction detection code, thus
reducing code duplication.

See the thread:
"[FFmpeg-devel] [PATCH] Add a slice_dir parameter to avfilter_start_frame()".

Originally committed as revision 20734 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-04 23:26:13 +00:00
Stefano Sabatini
0eb4ff9e37 Make avfilter_get_video_buffer() recursive.
When called on a link with a filter whose destination pad has not a
get_video_buffer callback defined, it will call
avfilter_get_video_buffer() on the first output link of the
destination filer, rather than use avfilter_default_get_buffer(), so
the video buffer can be allocated forward in the filterchain.

Also add the w and h parameters to avfilter_get_video_buffer(), as the
minimum width and height requested by each filter in the filterchain
may change, this allows for example a memcpy-less pad filter.

This change breaks API / ABI backward compatibility.

See the thread:
"[PATCH] Implement recusive avfilter_get_video_buffer()".

Originally committed as revision 20272 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-18 08:16:18 +00:00
Stefano Sabatini
46c40e4835 Add w and h fields to AVFilterPic.
See the thread:
"[FFmpeg-devel] [PATCH] Add w,h fields to AVFilterPic".

Originally committed as revision 20189 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-07 18:50:00 +00:00
David Conrad
ef516f7377 Move ALIGN macro to libavutil/common.h and use it in various places
Originally committed as revision 18898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-22 21:32:13 +00:00
Stefano Sabatini
b9609848f3 Implement the avfilter_default_draw_slice() handler and use it in
avfilter_draw_slice() when the draw_slice callback is not defined in
the input pad.

Originally committed as revision 16554 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-11 22:05:48 +00:00
Diego Biurrun
245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Vitor Sessak
790a03d701 Force alignment of pic->linesize
Commited in SoC by Vitor Sessak on 2008-02-15 21:05:06

Originally committed as revision 12075 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 22:00:13 +00:00
Vitor Sessak
4cf48782f8 Force linesize to be a multiple of 16
Commited in SoC by Vitor Sessak on 2008-02-10 20:51:58

Originally committed as revision 12074 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 22:00:09 +00:00
Vitor Sessak
459821c533 Rework link property configuration system.
This can now handle filters which are added to graphs out of order,
including auto-inserted scale filters.  As an added bonus, it can
now detect circular filter chains which wouldn't work anyway.

Commited in SoC by Bobby Bingham on 2007-12-24 03:22:10

Originally committed as revision 12073 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 22:00:07 +00:00
Vitor Sessak
e363730c01 Rewrite colorspace negotiation.
Commited in SoC by Bobby Bingham on 2007-12-20 19:36:26

Originally committed as revision 12072 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 22:00:03 +00:00
Vitor Sessak
d0e4eba57c Make an invalid use of a default callback implementation return an error.
Commited in SoC by Bobby Bingham on 2007-08-18 01:45:42

Originally committed as revision 12071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 22:00:00 +00:00
Vitor Sessak
4f90956596 Ensure that buffers returned by the default allocator are readable, or else
they're useless for outputting.

Commited in SoC by Bobby Bingham on 2007-08-17 22:52:18

Originally committed as revision 12070 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:57 +00:00
Vitor Sessak
23274667c2 Revert braindead linked list of permissions
Commited in SoC by Bobby Bingham on 2007-08-17 22:44:03

Originally committed as revision 12069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:50 +00:00
Vitor Sessak
4d62c9d377 Track the permissions that have been given out to each picture.
This should make it easier to know what can be done to a buffer once
it's been passed to your filter without falling back to copying it "just
to be safe".

Commited in SoC by Bobby Bingham on 2007-08-17 18:21:07

Originally committed as revision 12068 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:47 +00:00
Vitor Sessak
fc0f39c222 indentation
Commited in SoC by Bobby Bingham on 2007-08-17 17:09:19

Originally committed as revision 12067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:44 +00:00
Vitor Sessak
552c020875 Make default end_frame() implementation more useful.
Commited in SoC by Bobby Bingham on 2007-08-17 16:45:47

Originally committed as revision 12066 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:41 +00:00
Vitor Sessak
712048daf5 Allow filters to set the requirements on permissions for incoming buffers.
Commited in SoC by Bobby Bingham on 2007-08-17 16:40:26

Originally committed as revision 12065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:59:38 +00:00
Vitor Sessak
f66f53dac8 Separate the process of creating links between filters from that of configuring
the links.

Commited in SoC by Bobby Bingham on 2007-08-07 21:02:18

Originally committed as revision 12064 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:58:29 +00:00
Vitor Sessak
bf4ce7a364 Move default entry point implementations to their own file.
Make them externally visible because they may be useful for filters to use.

Commited in SoC by Bobby Bingham on 2007-08-02 15:14:05

Originally committed as revision 12063 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-15 21:58:25 +00:00