Commit Graph

47 Commits

Author SHA1 Message Date
Derek Buitenhuis 21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Ganesh Ajjanagadde 8507b98c10 avfilter,swresample,swscale: use fabs, fabsf instead of FFABS
It is well known that fabs and fabsf are at least as fast and sometimes
faster than the FFABS macro, at least on the gcc+glibc combination.
For instance, see the reference:
http://patchwork.sourceware.org/patch/6735/.
This was a patch to glibc in order to remove their usages of a macro.

The reason essentially boils down to fabs using the __builtin_fabs of
the compiler, while FFABS needs to infer to not use a branch and to
simply change the sign bit. Usually the inference works, but sometimes
it does not. This may be easily checked by looking at the asm.

This also has the added benefit of reducing macro usage, which has
problems with side-effects.

Note that avcodec is not handled here, as it is huge and
most things there are integer arithmetic anyway.

Tested with FATE.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-22 16:13:26 -04:00
Paul B Mahol 5e0abf59d8 avfilter/vf_blend: fix normal mode with opacity != 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-09 12:12:03 +02:00
Michael Niedermayer fd9a528523 avfilter/vf_blend: Fix argument types, fix segfault in asm
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 21:59:24 +02:00
Paul B Mahol 9762554dd0 avfilter/vf_blend: add x86 SIMD for some modes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-03 21:26:17 +02:00
Paul B Mahol 4cf60b4fa1 avfilter/vf_blend: add addition128 mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-26 15:32:56 +02:00
Nicolas George 44f660e7e7 lavfi: remove FF_LINK_FLAG_REQUEST_LOOP.
It has no longer any effect.
2015-09-20 19:02:33 +02:00
Clément Bœsch 7a29d10839 avfilter/blend: use AV_OPT_TYPE_BOOL for shortest and repeatlast options 2015-09-08 23:43:54 +02:00
Hendrik Leppkes 5d8e836d0e Replace all remaining occurances of step/depth_minus1 and offset_plus1 2015-09-08 17:10:48 +02:00
Paul B Mahol e030d3c61f avfilter/vf_blend: use the name 's' for the pointer to the private context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-08-25 18:16:55 +00:00
Paul B Mahol 9a829a2b6a avfilter/vf_blend: unbreak tblend
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-18 05:01:16 +00:00
Paul B Mahol efd4e5fe68 avfilter/vf_blend: implement 16bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-18 02:07:44 +00:00
Paul B Mahol b8c0cf7880 avfilter/vf_blend: add linearlight and glow mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-03 12:40:09 +00:00
Paul B Mahol 3e04746ec3 avfilter/vf_blend: add hardmix mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-02 19:12:45 +00:00
Paul B Mahol 20cea0c7de avfilter/vf_blend: fix vividlight blend mode
Pointed-out-by: Rudolf Polzer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-02 18:55:24 +00:00
Paul B Mahol ac973926b8 avfilter/vf_blend: clip result for divide blend mode
Pointed-out-by: Rudolf Polzer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-02 18:48:32 +00:00
Paul B Mahol a0854c084e avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-04-08 13:05:06 +00:00
Clément Bœsch f5cbb2c55e avfilter/vf_tblend: use av_frame_free for freeing an AVFrame 2015-03-02 21:27:21 +01:00
Paul B Mahol 91bdb24400 libavfilter/vf_blend: do not unconditionally compile both filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-01-05 14:14:54 +00:00
Michael Niedermayer ed96830afc avfilter/vf_blend: Fix AVClass
Fixes infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 19:01:07 +01:00
Stefano Sabatini d4fd3f24e8 lavfi: add tblend filter 2014-12-27 16:15:24 +01:00
Stefano Sabatini afaa4a8946 lavfi/blend: add difference128 mode 2014-12-26 11:24:48 +01:00
Michael Niedermayer 9b33cdcab2 avfilter/vf_blend: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 20:49:00 +02:00
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
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
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 9635806265 lavfi/blend: use dual input helpers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-06 04:58:34 +00:00
Paul B Mahol 2c2e69b3a2 lavfi/blend: support slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-24 21:41:28 +00:00
Paul B Mahol af12573938 lavfi/blend: fix SW/SH calculation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-24 17:34:22 +00:00
Paul B Mahol 036e9a0417 lavfi/blend: add yuv(j)411p
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-24 14:02:37 +00:00
Paul B Mahol b24530019f lavfi/blend: timeline support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-14 17:41:50 +00:00
Clément Bœsch 50e66726a2 lavfi: use ceil right shift for chroma width/height.
This should fix several issues with odd dimensions inputs.

lut, vflip, pad and crop video filters also need to be checked for such
issues. It's possible sws is also affected.
2013-05-10 17:20:06 +02:00
Paul B Mahol 1f2baec7bd lavfi: add gbrap support to some filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-08 12:48:05 +00:00
Paul B Mahol a64c9afe3d lavfi/blend: merge config_input_top into config_output
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-02 12:22:18 +00:00
Paul B Mahol 990b13806d lavfi/blend: use correct way to check number of planes
This fix crash with gray, as its marked as pseudopal,
and thus have extra plane.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-02 12:22:18 +00: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
Paul B Mahol 11f6174a91 lavfi/blend: support more yuv pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-11 13:10:11 +00:00
Matthieu Bouron 6afed2aec1 lavfi/blend: switch to AVOption-based system 2013-04-11 01:25:02 +02:00
Paul B Mahol 1f97dfb77f lavfi/blend,noise: remove unedeed av_opt_free() call
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-08 09:02:03 +00:00
Paul B Mahol 2b26077c95 lavfi/blend: use standard options parsing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 00:14:55 +00:00
Paul B Mahol b1dea2c0d8 lavfi/blend: add N variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-04 15:30:06 +00:00
Björn S f248b8a902 blend: Adding yuvj pixelformats to the blend effect
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 13:14:38 +01:00
Clément Bœsch 89b4e758d3 lavfi/blend: always peek the first frame of each queue.
Before the change, filter_frame() always waited for 2 samples in the
bottom frames queue. This notably fixes commands such as
./ffplay tests/lena.pnm -vf split,blend=c0_mode=addition
2013-03-22 23:09:08 +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
Paul B Mahol 47619e41c4 blend filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-02-21 20:16:23 +00:00