Commit Graph

118 Commits

Author SHA1 Message Date
Michael Niedermayer 325f6e0a97 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavfi: do not export the filters from shared objects

Conflicts:
	libavfilter/af_amix.c
	libavfilter/af_anull.c
	libavfilter/asrc_anullsrc.c
	libavfilter/f_select.c
	libavfilter/f_settb.c
	libavfilter/split.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_colorbalance.c
	libavfilter/vf_copy.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_format.c
	libavfilter/vf_framestep.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_hflip.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_null.c
	libavfilter/vf_overlay.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_vflip.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-29 11:58:11 +01:00
Anton Khirnov cd43ca0443 lavfi: do not export the filters from shared objects 2013-10-28 15:29:54 +01:00
Benedict Endemann 696aa74b1a lavfi/overlay: correct small error in intersection detection
The image size of the destination image was used to determine if a source
image was positioned outside the destination image, that no intersection
could occur.  Actually for these two cases the size of the source image
has to be used!

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-27 15:01:02 +01:00
Paul B Mahol cd1b22d8e8 avfilter/dualinput: simplify
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-30 08:47:40 +00:00
Nicolas George 231e50157c lavfi/dualinput: reimplement on top of framesync. 2013-09-23 09:50:09 +02:00
Michael Niedermayer 4bc7a2a64b avfilter: remove duplicate includes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 15:36:33 +02:00
Paul B Mahol b211607b5c avfilter: various cosmetics
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-12 14:01:43 +00:00
Paul B Mahol b077d8d908 avfilter: remove redundant .get_(audio/video)_buffer initializations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-07 18:20:16 +00:00
Clément Bœsch 92a2d12a71 lavfi/overlay: remove do_blend forward declaration. 2013-05-27 20:42:46 +02:00
Clément Bœsch 4328602890 lavfi: add dual input helpers. 2013-05-27 20:32:28 +02:00
Michael Niedermayer af00d68af0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vf_pad: use the name 's' for the pointer to the private context
  vf_overlay: use the name 's' for the pointer to the private context
  vf_lut: use the name 's' for the pointer to the private context

Conflicts:
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 17:03:52 +02:00
Anton Khirnov a70519aad1 vf_overlay: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
2013-05-16 07:36:04 +02:00
Clément Bœsch 1776177b7f lavfi: replace passthrough_filter_frame with a flag.
With the introduction of AVFilterContext->is_disabled, we can simplify
the custom passthrough mode in filters.

This commit is technically a small compat break, but the timeline was
introduced very recently.

Doxy by Stefano Sabatini.
2013-05-12 13:07:47 +02:00
Clément Bœsch f0250cc463 lavfi/overlay: simpler up-rounded w/h computations. 2013-05-09 16:59:43 +02:00
Clément Bœsch d3f7b98f87 lavfi/overlay: reindent fix. 2013-05-07 15:43:28 +02:00
Clément Bœsch 15d2f26998 lavfi/overlay: support timeline through the new system. 2013-04-23 01:02:28 +02:00
Clément Bœsch b8a5c76131 lavfi: add frame counter into AVFilterLink and use it in filters. 2013-04-23 01:02:27 +02:00
Michael Niedermayer fd6228e657 lavfi: remove now unused args parameter from AVFilter.init and init_opaque
This is mostly automated global search and replace

The deprecated aconvert filter is disabled, if it still has users
it should be updated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 11:54:39 +02:00
Stefano Sabatini 9da369604e lavfi/overlay: improve feedback in case of invalid expression
Based on vf_hue.c code.
2013-04-12 00:18:39 +02:00
Stefano Sabatini aff6cebb41 lavfi/overlay: fix crash in case of invalid expression 2013-04-12 00:09:41 +02:00
Stefano Sabatini ed2c827575 lavfi/overlay: add repeatlast option 2013-04-12 00:09:19 +02:00
Stefano Sabatini a77454ec14 lavfi/overlay: reindent constants in option list
Wanted-By: ubitux
2013-04-12 00:07:46 +02:00
Clément Bœsch fcaea2170f lavfi/overlay: cleanup unused shorthand. 2013-04-11 12:41:13 +02:00
Paul B Mahol 16f1e832ba lavfi/overlay: remove dupe initializer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-10 20:44:11 +00:00
Michael Niedermayer e434ddd4c6 Merge commit '9087eaf193b8ce99c41352064a81916fa66adb49'
* commit '9087eaf193b8ce99c41352064a81916fa66adb49':
  vf_overlay: switch to an AVOptions-based system.

Conflicts:
	doc/filters.texi
	libavfilter/vf_overlay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-10 22:27:20 +02:00
Stefano Sabatini d2752ef061 lavfi/overlay: add process_command callback 2013-04-10 13:11:27 +02:00
Stefano Sabatini 006e20bd36 lavfi/overlay: add enable expression
This expression is useful to enable/disable overlaying on the fly.

Note that this can't be easily done relying on the filtergraph structure,
since this implies caching issues or a null frame overlaying in the best
case, which is better avoided for performance and convenience reasons.
2013-04-10 13:11:27 +02:00
Stefano Sabatini cc3edd99a6 lavfi/overlay: add dynamic expression evaluation support
Add support for dynamic x, y expressions evaluation.

Also add support for an evaluation mode which allows to disable per-frame
evaluation, so that there is no speedloss in case the expression does not
depend on frame variables.
2013-04-10 13:11:27 +02:00
Anton Khirnov 9087eaf193 vf_overlay: switch to an AVOptions-based system. 2013-04-09 19:06:13 +02:00
Stefano Sabatini 39aad43465 lavfi/overlay: fix debug PTS output in try_filter_frame()
The PTS of the input frames must be interpreted according to the input
timebase, which is not the same as the output timebase.
2013-03-31 18:00:44 +02:00
Clément Bœsch e62587bc5e lavfi/overlay: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 96e4b00d62 lavfi: remove remaining forgotten min/rej perms. 2013-03-10 02:38:21 +01:00
Michael Niedermayer a05a44e205 Merge commit '7e350379f87e7f74420b4813170fe808e2313911'
* commit '7e350379f87e7f74420b4813170fe808e2313911':
  lavfi: switch to AVFrame.

Conflicts:
	doc/filters.texi
	libavfilter/af_ashowinfo.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersink.c
	libavfilter/buffersrc.c
	libavfilter/buffersrc.h
	libavfilter/f_select.c
	libavfilter/f_setpts.c
	libavfilter/fifo.c
	libavfilter/split.c
	libavfilter/src_movie.c
	libavfilter/version.h
	libavfilter/vf_aspect.c
	libavfilter/vf_bbox.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fieldorder.c
	libavfilter/vf_fps.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_vflip.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavfilter/yadif.h

Following are notes about the merge authorship and various technical details.

Michael Niedermayer:
  * Main merge operation, notably avfilter.c and video.c
  * Switch to AVFrame:
    - afade
    - anullsrc
    - apad
    - aresample
    - blackframe
    - deshake
    - idet
    - il
    - mandelbrot
    - mptestsrc
    - noise
    - setfield
    - smartblur
    - tinterlace
  * various merge changes and fixes in:
    - ashowinfo
    - blackdetect
    - field
    - fps
    - select
    - testsrc
    - yadif

Nicolas George:
  * Switch to AVFrame:
    - make rawdec work with refcounted frames. Adapted from commit
      759001c534 by Anton Khirnov.
      Also, fix the use of || instead of | in a flags check.
    - make buffer sink and src, audio and video work all together

Clément Bœsch:
  * Switch to AVFrame:
    - aevalsrc
    - alphaextract
    - blend
    - cellauto
    - colormatrix
    - concat
    - earwax
    - ebur128
    - edgedetect
    - geq
    - histeq
    - histogram
    - hue
    - kerndeint
    - life
    - movie
    - mp (with the help of Michael)
    - overlay
    - pad
    - pan
    - pp
    - pp
    - removelogo
    - sendcmd
    - showspectrum
    - showwaves
    - silencedetect
    - stereo3d
    - subtitles
    - super2xsai
    - swapuv
    - thumbnail
    - tile

Hendrik Leppkes:
  * Switch to AVFrame:
    - aconvert
    - amerge
    - asetnsamples
    - atempo
    - biquads

Matthieu Bouron:
  * Switch to AVFrame
    - alphamerge
    - decimate
    - volumedetect

Stefano Sabatini:
  * Switch to AVFrame:
    - astreamsync
    - flite
    - framestep

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-10 01:40:35 +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
Stefano Sabatini 8d9509377e lavfi/overlay: improve log message warning in case of clipped overlay 2013-03-05 20:09:50 +01:00
Stefano Sabatini f164228fd7 lavfi/overlay: add support for partial overlaying
Partially rework the iteration logic, in order to limit iteration only
for the clipped overlay region.
2013-03-05 20:09:21 +01:00
Michael Niedermayer cfcab4c507 vf_overlay: silence warning: X may be used uninitialized in this function
Also ensure that format is valid in query_formats

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-23 12:10:35 +01:00
Stefano Sabatini 22b06103f0 lavfi/overlay: add format option
In particular, fix misbehavior in case main and overlay input formats
mismatch (e.g. YUV420 and YUV444).
2013-02-20 19:39:40 +01:00
Stefano Sabatini 2db0056f96 lavfi/overlay: apply minor consistency fixes 2013-02-20 19:18:17 +01:00
Stefano Sabatini 3d77a27548 lavfi/overlay: implement shortest option
Force termination when the overlay stream ends. Simplify scripting logic,
for example when an infinite source is used to generate a background for
a composite video.
2013-02-20 19:17:11 +01:00
Paul B Mahol f2d200d460 lavfi/overlay: yuv444p & yuva444p support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-19 11:11:42 +00:00
Nicolas George 7e5c5fa5fc lavfi/vf_overlay: check that filter_frame does not return EAGAIN.
EAGAIN is used internally in the code; it currently does not make
sense as a return code from the next filter.

Should fix CID966655.
2013-01-10 21:55:02 +01:00
Stefano Sabatini bde1e8bf06 lavfi/overlay: make use of av_opt_set_from_string()
Simplify.
2012-12-22 16:14:23 +01:00
Stefano Sabatini 5e402a5319 lavfi/overlay: switch to filter_frame API 2012-12-22 16:12:26 +01:00
Paul B Mahol 185d1f3bfc lavfi: declare arrays that never change as static const
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-12-21 22:38:59 +00:00
Stefano Sabatini 54b0c04ae3 lavfi/overlay: clarify/fix comment, add a few empty lines to ease readability 2012-12-15 14:08:42 +01:00
Stefano Sabatini 3d1e2ada25 lavfi/overlay: remove duplicated definition of ff_null_get_video_buffer()
Simplify.
2012-12-15 13:51:24 +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
Mark Himsley 13c6252536 lavfi/overlay: enable yuva420p as overlay background
Same calculation as for RGBA etc to create unpremultiplied output.
Useful for creating an intermediate "Mix/Effects bank", in vision mixer
(switcher) terminology.

Example command:

ffmpeg -i input.mov -vf
"[in]scale=iw:ih:interl=1,format=yuv420p[bg];movie=BBC_blocks_watermark.png,scale=iw:ih:interl=1,format=yuva420p[dog];movie=Kickabout_strap.mov,scale=iw:ih:interl=1,format=yuva420p[strap];[strap][dog]overlay=0:0[me1];[bg][me1]overlay=0:0,scale=0:0:interl=1[out]"
-b:v 3M -an output.mov

Fix trac ticket #549.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-11-27 10:44:42 +01:00
Hendrik Leppkes 79393a8363 Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 18:00:13 +02:00