Commit Graph

65 Commits

Author SHA1 Message Date
Michael Niedermayer d0ad91c258 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
  http: Add support for reading http POST reply headers
  http: Add http_shutdown() for ending writing of posts
  tcp: Allow signalling end of reading/writing
  avio: Add a function for signalling end of reading/writing
  lavfi: fix comment, audio is supported now.
  lavfi: fix incorrect comment.
  lavfi: remove avfilter_null_* from public API on next bump.
  lavfi: remove avfilter_default_* from public API on next bump.
  lavfi: deprecate default config_props() callback and refactor avfilter_config_links()
  avfiltergraph: smarter sample format selection.
  avconv: rename transcode_audio/video to decode_audio/video.
  asyncts: reset delta to 0 when it's not used.
  x86: lavc: use %if HAVE_AVX guards around AVX functions in yasm code.
  dwt: return errors from ff_slice_buffer_init()

Conflicts:
	ffmpeg.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_blackframe.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_showinfo.c
	libavfilter/video.c
	libavfilter/video.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 21:48:31 +02:00
Anton Khirnov 43c7a01e98 lavfi: remove avfilter_default_* from public API on next bump.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
2012-05-22 21:33:26 +02:00
Nicolas George 5ac9ef6493 avfilter: make AVFilterFormats compatible with libav.
The list goes back to being simple integers,
and avfilter_make_format64_list is fixed to work
with the correct structure directly.
2012-05-19 15:30:51 +02:00
Clément Bœsch 64ff8a7670 lavfi: rename all_channel_layouts.h to all_channel_layouts.inc.
all_channel_layouts.h is not a real header file and breaks make checkheaders.
2012-05-18 23:34:11 +02:00
Michael Niedermayer 3448404a70 libavfilter: add ff_parse_time_base()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-17 02:55:57 +02:00
Stefano Sabatini 4d4098da00 lavfi: drop planar/packed negotiation support
The planar/packed switch and the packing_formats list is no longer
required, since the planar/packed information is now stored in the sample
format enum.

This is technically a major API break, possibly it should be not too
painful as we marked the audio filtering API as unstable.
2012-05-16 13:16:05 +02:00
Michael Niedermayer 1cbf7fb434 Merge remote-tracking branch 'qatar/master'
* qatar/master: (26 commits)
  fate: use diff -b in oneline comparison
  Add missing version bumps and APIchanges/Changelog entries.
  lavfi: move buffer management function to a separate file.
  lavfi: move formats-related functions from default.c to formats.c
  lavfi: move video-related functions to a separate file.
  fate: make smjpeg a demux test
  fate: separate sierra-vmd audio and video tests
  fate: separate smacker audio and video tests
  libmp3lame: set supported channel layouts.
  avconv: automatically insert asyncts when -async is used.
  avconv: add support for audio filters.
  lavfi: add asyncts filter.
  lavfi: add aformat filter
  lavfi: add an audio buffer sink.
  lavfi: add an audio buffer source.
  buffersrc: add av_buffersrc_write_frame().
  buffersrc: fix invalid read in uninit if the fifo hasn't been allocated
  lavfi: rename vsrc_buffer.c to buffersrc.c
  avfiltergraph: reindent
  lavfi: add channel layout/sample rate negotiation.
  ...

Conflicts:
	Changelog
	doc/APIchanges
	doc/filters.texi
	ffmpeg.c
	ffprobe.c
	libavcodec/libmp3lame.c
	libavfilter/Makefile
	libavfilter/af_aformat.c
	libavfilter/allfilters.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/defaults.c
	libavfilter/formats.c
	libavfilter/src_buffer.c
	libavfilter/version.h
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c
	libavfilter/vsrc_buffer.h
	libavutil/avutil.h
	tests/fate/audio.mak
	tests/fate/demux.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-16 02:27:31 +02:00
Anton Khirnov 4c64fed37c lavfi: move formats-related functions from default.c to formats.c
It's more convenient to have them all in one file.
2012-05-15 06:52:01 +02:00
Anton Khirnov 5775a1832c lavfi: add types and functions for channel layout/samplerate negotiation 2012-05-14 21:36:10 +02:00
Michael Niedermayer 653d117c29 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libschroedinger: Switch to function names more in line with Libav style.
  Move code shared between libdirac and libschroedinger to libschroedinger.
  lavfi: uninline avfilter_copy_buffer_ref_props().
  lavf: add missing '*' in a doxy.
  h264: Remove a commented-out function pointer typedef.
  txd: Remove write-only variable in txd_decode_frame().
  mmvideo.c: Remove unused variable in mm_decode_pal().
  build: cosmetics: Add missing end-of-line backslashes to item lists.
  build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line.
  libschroedinger: Move a function to avoid a forward declaration.
  pthread: warn on high thread counts
  vf_yadif: fix missing error handling for avfilter_poll_frame()
  avprobe: allow showing only one container/stream property.
  lavfi: support audio in avfilter_copy_frame_props().
  lavfi: avfilter_merge_formats: handle case where inputs are same
  lavc: add sample rate and channel layout to AVFrame.
  zerocodec: check if the previous frame is missing
  doc: clarify check for NULL pointer style

Conflicts:
	doc/APIchanges
	doc/developer.texi
	ffprobe.c
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/libdirac_libschro.c
	libavcodec/libdirac_libschro.h
	libavcodec/mmvideo.c
	libavcodec/txd.c
	libavcodec/version.h
	libavcodec/zerocodec.c
	libavfilter/Makefile
	libavfilter/avfilter.c
	libavfilter/version.h
	libavformat/Makefile
	libavutil/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-07 22:51:34 +02:00
Mina Nagy Zaki 11b6a82412 lavfi: avfilter_merge_formats: handle case where inputs are same
This fixes a double-free crash if lists are the same due to the two
merge_ref() calls at the end of the (useless) merging that happens.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-07 07:08:59 +02:00
Michael Niedermayer 715c8a5a50 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  dfa: use more meaningful return codes
  eatgv: check vector_bits
  eatgv: check motion vectors
  Mark a number of variables only used in av_dlog() calls as av_unused.
  dvdec: drop const qualifier from variable to eliminate a warning
  avcodec: Improve comment for thread_safe_callbacks to avoid misinterpretation.
  tests/utils: don't ignore the return value of fwrite()
  lavfi/formats: use sizeof(var) instead of sizeof(type).
  lavfi: remove avfilter_default_config_input_link() declaration
  lavfi: always enable the scale filter and depend on sws.
  vf_split: support user-specifiable number of outputs.
  avconv: remove stray useless comment.
  mpegmux: add stuffing to avoid incomplete PCM frames
  rtsp: avoid const warnings from strtol() call
  avserver: check return value of ftruncate()
  lagarith: make offset array type unsigned
  dfa: add some checks to ensure that decoder won't write past frame end
  aacps: NEON optimisations
  aacps: align some arrays
  aacps: move some loops to function pointers
  ...

Conflicts:
	configure
	doc/filters.texi
	libavcodec/dfa.c
	libavcodec/eatgv.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/vf_split.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-06 21:53:19 +02:00
Anton Khirnov d4ac703c7f lavfi/formats: use sizeof(var) instead of sizeof(type). 2012-05-06 16:26:41 +02:00
Michael Niedermayer c065255bba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacenc: Fix LONG_START windowing.
  aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
  avplay: use the correct array size for stride.
  lavc: extend doxy for avcodec_alloc_context3().
  APIchanges: mention avcodec_alloc_context()/2/3
  avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.
  aacsbr: ARM NEON optimised sbrdsp functions
  aacsbr: align some arrays
  aacsbr: move some simdable loops to function pointers
  cosmetics: Remove extra newlines at EOF

Conflicts:
	libavcodec/utils.c
	libavfilter/formats.c
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-29 00:34:59 +01:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Stefano Sabatini 386aee6864 sink_buffer: copy list of provided formats in the context
A list of formats may have been dynamically created by the calling code,
and thus should not be referenced by the sink buffer context.

Avoid possible invalid data reference.
2011-12-22 10:09:42 +01:00
Michael Niedermayer 248bb81ebc avfilter: Error out from avfilter_merge_formats() when there are duplicates
instead of trying to continue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 14:14:01 +01:00
Michael Niedermayer 8cda755c2f avfilter: dont write out of array for duplicate formats in avfilter_merge_formats()
Note, this is a theoretical fix, iam not aware of a case where this function receives
duplicates in its input.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-23 13:18:11 +01:00
Reimar Döffinger b052601b95 Make another static array const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-05 15:37:02 +01:00
Ronald S. Bultje 43317fd52c libavfilter: reindent. 2011-11-05 07:01:39 -07:00
Ronald S. Bultje 23a8b4ddfc avfilter: don't abort() on zero-size allocations. 2011-11-05 06:59:27 -07:00
Stefano Sabatini 8fe0c527f3 lavfi: add LUT (LookUp Table) generic filters
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-17 18:05:38 +02:00
Stefano Sabatini 0ec56d1144 lavfi: fix realloc size computation in avfilter_add_format()
Replace sizeof((*avff)->formats)
with    sizeof(*(*avff)->formats)

as the size of the array element is given by the pointed element
rather than by its pointer.

In particular fix computation with the pending patch when
sizeof(int64_t) != sizeof(int64_t *).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-28 08:03:18 +02:00
Michael Niedermayer 41215fdeb3 libavfilter/formats.c: fix compile of test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-16 06:07:07 +02:00
Stefano Sabatini ea8de109af lavfi: add avfilter_all_channel_layouts public symbol
This list is mainly useful to be directly used as a parameter by the
audio sink buffer, when there is no need to force a specific channel
layout.

The list of formats is generated programmatically, and avoids channel
layouts not supported by libavfilter (with more than 8 channels).

We preferred to avoid compile-time generation in order to avoid some
unnecessary complexity (build hacks, generating code maintainance
etc.).

A more compact way to express this list through the use of macros
should be possible when libavfilter will support more than 8 channels,
as there will be no need to filter out channel layouts with more than
8 channels.

See thread:
Subject: [FFmpeg-devel] [PATCH] lavfi: add ff_all_channel_layouts internal symbol
Date: Sat, 20 Aug 2011 15:33:16 +0200
2011-09-16 00:46:41 +02:00
Stefano Sabatini 9899037dc6 lavfi: rename avfilter_all_* function names to avfilter_make_all_*
A function name should tell what the function does rather than what
the function returns. This also avoids possible conflicts
(e.g. between a function and a public list of all supported formats),
and clarifies the code.

Breaks audio API/ABI, add a backward compatibility layer for video
API/ABI.
2011-09-16 00:42:47 +02:00
Stefano Sabatini 4381bddc9f lavfi: consistently use int for sample_rate in AVFilterLink and AVFilterBufferRefAudioProps
Also consistent with AVCodecContext.sample_rate. Simplify/avoid
pointless type checks and conversions.

Breaks audio API/ABI.
2011-09-12 18:51:46 +02:00
Stefano Sabatini e26782a9b4 lavfi: add ff_parse_pixel_format() internal function, and use it
Reduce code duplication.
2011-08-23 15:45:44 +02:00
Stefano Sabatini a719679561 lavfi: complain and exit for invalid named values in ff_parse_packing_format() 2011-08-16 17:00:49 +02:00
Mina Nagy Zaki 3f07d40ea2 lavfi: add internal functions for parsing format arguments
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-08-14 10:31:09 +02:00
Mina Nagy Zaki b57df29f95 lavfi: add audio channel packing negotiation fields
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-07-16 19:22:49 +02:00
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.
2011-07-01 12:14:16 +02:00
Stefano Sabatini f4228097e4 lavfi: minor style fixes in formats.c 2011-06-22 18:28:28 +02:00
Mina Nagy Zaki fd2c0a5db2 lavfi: add layout negotiation fields and helper functions. 2011-06-19 22:58:32 +02:00
Mina Nagy Zaki 527ca3985c lavfi: use int64_t lists in AVFilteFormats
The list type was changed to int64_t to be able to hold
channel layouts.

avfilter_make_format_list() still takes a int32_t array and converts
it to int64_t. A new function, avfilter_make_format64_list, that
takes int64_t arrays has been added.
2011-06-19 22:58:31 +02:00
Stefano Sabatini 8f349b6481 lavfi: fix realloc size computation in avfilter_add_format()
Replace sizeof((*avff)->formats)
with    sizeof(*(*avff)->formats)

as the size of the array element is given by the pointed element
rather than by its pointer.

In particular fix computation with the pending patch when
sizeof(int64_t) != sizeof(int64_t *).
2011-06-19 22:58:31 +02:00
Mina Nagy Zaki 79a0ec1af4 lavfi: avfilter_merge_formats: handle case where inputs are same
This fixes a double-free crash if lists are the same due to the two
merge_ref() calls at the end of the (useless) merging that happens.
2011-06-10 13:04:47 +02:00
Mina Nagy Zaki 47d2ca3205 lavfi: handle NULL lists in avfilter_make_format_list 2011-06-08 18:50:07 +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 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
Stefano Sabatini 5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +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
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 d3c01751a3 Fix compilation on gcc 2.95.3 (still supported) broken by r21077,
which was due to declaring variable after code.

Originally committed as revision 21086 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-08 08:19:18 +00:00
Stefano Sabatini 063e769273 Make avfilter_formats_unref(AVFilterFormats **ref) handle the case
when *ref is NULL.

Originally committed as revision 21077 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-07 22:59:22 +00:00
Stefano Sabatini c1d662fd88 Change avfilter_add_colorspace() to make it accept **avff rather than
*avff, so that an AVFilterFormats struct is created and returned by
the function if *avff is NULL.

Make the function use more convenient.

Originally committed as revision 21035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-06 16:19:13 +00:00
Stefano Sabatini 5ff84183de Make avfilter_all_colorspaces() add to the returned list of pixel
formats only the non-HW-accelerated formats, for which there is no
sense in filtering.

Originally committed as revision 21009 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-04 00:08:11 +00:00
Stefano Sabatini 4fd1f1876a Implement avfilter_add_colorspace().
Originally committed as revision 21007 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-03 22:26:59 +00:00
Stefano Sabatini 9abba21ad3 Cosmetics: prefer "pix_fmts" over "pix_fmt" for the name of the
argument of avfilter_make_format_list(), as the argument represents a
list of elements.

Originally committed as revision 20341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-21 20:43:43 +00:00
Stefano Sabatini 1554fed2d6 Make avfilter_make_format_list() take in input a const argument.
Originally committed as revision 20340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-21 20:39:05 +00:00