Commit Graph

1814 Commits

Author SHA1 Message Date
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
Diego Biurrun 91791ac2ed avfilter: Move ff_get_ref_perms_string() to where it is used.
This fixes a compilation failure with -DDEBUG.
2012-05-15 19:10:46 +02:00
Michael Niedermayer 47aae2bc2e lavfi: switch to _alt functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-15 18:55:17 +02:00
Anton Khirnov d89eca507c Add missing version bumps and APIchanges/Changelog entries. 2012-05-15 06:57:31 +02:00
Anton Khirnov 4a1ac8c43f lavfi: move buffer management function to a separate file. 2012-05-15 06:53:22 +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 c5432d3ca4 lavfi: move video-related functions to a separate file.
This is easier to follow than having them randomly scattered in
avfilter.c and defaults.c.
2012-05-15 06:51:23 +02:00
Anton Khirnov 9f26421b0b lavfi: add asyncts filter. 2012-05-14 21:36:11 +02:00
Anton Khirnov fb604ae850 lavfi: add aformat filter
Based on a patch by Mina Nagy Zaki <mnzaki@gmail.com>
2012-05-14 21:36:11 +02:00
Anton Khirnov a2cd9be212 lavfi: add an audio buffer sink. 2012-05-14 21:36:11 +02:00
Anton Khirnov 4c66c40718 lavfi: add an audio buffer source. 2012-05-14 21:36:11 +02:00
Anton Khirnov 720c6b78d1 buffersrc: add av_buffersrc_write_frame().
It's the same as av_vsrc_buffer_add_frame(), except it doesn't take pts
or pixel_aspect parameters. Those are read from AVFrame.

Deprecate av_vsrc_buffer_add_frame().
2012-05-14 21:36:11 +02:00
Anton Khirnov 8b05e13df3 buffersrc: fix invalid read in uninit if the fifo hasn't been allocated 2012-05-14 21:36:10 +02:00
Anton Khirnov fad729fa50 lavfi: rename vsrc_buffer.c to buffersrc.c
Most of the code will be shared for both audio and video version.
2012-05-14 21:36:10 +02:00
Anton Khirnov fd127ede62 avfiltergraph: reindent 2012-05-14 21:36:10 +02:00
Anton Khirnov ff1f51a8aa lavfi: add channel layout/sample rate negotiation. 2012-05-14 21:36:10 +02:00
Anton Khirnov 5775a1832c lavfi: add types and functions for channel layout/samplerate negotiation 2012-05-14 21:36:10 +02:00
Robert Nagy 394a0267ab yadif: Flush filter on eof.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-14 21:36:10 +02:00
Robert Nagy 7dd56d411e yadif: Improve pts accuracy.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-14 21:36:10 +02:00
Nicolas George 440af105f2 lavfi: add avfilter_graph_set_auto_convert(). 2012-05-14 21:29:58 +02:00
Nicolas George 7a44223319 lavfi: document filter design subtleties.
The details on reference ownership and permissions are missing.
2012-05-14 18:56:52 +02:00
Michael Niedermayer 1caf614bec Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavfi: autoinsert resample filter when necessary.
  lavfi: add lavr-based audio resampling filter.
  x86: vc1: drop MMX loop filter implementation, which uses MMX2 instructions.

Conflicts:
	configure
	doc/filters.texi
	libavcodec/x86/vc1dsp_mmx.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfiltergraph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-13 00:13:49 +02:00
Michael Niedermayer ad6f006081 avfilter: fix regression since addition of extended_data to audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-12 23:46:43 +02:00
Anton Khirnov 012f04a277 lavfi: autoinsert resample filter when necessary. 2012-05-12 18:09:29 +02:00
Anton Khirnov d371e7b988 lavfi: add lavr-based audio resampling filter. 2012-05-12 18:09:28 +02:00
Clément Bœsch 4522df52aa lavfi: remove audio.h include from avfilter.h.
avfilter.h is a public header and the unexported audio.h header contains
only internal prototypes.
2012-05-12 17:59:41 +02:00
Michael Niedermayer 44391f706b lavfutils: ff_load_image: Initialize context
should fix  ticket1264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-11 15:07:26 +02:00
Michael Niedermayer 015903294c Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits)
  rv40dsp x86: MMX/MMX2/3DNow/SSE2/SSSE3 implementations of MC
  ape: Use unsigned integer maths
  arm: dsputil: fix overreads in put/avg_pixels functions
  h264: K&R formatting cosmetics for header files (part II/II)
  h264: K&R formatting cosmetics for header files (part I/II)
  rtmp: Implement check bandwidth notification.
  rtmp: Support 'rtmp_swfurl', an option which specifies the URL of the SWF player.
  rtmp: Support 'rtmp_flashver', an option which overrides the version of the Flash plugin.
  rtmp: Support 'rtmp_tcurl', an option which overrides the URL of the target stream.
  cmdutils: Add fallback case to switch in check_stream_specifier().
  sctp: be consistent with socket option level
  configure: Add _XOPEN_SOURCE=600 to Solaris preprocessor flags.
  vcr1enc: drop pointless empty encode_init() wrapper function
  vcr1: drop pointless write-only AVCodecContext member from VCR1Context
  vcr1: group encoder code together to save #ifdefs
  vcr1: cosmetics: K&R prettyprinting, typos, parentheses, dead code, comments
  mov: make one comment slightly more specific
  lavr: replace the SSE version of ff_conv_fltp_to_flt_6ch() with SSE4 and AVX
  lavfi: move audio-related functions to a separate file.
  lavfi: remove some audio-related function from public API.
  ...

Conflicts:
	cmdutils.c
	libavcodec/h264.h
	libavcodec/h264_mvpred.h
	libavcodec/vcr1.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/defaults.c
	libavfilter/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 23:30:42 +02:00
Michael Niedermayer 2a793ff2bf vf_lut: fix pointer type (const) warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 20:09:37 +02:00
Michael Niedermayer 98e409ecaa vf_idet: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 20:07:23 +02:00
Michael Niedermayer 648dbae519 vf_idet: fix pointer type (const) warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 20:07:20 +02:00
Michael Niedermayer 7610dee87b avfiltergraph: improve pick_format()
without this the recent changes to format/sink handling would cause a regression in fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 02:25:48 +02:00
Michael Niedermayer 61930bd0d7 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  libxvid: Give more suitable names to libxvid-related files.
  libxvid: Separate libxvid encoder from libxvid rate control code.
  jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse().
  fate: cosmetics: lowercase some comments
  fate: Give more consistent names to some RealVideo/RealAudio tests.
  lavfi: add avfilter_get_audio_buffer_ref_from_arrays().
  lavfi: add extended_data to AVFilterBuffer.
  lavc: check that extended_data is properly set in avcodec_encode_audio2().
  lavc: pad last audio frame with silence when needed.
  samplefmt: add a function for filling a buffer with silence.
  samplefmt: add a function for copying audio samples.
  lavr: do not try to copy to uninitialized output audio data.
  lavr: make avresample_read() with NULL output discard samples.
  fate: split idroq audio and video into separate tests
  fate: improve dependencies
  fate: add convenient shorthands for ea-vp6, libavcodec, libavutil tests
  fate: split some combined tests into separate audio and video tests
  fate: fix dependencies for probe tests
  mips: intreadwrite: fix inline asm for gcc 4.8
  mips: intreadwrite: remove unnecessary inline asm
  ...

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	doc/filters.texi
	ffmpeg.c
	ffplay.c
	libavcodec/internal.h
	libavcodec/jpeglsdec.c
	libavcodec/libschroedingerdec.c
	libavcodec/libxvid.c
	libavcodec/libxvid_rc.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersink.h
	tests/Makefile
	tests/fate/aac.mak
	tests/fate/audio.mak
	tests/fate/demux.mak
	tests/fate/ea.mak
	tests/fate/image.mak
	tests/fate/libavutil.mak
	tests/fate/lossless-audio.mak
	tests/fate/lossless-video.mak
	tests/fate/microsoft.mak
	tests/fate/qt.mak
	tests/fate/real.mak
	tests/fate/screen.mak
	tests/fate/video.mak
	tests/fate/voice.mak
	tests/fate/vqf.mak
	tests/ref/fate/ea-mad
	tests/ref/fate/ea-tqi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 02:25:41 +02:00
Anton Khirnov 0b45334a58 lavfi: move audio-related functions to a separate file.
This is easier to follow than having them randomly scattered in
avfilter.c and defaults.c.
2012-05-09 20:32:49 +02:00
Anton Khirnov 472fb3bbfa lavfi: remove some audio-related function from public API.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.

This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
2012-05-09 20:31:56 +02:00
Anton Khirnov f20ab492ac lavfi: change AVFilterLink.sample_rate from int64_t to int on next bump
There is no real reason for it to be 64bit, it's just a plain int in the
rest of Libav.
2012-05-09 20:31:26 +02:00
Anton Khirnov a6bdfc2a92 lavfi: change AVFilterBufferRefAudioProps.sample_rate from uint32_t to int
There's no reason for it to be explicitly 32 bits. It's declared as a
plain int in all other places in Libav.

This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
2012-05-09 20:30:28 +02:00
Stefano Sabatini 7ef0adcc2e lavfi: simplify signature for avfilter_get_audio_buffer() and friends
The additional parameters are just complicating the function interface.

Assume that a requested samples buffer will *always* have the format
specified in the requested link.

This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-09 20:29:53 +02:00
Stefano Sabatini 6735534f19 lavfi: use avfilter_get_audio_buffer_ref_from_arrays() in avfilter_default_get_audio_buffer 2012-05-09 20:28:56 +02:00
Stefano Sabatini e727bca392 lavfi: cleanup avfilter_get_audio_buffer() and pals.
Remove AVFilterBufferRefAudioProps.size, and use nb_samples in its place
everywhere.
This is required as the size in the audio buffer may be aligned, so it
may not contain a well defined number of samples.

Also remove the useless planar parameter, which can be deduced from the
sample format.

This is technically an API and ABI break, but since the audio part of
lavfi is not usable now, this should not be a problem in practice.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-09 20:26:19 +02:00
Michael Niedermayer 1ca37e79d0 src_buffer: ifdef->if CONFIG_*
Reviewed-by: Stefano
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-09 18:24:15 +02:00
Stefano Sabatini 1b8c9271bd lavfi: add avfilter_get_audio_buffer_ref_from_arrays().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-09 17:51:13 +02:00
Anton Khirnov 9453c9e1de lavfi: add extended_data to AVFilterBuffer.
This is similar to what has previously been done in AVFrame to allow
dealing with more than 8 channels.
2012-05-09 17:47:53 +02:00
Anton Khirnov ac71230902 lavfi: add video buffer sink, and use it in avtools
Also add the public interface libavfilter/buffersink.h.

Based on a commit by Stefano Sabatini.
2012-05-09 08:59:37 +02:00
Anton Khirnov ab165047a6 lavfi: add a function for copying properties from AVFilterBufferRef->AVFrame
Based on a commit by Stefano Sabatini <stefano.sabatini-lala@poste.it>
2012-05-09 08:49:36 +02:00
Nicolas George 75e0324eab src_buffer: move code to avoid forward declarations. 2012-05-08 19:38:18 +02:00
Carl Eugen Hoyos 29fe6b3cbf Add yuva422p to yadif format list. 2012-05-08 10:36:47 +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
Anton Khirnov 8134fafe9b lavfi: uninline avfilter_copy_buffer_ref_props().
A nontrivial public function such as this should most certainly NOT be
inline.
2012-05-07 14:23:36 +02:00
Diego Biurrun dbe6ba55a3 build: cosmetics: Add missing end-of-line backslashes to item lists. 2012-05-07 14:17:40 +02:00
Diego Biurrun 9eb83a56aa build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line. 2012-05-07 14:01:32 +02:00
Robert Nagy a07578f3f2 vf_yadif: fix missing error handling for avfilter_poll_frame() 2012-05-07 10:26:57 +02:00
Anton Khirnov 0bbd874743 lavfi: support audio in avfilter_copy_frame_props(). 2012-05-07 07:10:48 +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
Robert Nagy 4f5c5416ca yadif: Add yuva444p to format list.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-07 00:06:10 +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
Stefano Sabatini f10530b78a lavfi: remove avfilter_default_config_input_link() declaration
The function is not implemented (and possibly useless).
2012-05-06 16:26:41 +02:00
Anton Khirnov 25b3babe11 lavfi: always enable the scale filter and depend on sws.
The scale filter is used for internal colorspace conversions, so it must
always be present.
2012-05-06 16:22:29 +02:00
Anton Khirnov fd18ee0ff6 vf_split: support user-specifiable number of outputs. 2012-05-06 16:21:00 +02:00
Nicolas George 67a316bbda vsrc_buffer: deprecate the header. 2012-05-06 16:18:11 +02:00
Nicolas George aaa94f2890 vsrc_buffer: deprecate av_vsrc_buffer_add_video_buffer_ref. 2012-05-06 16:18:10 +02:00
Nicolas George 4d4350f47a src_buffer: update get_nb_failed_requests name.
Implement av_buffersrc_get_nb_failed_requests.
Deprecate av_vsrc_buffer_get_nb_failed_requests.
2012-05-06 16:18:10 +02:00
Nicolas George fe511b6e32 asrc_abuffer: deprecate the header. 2012-05-06 16:18:10 +02:00
Nicolas George 675e83bb5c asrc_abuffer: deprecate av_asrc_buffer_* functions. 2012-05-06 16:18:10 +02:00
Nicolas George 6073ce71d0 lavfi: install buffersrc.h. 2012-05-06 16:18:10 +02:00
Nicolas George 317b2b7e92 lavfi: remove av_buffersrc_buffer.
It is no longer used anywhere.

Furthermore, the header it was declared in was not installed,
so it can not be considered part of the public API.
2012-05-06 16:18:10 +02:00
Nicolas George 8ad1964ec5 buffersrc: fix av_buffersrc_add_ref doxy.
av_buffersrc_add_ref can handle audio too now.
2012-05-06 16:18:10 +02:00
Nicolas George 5cb4f1a127 vsrc_buffer: return EAGAIN if no frame is available.
This is not an erroneous condition, do not print a warning.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-05-05 12:59:18 +02:00
Nicolas George 7bac2a78c2 src_buffer: implement av_buffersrc_add_frame.
It supersedes av_vsrc_buffer_add_frame and handles
both audio and video.
2012-05-04 23:26:40 +02:00
Nicolas George a96cd73ff2 src_buffer: implement audio buffer copy. 2012-05-04 23:26:40 +02:00
Nicolas George d8407bba0e lavfi/avcodec: implement audio copy_frame_prop. 2012-05-04 23:26:40 +02:00
Nicolas George 32094285ad lavfi: implement avfilter_get_audio_buffer_ref_from_frame. 2012-05-04 23:26:40 +02:00
Clément Bœsch 3c1d52d30b Fix a few @file doxy inconsistencies. 2012-05-04 18:50:59 +02:00
Clément Bœsch af58a77f0a lavfi/src_buffer: fix indent. 2012-05-03 20:02:26 +02:00
Nicolas George f8d58c594d src_buffer: merge av_asrc_buffer_add_audio_buffer_ref.
Implement it using av_buffersrc_add_ref.
2012-05-03 19:55:28 +02:00
Nicolas George be8edff8d1 src_buffer: move audio format change check in a separate function. 2012-05-03 19:55:28 +02:00
Nicolas George cc14cdec45 src_buffer: move buffer copy in a separate function.
This will make merging with the audio part easier.
2012-05-03 19:55:28 +02:00
Nicolas George f94b150a03 src_buffer: move format change check in a separate function.
This will make merging the check with the audio part easier.
2012-05-03 19:55:28 +02:00
Nicolas George 3985ec0ee6 src_buffer: introduce av_buffersrc_add_ref().
This function merges the features of
av_vsrc_buffer_add_video_buffer_ref() and
av_buffersrc_buffer().
2012-05-03 19:55:28 +02:00
Stefano Sabatini 126ba1626e lavfi/drawtext: give a new alias "timecode_rate" to the the r/rate option
The option is related to the timecode, the new name clearly specifies the
context. Also it allows to list the option close to the other timecode
options.
2012-05-03 10:29:08 +02:00
Stefano Sabatini eb07f4ccb5 lavfi/drawtext: rename and document variables d_expr and d_pexpr
Use the more expressive names draw_expr and draw_pexpr, also more
consistent.
2012-05-03 10:26:41 +02:00
Stefano Sabatini 65d2b2fbe4 lavfi/drawtext: alphabetically sort the expression parameters 2012-05-03 10:17:57 +02:00
Paul B Mahol 2cda0429aa lavfi: remove screenshot libmpcodecs wrapper
The filter is useless.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-02 18:15:29 +02:00
Stefano Sabatini bb39c74b59 lavfi/lut: remove unused variable
Fix warning:
libavfilter/vf_lut.c: In function ‘draw_slice’:
libavfilter/vf_lut.c:297:15: warning: unused variable ‘k’ [-Wunused-variable]
2012-05-01 01:24:48 +02:00
Stefano Sabatini 5f161c2357 lavfi/tinterlace: support symbolic names for the parameter
Also deprecate the use of numerical values.
2012-04-30 23:04:46 +02:00
Stefano Sabatini 837d034787 lavfi/tinterlace: make video as interlaced in mode 6
This is useful for marking progressive video processed by the filter as
interlaced, avoiding the interlaced flag to switch back and forth at each
frame.
2012-04-30 23:04:46 +02:00
Stuart Morris 820c023142 lavfi/tinterlace: add tinterlace mode 6
This new mode is useful for generating frames for interlaced video
displays. Typically interlaced video displays have no form of field
synchronisation. This new mode guarantees correct field order without
any requirement for field synchronisation.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-30 23:04:46 +02:00
Stefano Sabatini 46eba43e0e lavfi/buffersink: fix header inclusion guard name 2012-04-29 18:46:59 +02:00
Nicolas George f1b82099cd src_buffer: add forgotten avfilter_unref_buffer. 2012-04-28 19:37:57 +02:00
Nicolas George 75d5624cb2 avfilter: filter_samples: read pts before filtering.
The call to the next filter_sample will likely unref the
current buffer, so it is not possible to read it afterwards.
2012-04-28 18:48:12 +02:00
Nicolas George 2ae5af8094 lavfi: rename vsrc_buffer.c into src_buffer.c. 2012-04-28 09:59:13 +02:00
Nicolas George 7ad0d9864e lavfi: merge asrc_abuffer into vsrc_buffer. 2012-04-28 09:59:13 +02:00
Stefano Sabatini 18c6bd098b lavfi/tinterlace: remove unnecessary NULL check in start_frame() 2012-04-27 22:45:11 +02:00
Stefano Sabatini cf9f7e40cc lavfi/tinterlace: use avfilter_unref_bufferp() 2012-04-27 22:45:11 +02:00
Stefano Sabatini a853e88af2 lavfi/tinterlace: fix doxy in copy_picture_field() 2012-04-27 22:45:10 +02:00
Matthieu Bouron 73c1e3baad asrc_abuffer: return EAGAIN if no frame is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-27 22:11:00 +02:00
Stefano Sabatini 6b55aab01a lavfi: create buffer reference in filters which need to access the ref later
Also add internal function ff_null_start_frame_keep_ref().

Fix crash when a following filter (e.g. settb) will unref the reference
passed by start_frame(), and then the reference is accessed in
end_frame() through inlink->cur_buf.
2012-04-27 21:38:13 +02:00
Stefano Sabatini 6f3b1d7f86 lavfi/bbox: add missing space between pts and x1 values in the log 2012-04-27 21:33:42 +02:00
Matthieu Bouron 5473a98e45 af_amerge: return errors from subfilters when requesting a frame 2012-04-26 18:56:35 +02:00
Nicolas George fd2cd64fc9 avfiltergraph: fix format selection.
The old code had two bugs:

For audio filters, the format was not set.

For video filters, if several links reference the same format list,
the same format must be selected in the end. This is done by
setting formats->format_count to 1: the other links sharing
the reference will therefore have only one choice.
If the heuristic does not pick the first format, the selected format
must also be moved to the first position.
2012-04-24 16:35:15 +02:00
Nicolas George 2e8f19d26f avfiltergraph: free the sink_links heap. 2012-04-23 23:36:33 +02:00
Nicolas George e11110dee4 buffersink: add AV_BUFFERSINK_FLAG_NO_REQUEST. 2012-04-23 14:13:59 +02:00
Nicolas George 2d6522bab0 vsrc_buffer: count the number of failed requests. 2012-04-23 14:13:40 +02:00
Nicolas George f75ee4031e vsrc_buffer: return EAGAIN if no frame is available.
This is not an erroneous condition, do not print a warning.
2012-04-23 14:13:40 +02:00
Nicolas George 2ce7972779 avfiltergraph: add avfilter_graph_request_oldest().
Keep a heap of all sink links ordered by timestamps.
2012-04-23 14:13:40 +02:00
Nicolas George e0761feec4 avfilter: add a pointer from links to graph. 2012-04-23 14:13:40 +02:00
Nicolas George 78ac49c233 avfilter: document request_frame return codes. 2012-04-23 14:13:40 +02:00
Stefano Sabatini dd3043d1c0 lavfi/setfield: remove stray argument in av_log()
Fix warning:
libavfilter/vf_setfield.c: In function ‘init’:
libavfilter/vf_setfield.c:64:20: warning: too many arguments for format [-Wformat-extra-args]
2012-04-21 12:32:50 +02:00
Stefano Sabatini 459414b4d9 lavfi/setfield: rename variable top_field_first to mode
The new name better reflects the meaning of the variable, after the
recent change.
2012-04-21 12:32:38 +02:00
Tim Nicholson c97201dd29 lavfi/setfield: add "progressive" option
Add "prog" parameter value, and deprecate numeric values.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-21 10:09:49 +02:00
Stefano Sabatini 9750254885 lavfi/mp: remove libmpcodecs mirror filter
The native libavfilter hflip filter does the same thing.
2012-04-20 01:01:24 +02:00
Robert Nagy 65fa7bc1f8 lavfi: add avfilter_unref_bufferp()
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-20 01:01:17 +02:00
Robert Nagy e90dfa6881 yadif: Improve pts calculation for is_second.
Tested-by: Robert Nagy <ronag89@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 19:41:16 +02:00
Robert Nagy a80217a5ee copy pts and format props between lavfi buffer and frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 16:07:23 +02:00
Michael Niedermayer 15141f939d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo3: add parens around some macro arguments
  h264: use proper PROLOGUE statement for a function using 8 registers.
  doc: Update sample Vim config with suitable (function) indentation settings.
  dv: Merge dvquant.h into dvdata.c where all other DV tables reside.
  dv: Move static tables only used in one place to where they are used.
  graphparser: set next to NULL on an entry extracted from inputs list
  doc/filters: update documentation.
  avconv: flush decoders immediately after an EOF.
  avconv: send EOF to vsrc_buffer.
  avconv: reindent.

Conflicts:
	doc/filters.texi
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 12:13:22 +02:00
Michael Niedermayer 5cd460ba63 vsrc_buffer: fix null ptr segfault
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 04:06:06 +02:00
Michael Niedermayer 0d115d7799 avfiltergraph: More advanced heuristic to select colorspace.
This fixes regressions caused by switching from ffmpegs system to avfilters.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 04:05:56 +02:00
Michael Niedermayer 4778783160 Merge commit '3b266da3d35f3f7a61258b78384dfe920d875d29'
* commit '3b266da3d35f3f7a61258b78384dfe920d875d29':
  avconv: add support for complex filtergraphs.
  avconv: make filtergraphs global.
  avconv: move filtered_frame from InputStream to OutputStream.
  avconv: don't set output width/height directly from input value.
  avconv: move resample_{width,height,pix_fmt} to InputStream.
  avconv: remove a useless variable from OutputStream.
  avconv: get output pixel format from lavfi.
  graphparser: fix the order in which unlabeled input links are returned.
  avconv: change {input,output}_{streams,files} into arrays of pointers.
  avconv: don't pass input/output streams to some functions.

Conflicts:
	cmdutils.c
	cmdutils.h
	doc/ffmpeg.texi
	ffmpeg.c
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 04:03:50 +02:00
Anton Khirnov aff01de641 graphparser: set next to NULL on an entry extracted from inputs list
Prevents it from referring to the rest of the list.
2012-04-16 09:28:34 +02:00
Robert Nagy ed66bbfcb9 lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-04-16 01:08:00 +02:00
Robert Nagy 4d84c7ded6 yadif: fixed missing error handling for poll_frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-15 23:44:38 +02:00
Anton Khirnov 7af99a01c4 graphparser: fix the order in which unlabeled input links are returned. 2012-04-15 20:20:03 +02:00
Michael Niedermayer 7432bcfe5a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vsrc_buffer: fix check from 7ae7c41.
  libxvid: Reorder functions to avoid forward declarations; make functions static.
  libxvid: drop some pointless dead code
  wmal: vertical alignment cosmetics
  wmal: Warn about missing bitstream splicing feature and ask for sample.
  wmal: Skip seekable_frame_in_packet.
  wmal: Drop unused variable num_possible_block_size.
  avfiltergraph: make the AVFilterInOut alloc/free API public
  graphparser: allow specifying sws flags in the graph description.
  graphparser: fix the order of connecting unlabeled links.
  graphparser: add avfilter_graph_parse2().
  vsrc_buffer: allow using a NULL buffer to signal EOF.
  swscale: handle last pixel if lines have an odd width.
  qdm2: fix a dubious pointer cast
  WMAL: Do not try to read rawpcm coefficients if bits is invalid
  mov: Fix detecting there is no sync sample.
  tiffdec: K&R cosmetics
  avf: has_duration does not check the global one
  dsputil: fix optimized emu_edge function on Win64.

Conflicts:
	doc/APIchanges
	libavcodec/libxvid_rc.c
	libavcodec/libxvidff.c
	libavcodec/tiff.c
	libavcodec/wmalosslessdec.c
	libavfilter/avfiltergraph.h
	libavfilter/graphparser.c
	libavfilter/version.h
	libavfilter/vsrc_buffer.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 22:37:43 +02:00
Anton Khirnov 7bf9e3391f vsrc_buffer: fix check from 7ae7c41.
The user submitted variable in this function is frame, not buf.
2012-04-14 18:58:20 +02:00
Stefano Sabatini 91d3cbe0fd avfiltergraph: make the AVFilterInOut alloc/free API public
This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-04-14 09:25:46 +02:00
Anton Khirnov 12e7e1d03e graphparser: allow specifying sws flags in the graph description. 2012-04-14 09:25:46 +02:00
Anton Khirnov 4e781c25b7 graphparser: fix the order of connecting unlabeled links.
Right now, e.g. scale,[in]overlay would connect scale to the first
overlay input and [in] to the second, which goes against the
documentation and is unintuitive.

The bug happens because of the ordering mess in curr_inputs variable:
1) the unlabeled links from the previous filter are added to it in
correct order
2) input labels are parsed and inserted to the beginning one by one
(i.e. in reverse order)
3) curr_inputs is matched against filter inputs in reverse order

Fix the problem by always using proper ordering without trying to be
clever.
2012-04-14 09:25:46 +02:00
Anton Khirnov d7bcc71dad graphparser: add avfilter_graph_parse2().
Unlike avfilter_graph_parse(), it returns unlinked inputs and outputs
to the caller, which allows parsing of graphs where inputs/outputs are
not known in advance.
2012-04-14 09:25:46 +02:00
Anton Khirnov 7ae7c41413 vsrc_buffer: allow using a NULL buffer to signal EOF. 2012-04-14 09:25:46 +02:00
Clément Bœsch 3f80546d75 lavfi/drawbox: fix width displayed in place of x. 2012-04-13 23:15:54 +02:00
Stefano Sabatini 5eeecde859 lavfi/mp: remove 2xsai wrapped filter
It was ported to a native libavfilter filter.
2012-04-13 00:14:06 +02:00
Stefano Sabatini b7a7830dd4 lavfi: port 2xsai filter from libmpcodecs
Partially based on the port by Niel van der Westhuizen
<nielkie@gmail.com>, done for GCI 2010. Same output as the original
filter and as fast.

See thread:
Subject: [FFmpeg-devel] [PATCH] Port MPlayer 2xSaI filter to libavfilter
Date: Thu, 25 Nov 2010 01:31:24 +1000
2012-04-13 00:14:06 +02:00
Stefano Sabatini 162e400464 lavfi: install asrc_abuffer.h header
The header is part of the public API, in particular is used by
doc/examples/filtering_audio.c.
2012-04-13 00:13:30 +02:00
Michael Niedermayer c0af87550a vf_lut: fix rgba map regression
Fixes Ticket1184

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 02:02:30 +02:00
Michael Niedermayer e387c9d5dd Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  rv40dsp x86: use only one register, for both increment and loop counter
  rv40dsp: implement prescaled versions for biweight.
  avconv: use default channel layouts when they are unknown
  avconv: parse channel layout string
  nutdec: K&R formatting cosmetics
  vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
  mem: Consistently return NULL for av_malloc(0)
  vf_overlay: implement poll_frame()
  vf_scale: support named constants for sws flags.
  lavc doxy: add all installed headers to doxy groups.
  lavc doxy: add avfft to the main lavc group.
  lavc doxy: add remaining avcodec.h functions to a misc doxygen group.
  lavc doxy: add AVPicture functions to a doxy group.
  lavc doxy: add resampling functions to a doxy group.
  lavc doxy: replace \ with /
  lavc doxy: add encoding functions to a doxy group.
  lavc doxy: add decoding functions to a doxy group.
  lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
  lavc doxy: add AVPacket-related stuff to a separate doxy group.
  lavc doxy: add core functions/definitions to a doxy group.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/avcodec.h
	libavcodec/vda.c
	libavcodec/x86/rv40dsp.asm
	libavfilter/vf_scale.c
	libavformat/nutdec.c
	libavutil/mem.c
	tests/ref/acodec/pcm_s24daud

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 22:53:25 +02:00
Nicolas George 40b7a27bad vf_drawtext: fontconfig support. 2012-04-10 15:16:47 +02:00
Nicolas George be9b0d2c5a vf_drawtext: fix memory leak of draw expression. 2012-04-10 15:16:12 +02:00
Nicolas George 423047ea31 vf_drawtext: fix memory leak of glyph data. 2012-04-10 15:16:12 +02:00
Anton Khirnov e36b25d1df vf_overlay: implement poll_frame()
Signal that it can output a frame when there are frames on the main
input and EOF on the overlay input, but a frame is buffered -- e.g.
single picture overlay.
2012-04-09 21:30:21 +02:00
Anton Khirnov 90f65dc6cf vf_scale: support named constants for sws flags. 2012-04-09 21:29:05 +02:00
Reimar Döffinger 6458a08700 vf_scale: ensure the palette is set for output.
Since those are pseudo-palette formats, swscale does not write
into data[1], swscale must initialize the palette properly itself.
This lead to frames that actually decoded as all-gray before.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:35 +02:00
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>
2012-04-09 17:21:35 +02:00
Reimar Döffinger bbaf941e29 scale: fix slice rendering with conversion between pal/non-pal.
We can't use whether the input format is paletted to decide that
the output format has a palette in data[1], too, that makes no sense.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-09 17:21:35 +02:00
Stefano Sabatini 6cb01c9dba lavfi/mp: remove remove_logo wrapper
removelogo has been ported to libavfilter, and the wrapper was not
working.
2012-04-07 13:57:39 +02:00
Stefano Sabatini 2f83681c79 lavfi: port libmpcodecs remove-logo filter
The code is based on the remove-logo filter in MPlayer/libmpcodecs, by
Robert Edele, relicensed to LGPL with consent of the author.

Address trac issue #249.
2012-04-07 13:57:39 +02:00
Michael Niedermayer 25eae29ea1 vsrc_buffer: remove overwrite support.
the overwrite flag became unused when merging support for buffering
multiple frames.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 11:01:22 +02:00
Michael Niedermayer 2c5a2958e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: Factorize declaration of mb_sizes array.
  vsrc_buffer: when no frame is available, return an error instead of segfaulting.
  configure: add dl to frei0r extralibs.
  dsputil x86: use SSE float instruction instead of SSE2 integer equivalent
  dsputil x86: remove deprecated parameter from scalarproduct_int16 prototype
  vp8dsp x86: perform rounding shift with a single instruction
  fate: add BMP tests.
  swscale: handle complete dimensions for monoblack/white.
  aacenc: Mark deinterleave_input_samples argument as const.
  vf_unsharp: Mark readonly variable as const.
  h264: fix 4:2:2 PCM-macroblocks decoding

Conflicts:
	configure
	libavcodec/h264.h
	libavcodec/x86/dsputil_mmx.c
	libavfilter/vf_unsharp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-05 22:26:50 +02:00
Anton Khirnov a03f8ea0a8 vsrc_buffer: when no frame is available, return an error instead of segfaulting. 2012-04-05 09:30:09 +02:00
Michael Niedermayer fa1f92a4f1 vf_idet: clean detected frame types based on a 4 frame history.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-05 09:11:15 +02:00